mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-06 14:53:13 +08:00
This change seeks to improve the reliability of our system tests by resolving the lack of consistency in the state of the client side application between steps in a system test. This is achieved by patching various action methods in `Capybara::Playwright::Node` and `Capybara::Playwright::Browser` so that the methods execute an async JavaScript function on the client side that waits for the client side application to reach a settled state. A settled state is currently defined as: 1. No inflight ajax requests. (_messageBus and presence requests are excluded_) 2. 2 event cycles of the Javascript event loop has happened for for all "click", "input", "mousedown", "keydown", "focusin", "focusout", "touchstart", "change", "resize", "scroll" DOM events that fired. For debugging purposes, a `--debug-client-settled` CLI flag has been added to `bin/rspec`. When used, detailed debugging information will be printed to the browser's console as well as to `stdout` of the `bin/rspec` process. This change was inspired by https://evilmartians.com/chronicles/flaky-tests-be-gone-long-lasting-relief-chronic-ci-retry-irritation and the https://github.com/makandra/capybara-lockstep rubygem. |
||
|---|---|---|
| .. | ||
| locales | ||
| shared_examples | ||
| backups_helpers.rb | ||
| bookmarkable_helper.rb | ||
| concurrency.rb | ||
| diagnostics_helper.rb | ||
| discourse_connect_support_helpers.rb | ||
| discourse_event_helper.rb | ||
| dom_matcher.rb | ||
| fake_bookmark_hashtag_data_source.rb | ||
| fake_logger.rb | ||
| fake_s3.rb | ||
| fast_image_helpers.rb | ||
| final_destination_helper.rb | ||
| helpers.rb | ||
| i18n_helpers.rb | ||
| imap_helper.rb | ||
| integration_helpers.rb | ||
| match_html_matcher.rb | ||
| mock_git_importer.rb | ||
| negated_matcher.rb | ||
| omniauth_helpers.rb | ||
| onebox_helpers.rb | ||
| problem_check_matcher.rb | ||
| rate_limit_matcher.rb | ||
| sample_plugin_site_settings.yml | ||
| service_matchers.rb | ||
| sidekiq_helpers.rb | ||
| site_settings_helpers.rb | ||
| system_helpers.rb | ||
| test_second_factor_action.rb | ||
| time_matcher.rb | ||
| topic_guardian_can_see_consistency_check.rb | ||
| ts_vector_matcher.rb | ||
| uploads_helpers.rb | ||
| webauthn_integration_helpers.rb | ||