Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flaky residence assigned officers error #1227

Conversation

vicentemendozam
Copy link

Where

What

  • Hunt the flaky that appears in /spec/features/officing/residence_spec.rb:70:
  • Specific error in test:
     Failure/Error: click_button 'Validate document'
     Capybara::ElementNotFound:
       Unable to find visible button "Validate document"
     # ./spec/features/officing/residence_spec.rb:70:in `block (3 levels) in <top (required)>'

How

  • Explanation:

There are two buttons (one link and one button) with the same name. This only happen with the translation for the buttons match. For example in Spanish it is different translations.

  • Flaky Explanation:

The fact it is a flaky test is because capybara calls them visually with click_link and click_button and both have the same name.

  • Fix Explantion:

Include a within in each call to the button/link to specify exactly where the button/link we need to use is located.

      within("#new_residence") do
        click_button "Validate document"
      end

-Backport PR:

Waiting for revision to create it.

Screenshots

c_d_issue_1211

Test

  • No test added

Deployment

  • N/A

Warnings

  • click_on , click_link , click_button It can be ambiguous and can give an error. If it is called in the same way, the place to search should be specified.
  • In the same document there are more tests with calls to these methods. After the revision I can match the other tests.

@vicentemendozam vicentemendozam force-pushed the flaky_residence_assigned_officers_error branch from cff7d35 to 9ccf1bb Compare February 7, 2018 12:46
@bertocq bertocq merged commit e66e2b6 into AyuntamientoMadrid:master Feb 7, 2018
@bertocq bertocq mentioned this pull request Feb 7, 2018
@aitbw aitbw deleted the flaky_residence_assigned_officers_error branch February 9, 2018 14:25
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.

None yet

2 participants