Skip to content

Conversation

@notapatch
Copy link
Contributor

  • Nokogriri::CSS::SyntaxError: expect(page).to
    have_css("span[title='#{permissions.members.last.full_name}']")
  • the programmer needed to use two sets of quotes. Double quotes
    for the have_css string and single quotes for the nested CSS
    attribute for title's value.
  • When the fabricator produced a standard name like smith
    or Jones it worked - about 9 times in 10.
  • When the fabricator produced a name with an apostrophe in it
    it broke the test, about 1 in 10 times, because the CSS
    attribute was: title='O'Conner' and the string became
    unbalanced

  - Nokogriri::CSS::SyntaxError: expect(page).to
    have_css("span[title='#{permissions.members.last.full_name}']")
  - the programmer needed to use two sets of quotes. Double quotes
    for the have_css string and single quotes for the nested CSS
    attribute for title's value.
  - When the fabricator produced a standard name like smith
    or Jones it worked - about 9 times in 10.
  - When the fabricator produced a name with an apostrophe in it
    it broke the test, about 1 in 10 times, because the CSS
    attribute was: title='O'Conner' and the string became
    unbalanced
@notapatch
Copy link
Contributor Author

notapatch commented Sep 11, 2019

If you look through the past builds on Travis you can see it pop up

1) Managing meetings updating an existing meeting successfuly
Failure/Error: expect(page).to_not have_css("span[title='#{permissions.members.first.full_name}']")
     Nokogiri::CSS::SyntaxError:
       unexpected 'Kon' after '[:equal, "'Cammie O'"]'

And here

  1) Managing meetings updating an existing meeting successfuly
     Failure/Error: expect(page).to have_css("span[title='#{permissions.members.last.full_name}']")

     Nokogiri::CSS::SyntaxError:
       unexpected 'Connell' after '[:equal, "'Pearline O'"]'

@docljn
Copy link
Contributor

docljn commented Sep 11, 2019

I have also seen this - the apostrophe is handled correctly in the ui but not in test.

Copy link
Contributor

@matyikriszta matyikriszta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks @notapatch

@matyikriszta matyikriszta merged commit 94e8793 into codebar:master Sep 11, 2019
notapatch pushed a commit to notapatch/planner that referenced this pull request Sep 12, 2019
Fix: flaky test breaks when fabricator produces apostrophe name
@notapatch notapatch deleted the fix-flakey-test branch September 22, 2019 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants