Skip to content

Test: Fix Breaking Features Tests #3489

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

Draft
wants to merge 4 commits into
base: development
Choose a base branch
from
Draft

Conversation

aaronskiba
Copy link
Contributor

Fixes # .

Changes proposed in this PR:

- Moved all Capybara settings into `spec/support/capybara.rb` to centralize test configuration.
- Use `Capybara.default_driver = :rack_test` (prior to this, `spec/rails_helper.rb` was overriding the assignment)
- Use `Capybara.javascript_driver = :selenium_chrome_headless_custom` (previously defined in `spec/rails_helper.rb`)
- Use `Capybara.default_max_wait_time = 10`
- These changes address the Chrome 134 breaking changes (#3485).
- Added `expect` statements to ensure that page loads are completing successfully.
  - The `expect(page).to have_current_path(%r{#{org_admin_templates_path}/\d+})` statements help verify the page load.
  - It would be better to implement a notification such as "Customised template created successfully." and use that to verify the page load.
- These changes should be revisited (and possibly reverted) when a fix is available for these breaking changes via Chrome, Capybara, or Selenium.
- This code change allows Capybara to retry an action when the following error is encountered:
```
Selenium::WebDriver::Error::UnknownError:
unknown error: unhandled inspector error: {"code":-32000,"message":"Node with given id does not belong to the document"}
```
- An example of this error can be seen here (https://github.com/DMPRoadmap/roadmap/actions/runs/13951080715/job/39050483020)
- This handling has been added to address the breaking changes encountered between Chrome 134 and our features tests (#3485)
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.

1 participant