You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
E2E: drop proper-lockfile, put the login back in the fixtures
The guard that serializes changes to the lock directory is now built the
same way as the lock itself, out of mkdir and an owner directory whose
mtime a heartbeat keeps current. One less dependency for a few lines that
already existed next to it. Taking over a stale lock now tolerates losing
the mkdir race rather than throwing.
The account fixtures authenticate again on first use, through getAccount.
Handing back an unauthenticated TestAccount pushed the call into every
spec that took a fixture and left the ones that didn't make it silently
logged out.
**Accounts**: one fixture per key of `fixtureAccounts` in [`lib/pw-base.ts`](lib/pw-base.ts), plus `accountGivenByEnvironment` and `accountSMS`. Adding a key there adds the fixture; calling `authenticate()` logs the account in when needed.
144
+
**Accounts**: one fixture per key of `fixtureAccounts` in [`lib/pw-base.ts`](lib/pw-base.ts), plus `accountGivenByEnvironment` and `accountSMS`. Adding a key there adds the fixture; the account is logged in the first time a spec asks for it.
Copy file name to clipboardExpand all lines: test/e2e/docs/tests_local.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,9 +70,9 @@ See the [list of groups](tests_ci.md#featuretest-groups).
70
70
71
71
### Save authentication cookies
72
72
73
-
The first call to `TestAccount.authenticate()` for an account logs in and saves its cookies under `COOKIES_PATH`, to be re-used until expiry (typically 2 days). Every later authentication reads that file instead of logging in again.
73
+
The first test that needs an account logs in and saves its cookies under `COOKIES_PATH`, to be re-used until expiry (typically 2 days). Every other test and worker reads that file instead of logging in again.
74
74
75
-
Workers authenticating the same account at the same time race for a lock beside the cookies: the winner logs in, and the rest wait for the cookies it writes. So each account is logged in once per run without being listed anywhere in advance.
75
+
Workers that need the same account at the same time race for a lock beside the cookies: the winner logs in, the rest wait for the cookies it writes. So each account is logged in once per run, whichever spec gets there first, and nothing has to be listed anywhere in advance.
76
76
77
77
Delete the `cookies` directory to force a fresh login.
0 commit comments