Test: Add BrowserConsoleHelpers for Capybara
- Adds helper `browser_logs` for reading browser logs in a standard resilient way. - Adds `expect_page_to_have_no_console_errors` for asserting that no console errors have been thrown. - Adds `clear_browser_logs` which needs to be called before each example, otherwise the logs from one example spill over into the next one. - This is added to `global_search_spec` to mark a feature spec that should fail and would have been caught with this exception.
Showing
- doc/development/testing_guide/frontend_testing.md 42 additions, 0 deletionsdoc/development/testing_guide/frontend_testing.md
- spec/features/global_search_spec.rb 26 additions, 8 deletionsspec/features/global_search_spec.rb
- spec/features/ide_spec.rb 3 additions, 1 deletionspec/features/ide_spec.rb
- spec/support/capybara.rb 4 additions, 34 deletionsspec/support/capybara.rb
- spec/support/helpers/browser_console_helpers.rb 93 additions, 0 deletionsspec/support/helpers/browser_console_helpers.rb
Loading
Please register or sign in to comment