mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-06-13 17:53:00 +08:00
Backport of #40434 to release/2026.5. --- Was using freeze_time which only freezes server time, need to use `time:` metadata in system specs to also freeze the browser time. Also fixes the `time:` metadata for system specs. We were using `playwright_page.set_fixed_time`, which pins `Date.now()` forever, which breaks Ember's runloop... `next()`/`later()` schedule timers via `Date.now() + wait` and only fire them once `Date.now()` has advanced past that, so any action deferred through the runloop (e.g. DButton, which uses `next()` to optimise INP) would silently never run. We can use `playwright_pageclock.install(time: example.metadata[:time])` and `playwright_page.resume` to start the browser at the required time and then keep the time running. Co-authored-by: Martin Brennan <martin@discourse.org> |
||
|---|---|---|
| .. | ||
| db | ||
| fabricators | ||
| fixtures | ||
| generator | ||
| helpers | ||
| import_export | ||
| initializers | ||
| integration | ||
| integrity | ||
| jobs | ||
| lib | ||
| mailers | ||
| models | ||
| multisite | ||
| queries/reports | ||
| requests | ||
| script/import_scripts | ||
| serializers | ||
| services | ||
| support | ||
| system | ||
| tasks | ||
| views | ||
| rails_helper.rb | ||
| regenerate_swagger_docs | ||
| swagger_helper.rb | ||