Skip to content

Bug: Flaky Test Unable to Find Warning Modal Before Attempting to Deactivate a Volunteer #5126

@FireLemons

Description

@FireLemons

Flaky tests are defined as tests that return both passes and failures despite no changes to the code or the test itself
Fix the test so it runs consistently.

CI Workflow

rspec in docker

Sample Error Output:

   1) volunteers/edit saves the user as inactive, but only if the admin confirms
     Failure/Error:
       dismiss_confirm do
         scroll_to(".actions")
         click_on "Deactivate volunteer"
       end

     Capybara::ModalNotFound:
       Unable to find modal dialog

     ...
     # ./spec/system/volunteers/edit_spec.rb:170:in `block (2 levels) in <top (required)>'
     # /usr/local/bundle/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # Selenium::WebDriver::Error::TimeoutError:
     #   timed out after 2 seconds (no such alert
     #     (Session info: headless chrome=94.0.4606.61))
     #   /usr/local/bundle/gems/selenium-webdriver-4.10.0/lib/selenium/webdriver/common/wait.rb:73:in `until'

Finished in 6 minutes 26 seconds (files took 8.43 seconds to load)
2495 examples, 1 failure, 11 pending

Failed examples:

rspec ./spec/system/volunteers/edit_spec.rb:162 # volunteers/edit saves the user as inactive, but only if the admin confirms

Questions? Join Slack!

We highly recommend that you join us in slack https://rubyforgood.herokuapp.com/ #casa channel to ask questions quickly and hear about office hours (currently Tuesday 5-7pm Pacific), stakeholder news, and upcoming new issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help WantedThis is a special label that enables github to showcase issues that want helpType: Bugno-issue-activity

    Type

    No type

    Projects

    Status

    Merged to QA

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions