Repository navigation
test(e2e): journey for changing the password in Profile, Security - #156
Merged
Merged
Conversation
The route has a parity fixture, a model and contract tests on four targets
(G-33). What only a browser can say is that the stock page works with what
the route answers: the form lets the new password through, the CSRF token it
fetches is accepted, the cookies the answer sets are the ones the app keeps
using, and the app sends the browser whose session ended to the sign-in page.
The journey uses two browsers. A signs up and changes the password; B, signed
in with the old password beforehand, must land on the sign-in page on its next
load; the old password is refused at the sign-in form and the new one signs
in. It does not stop at the toast or at the 200 in its own log: it asks the
server's state three ways.
Controls, each of which must fail with its words and must show it fired:
`change-refused` fails at "change the password:", `change-dropped` (the toast
and a 200 in the log, a server that changed nothing) fails at "the other
browser is signed out:". `slow-page` and the target and count guards (now
3 of 3) cover the new journey too.
Where a page is, is judged by its path alone: the sign-in page of a visitor
sent there carries the workspace in its query, and a URL match took that for
being inside it.
The pinned Plane throttles email-check, sign-in and sign-up to 10 a minute per
address and counts the refused calls. This journey makes 8 of them and M1's
makes 2, so the sign-in journey after them was answered 429 on its first call
(the first run on the pin: M1 and this journey passed, that one did not).
support/throttle.ts holds those three calls in the browser until the minute
has room, on the pin only, and the pin gets longer timeouts.
With the pacing, the next pin run got past the throttle and failed in the
sign-in journey's own pin branch, which had never run: it opened the pin's
"Forgot your password?" popover to read the SMTP text and left it open over
the submit button ("subtree intercepts pointer events", a 90 s timeout). It
now presses Escape and asserts the popover is gone.
Measured: on the pinned Plane `scripts/e2e.sh plane-oracle` passes 3 of 3
(M1 5.0 s, this journey 7.3 s, the sign-in journey 55.6 s, about 50 s of it
the pacing's wait). On a Worker `scripts/e2e.sh worker-memory controls` passes
3 of 3 with every control failing with its words and slow-page passing, before
and after the rebase onto main (the popover edit came later and is in the
branch that runs on the pin only). Not measured: the controls on the
pin, and the worker-cf cell (CI runs it). Three pin runs never reached a
journey (the oracle's migrator timed out twice under a machine load of 300 to
850, and RabbitMQ exited at start once); none says anything about a journey.
G-34 and the traceability rows say so.
Refs: #46
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
PR #156's `worker-cf e2e` cell (CI run 43563612570) ran the three journeys on a real Worker: 3 of 3 passed, `change-refused` and `change-dropped` failed with their words, `slow-page` passed and the count guard held (VERDICT: PASS). G-34 and the traceability row said the cell had not run yet; they now say what it did, and G-34 no longer lists it as not covered. Refs: #46 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A browser journey for the last step of the locked-out person's way back in: the stock app's Profile → Security page changing the password (
POST /auth/change-password/, X09, D-039, merged in #151). It runs on both targets (Thrust and the pinned Plane), and it is one spec ine2e/journeys/, so theworker-cf e2ecell runs it.Refs #46 (it does not close it: the other M2 screens still need their journeys).
Why a journey and not a Rust test
The route has a parity fixture, a model and contract tests on four targets (G-33). What only a browser can say is that the stock page works with what the route answers: the form's own validation lets the new password through, the CSRF token it fetches is accepted, the cookies the answer sets are the ones the app keeps using, and the app sends the browser whose session ended to the sign-in page.
The journey
Two browsers share one account.
/settings/profile/security, fills the three fields, clicks "Change password" and sees "Password changed successfully."It does not stop at the toast or at the 200 in its own network log: it asks the server's state three ways (B's next page, the old password, the new one). Where a page is, is judged by its path alone, because the sign-in page of a visitor sent there carries the workspace in its query (
/?next_path=/<slug>/) and a URL match took that for being inside it (my first draft; it would have passed the last step with nothing signed in).Controls (rule 8: each must fail, with its words, and must show it fired)
change-refusedchange-droppedslow-page(must pass) and the target and count guards (now 3 of 3) cover the new journey too.Two things the pin leg needed
email-check, sign-in and sign-up to 10 a minute per address and counts the refused calls (AuthenticationThrottle). The password journey makes 8 of them and M1 makes 2, so the sign-in journey after them was answeredPOST /auth/email-check/ 429on its first call (its HAR shows it). Thrust has no per-address throttle on those routes.e2e/support/throttle.tsholds those three calls in the browser until the minute has room, on the pin only, and the pin gets longer timeouts.m2-sign-in-methods.spec.ts, in the branch that only runs on the pin.Measured
scripts/e2e.sh plane-oracle(the pinned Plane, 2026-11-14)worker-cf e2ecell of this PR (CI run 43563612570, a real Worker)change-refusedandchange-droppedfailed with their words,slow-pagepassed, the count guard held (VERDICT: PASS); 34 checks passed andwebwas skipped, as it is for changes outsideweb/scripts/e2e.sh worker-memory controls(2026-11-13, and after the rebase onto main)slow-pagepassed, the count guard refused a skip (VERDICT: PASS)Not measured
scripts/e2e.sh plane-oracle controls): the new controls are browser-side and were measured onworker-memoryonly.worker-memorywas not re-run after the popover edit, which is in the branch that runs on the pin only.Not covered by the journey
The strength refusal in the browser (the form keeps the button disabled for a weak password; the rule is the Rust suites'), the temporary-password path end to end (the operator makes the account, the person signs in with it, changes it: its halves are G-32's and G-33's tests, and no journey walks them in one run), a HAR of this journey, and a second browser's session ending by a request made with its old cookie (the contract test holds that). All listed in G-34.
Files
e2e/journeys/m2-change-password.spec.ts(new),e2e/support/throttle.ts(new),e2e/support/controls.ts,e2e/support/context.ts,e2e/playwright.config.ts,scripts/e2e.sh,e2e/journeys/m2-sign-in-methods.spec.ts, and the docs:docs/src/testing/status.md(G-34, G-31's stale sentence),docs/src/testing/techniques/app-and-e2e.md,tools/e2e-plane/README.md,.agents/plans/contrail/TRACEABILITY.md.🤖 Generated with Claude Code