discourse/spec
discoursebot 06a4087075
DEV: Fix dashboard date picker spec [backport 2026.5] (#40701)
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>
2026-06-09 18:23:14 +01:00
..
db DEV: Move Community sidebar section + links from migrations to seed fixture (#39973) 2026-05-13 12:13:12 +01:00
fabricators FEATURE: Add top countries and top referrers cards to the admin dashboard (#40215) 2026-05-22 12:59:16 +08:00
fixtures FIX: Better handling of github_folder onebox w/o opengraph tags (#39142) 2026-04-08 11:49:57 +02:00
generator DEV: Enable Rails/FilePath rubocop rule (#40097) 2026-05-19 19:07:54 +02:00
helpers UX: Drop legacy mobile-mode site settings (#40226) 2026-05-26 09:23:13 +01:00
import_export
initializers FIX: Approve users stuck with a non-pending ReviewableUser (#40303) 2026-05-27 16:38:01 +02:00
integration FIX: Correctly rescue failed embed_mode parsing (#40298) 2026-05-26 15:29:48 +01:00
integrity DEV: Enforce learn_more_url for upcoming changes (#40150) 2026-05-20 16:18:28 +10:00
jobs FIX: Match webhook-related messagebus audience to controller audience [backport 2026.5] (#40695) 2026-06-09 18:21:56 +01:00
lib DEV: Rename anonymous group to anonymous_users (#40435) (#40629) 2026-06-09 10:24:11 +10:00
mailers DEV: Automatically detect and revert translation overrides in specs (#40003) 2026-05-13 22:09:23 +02:00
models DEV: Rename anonymous group to anonymous_users (#40435) (#40629) 2026-06-09 10:24:11 +10:00
multisite DEV: Enable Rails/FilePath rubocop rule (#40097) 2026-05-19 19:07:54 +02:00
queries/reports FEATURE: Activity by category section of the new dashboard's engagement section (#40227) 2026-05-22 13:10:38 +08:00
requests DEV: Rename anonymous group to anonymous_users (#40435) (#40629) 2026-06-09 10:24:11 +10:00
script/import_scripts
serializers FEATURE: Sticky sort header for nested replies (#40307) 2026-05-27 10:39:23 -05:00
services DEV: Rename anonymous group to anonymous_users (#40435) (#40629) 2026-06-09 10:24:11 +10:00
support FIX: type: objects uploads should be stored as IDs (#40178) 2026-05-21 13:45:27 -03:00
system DEV: Fix dashboard date picker spec [backport 2026.5] (#40701) 2026-06-09 18:23:14 +01:00
tasks FIX: type: objects uploads should be stored as IDs (#40178) 2026-05-21 13:45:27 -03:00
views FIX: remove ItemList schema from linkbacks in crawler view (#36608) 2025-12-11 10:41:47 +01:00
rails_helper.rb DEV: Fix dashboard date picker spec [backport 2026.5] (#40701) 2026-06-09 18:23:14 +01:00
regenerate_swagger_docs
swagger_helper.rb