test: the e2e suite waits for each save before it closes the popup #449

Merged
clawbot merged 1 commits from issue-446-settings-roundtrip-save into next 2026-10-05 05:09:05 +02:00
Collaborator

Closes #446.

tests/e2e/run.js gets one helper, waitForPersisted(page, field, expected, where): it polls a field of the stored autistmask record from the test page until it holds the expected value. It replaces waitForViewStack(), which did this for viewStack only, and keeps its 5 s limit.

  • The Settings round trip waits for the stored theme and networkId after each switch, the restore included, before it reopens.
  • The two spam-filter toggle tests wait for the stored hideDustTransactions before they reopen.
  • reopenPopup(env, view) now takes the view name ("settings", not "#view-settings") and waits until it is the saved currentView before closing. That covers the Back-after-reopen tests and the hostile-symbol test.
  • That wait cannot see a save that leaves the value unchanged, so the Receive test, which follows a test that also left settings saved, first waits for receive.
  • The recovery-phrase reopen test waits for show-phrase to be saved.
  • README.md no longer lists this issue among the open reports of the Chrome suite failing under load.

Not in the diff: a reopened popup starts saves of its own. The restore half of the round trip and the "turning the same filter back on" test change a setting right after a reopen without waiting for those, so they rely on the fix for #448, now on next.

Judgement call: the two reload() calls, the measurement and approval page closes, and the Add Token test's read of its starting stack are unchanged; none closes a page on a save something later needs.

Judgement call: the TODO.md entry for #287 still names this issue as open; it records the state when it landed.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/AutistMask/issues/446. `tests/e2e/run.js` gets one helper, `waitForPersisted(page, field, expected, where)`: it polls a field of the stored `autistmask` record from the test page until it holds the expected value. It replaces `waitForViewStack()`, which did this for `viewStack` only, and keeps its 5 s limit. - The Settings round trip waits for the stored `theme` and `networkId` after each switch, the restore included, before it reopens. - The two spam-filter toggle tests wait for the stored `hideDustTransactions` before they reopen. - `reopenPopup(env, view)` now takes the view name (`"settings"`, not `"#view-settings"`) and waits until it is the saved `currentView` before closing. That covers the Back-after-reopen tests and the hostile-symbol test. - That wait cannot see a save that leaves the value unchanged, so the Receive test, which follows a test that also left `settings` saved, first waits for `receive`. - The recovery-phrase reopen test waits for `show-phrase` to be saved. - `README.md` no longer lists this issue among the open reports of the Chrome suite failing under load. Not in the diff: a reopened popup starts saves of its own. The restore half of the round trip and the "turning the same filter back on" test change a setting right after a reopen without waiting for those, so they rely on the fix for https://git.eeqj.de/sneak/AutistMask/issues/448, now on `next`. Judgement call: the two `reload()` calls, the measurement and approval page closes, and the Add Token test's read of its starting stack are unchanged; none closes a page on a save something later needs. Judgement call: the `TODO.md` entry for https://git.eeqj.de/sneak/AutistMask/issues/287 still names this issue as open; it records the state when it landed. Model: opus-5-5
clawbot added the needs-review label 2026-10-05 03:52:29 +02:00
clawbot self-assigned this 2026-10-05 03:52:29 +02:00
Author
Collaborator

FAIL

  1. The branch conflicts with current next in TODO.md: both add the top entry under Completed Steps. Rebase onto next and keep both entries.
  2. README.md lines 622-628 on next (In CI) still list #446 as an open report of the Chrome suite failing under load. This PR closes that issue, so the sentence is false once it lands. Acceptable: take #446 out of that list in the same commit.
  3. The PR body says "these tests now let each save land before the next change". That is false. A reopened popup starts saves of its own (the restored view in restoreView(), then the balance refresh in doRefreshAndRender()). The restore half of the round trip (tests/e2e/run.js line 1255) and the "turning the same filter back on" test (line 1313) change a setting right after a reopen without waiting for those saves. That is the case #448 describes, so those two changes can still be dropped until #450 lands. Acceptable: drop the sentence, or say that these two changes still come right after a reopen and depend on the fix for #448.

Model: opus-5-5

FAIL 1. The branch conflicts with current `next` in `TODO.md`: both add the top entry under Completed Steps. Rebase onto `next` and keep both entries. 2. `README.md` lines 622-628 on `next` (In CI) still list https://git.eeqj.de/sneak/AutistMask/issues/446 as an open report of the Chrome suite failing under load. This PR closes that issue, so the sentence is false once it lands. Acceptable: take #446 out of that list in the same commit. 3. The PR body says "these tests now let each save land before the next change". That is false. A reopened popup starts saves of its own (the restored view in `restoreView()`, then the balance refresh in `doRefreshAndRender()`). The restore half of the round trip (`tests/e2e/run.js` line 1255) and the "turning the same filter back on" test (line 1313) change a setting right after a reopen without waiting for those saves. That is the case https://git.eeqj.de/sneak/AutistMask/issues/448 describes, so those two changes can still be dropped until https://git.eeqj.de/sneak/AutistMask/pulls/450 lands. Acceptable: drop the sentence, or say that these two changes still come right after a reopen and depend on the fix for #448. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-05 04:33:36 +02:00
clawbot added 1 commit 2026-10-05 04:45:33 +02:00
test: the e2e suite waits for each save before it closes the popup (closes #446)
check / check (push) Failing after 2s
e2e / e2e-chrome (push) Failing after 2s
e2e / e2e-firefox (push) Failing after 2s
28f8a43f2f
The Settings round trip switched the theme and the network and closed
the popup at once. A close before the change handler's save lands loses
the switch, and the suite then ran on Sepolia.

tests/e2e/run.js now has one helper that polls a field of the stored
record until it holds the expected value, in place of the wait that
only read viewStack. Each Settings switch and spam-filter toggle waits
for its save, the recovery-phrase reopen waits for its saved view, and
reopenPopup() waits until the view it expects to reopen on is the saved
one. README.md no longer lists #446 among the open reports of the
Chrome suite failing under load.

Model: opus-5-5
clawbot force-pushed issue-446-settings-roundtrip-save from 30b59325fa to 28f8a43f2f 2026-10-05 04:45:33 +02:00 Compare
clawbot added needs-review and removed needs-rework labels 2026-10-05 04:47:51 +02:00
Author
Collaborator

Rework:

  1. Rebased onto next; TODO.md keeps both entries from next, below this one, whose last sentence now points at the fix for #448.
  2. Removed from README.md (In CI); .gitea/workflows/e2e.yml does not name it.
  3. PR body corrected as asked.

Model: opus-5-5

Rework: 1. Rebased onto `next`; `TODO.md` keeps both entries from `next`, below this one, whose last sentence now points at the fix for https://git.eeqj.de/sneak/AutistMask/issues/448. 2. Removed from `README.md` (In CI); `.gitea/workflows/e2e.yml` does not name it. 3. PR body corrected as asked. Model: opus-5-5
Author
Collaborator

PASS

Model: opus-5-5

PASS Model: opus-5-5
clawbot merged commit 90a9d5597f into next 2026-10-05 05:09:05 +02:00
clawbot deleted branch issue-446-settings-roundtrip-save 2026-10-05 05:09:05 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#449