mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-15 23:12:04 +00:00
test(e2e): the connect journey asserts after the status resolves
No journey reached the connect arm: bp answers `manual`, visit answers `file`, and the child path ends at confirm. The a11y sweep opened the screen and asserted the connect card was visible — which it was, for the few hundred milliseconds before the status envelope resolved, so the sweep passed through the defect rather than catching it. The new journey answers Q4 with a wearable and asserts only after `GET /api/integrations/status` has settled: nothing is claimed for an account with no connection and no result is stamped on its behalf, and a connection seeded as delivering is acknowledged rather than offered. The a11y sweep now waits for the tile the screen settled on instead of the frame before it.
This commit is contained in:
1 parent
8d81ac0708
commit
dfa5b9a5e0
4 files changed
+207
-1
No files matched your search
@@ -480,6 +480,21 @@ export const E2E_SETUP_A11Y = {
|
||||
role: "USER",
|
||||
} as const;
|
||||
|
||||
/**
|
||||
* v1.38.19 (wave B) — the connect-source journey's account.
|
||||
*
|
||||
* The one arm of the flow that renders a claim about real account state had
|
||||
* no journey that reached it: bp answers `manual`, visit answers `file`, and
|
||||
* the child path ends at confirm. This account answers Q4 with a wearable, so
|
||||
* `/onboarding/first-result` really does render the connect step.
|
||||
*/
|
||||
export const E2E_SETUP_CONNECT = {
|
||||
email: "e2e-setup-connect@healthlog.test",
|
||||
username: "e2e-setup-connect",
|
||||
password: "Cn6!Zx4tB9wQm3Jf",
|
||||
role: "USER",
|
||||
} as const;
|
||||
|
||||
export const E2E_SETUP_LOCALE = {
|
||||
email: "e2e-setup-locale@healthlog.test",
|
||||
username: "e2e-setup-locale",
|
||||
@@ -507,6 +522,10 @@ export const SETUP_A11Y_STORAGE_STATE_PATH = resolve(
|
||||
process.cwd(),
|
||||
"e2e/setup/storageStateSetupA11y.json",
|
||||
);
|
||||
export const SETUP_CONNECT_STORAGE_STATE_PATH = resolve(
|
||||
process.cwd(),
|
||||
"e2e/setup/storageStateSetupConnect.json",
|
||||
);
|
||||
export const SETUP_LOCALE_STORAGE_STATE_PATH = resolve(
|
||||
process.cwd(),
|
||||
"e2e/setup/storageStateSetupLocale.json",
|
||||
@@ -519,6 +538,7 @@ const SETUP_FLOW_ACCOUNTS = [
|
||||
E2E_SETUP_CHILD,
|
||||
E2E_SETUP_A11Y,
|
||||
E2E_SETUP_LOCALE,
|
||||
E2E_SETUP_CONNECT,
|
||||
] as const;
|
||||
|
||||
async function hashPassword(password: string): Promise<string> {
|
||||
@@ -1261,6 +1281,7 @@ export default async function globalSetup(config: FullConfig): Promise<void> {
|
||||
await capture(E2E_SETUP_VISIT, SETUP_VISIT_STORAGE_STATE_PATH);
|
||||
await capture(E2E_SETUP_A11Y, SETUP_A11Y_STORAGE_STATE_PATH);
|
||||
await capture(E2E_SETUP_LOCALE, SETUP_LOCALE_STORAGE_STATE_PATH);
|
||||
await capture(E2E_SETUP_CONNECT, SETUP_CONNECT_STORAGE_STATE_PATH);
|
||||
await capture(E2E_SETUP_CHILD, SETUP_CHILD_STORAGE_STATE_PATH);
|
||||
await pool.query(
|
||||
`UPDATE users SET totp_confirmed_at = $2 WHERE username = $1`,
|
||||
|
||||
Reference in new issue
Block a user