Files
HealthLog/e2e/setup/test-helpers.ts
T
Marc-André Bombeck 4b3e71570c test(sharing): drive the managed-record capabilities over the routes and the browser
The integration leg reads GET /api/auth/me as a guardian acting on a
managed profile and asserts both lists, lands a mood entry and an
allergy on the profile's record, is refused a vault write, and shows a
WRITE delegate writable sections without manageable ones together with
the refused mood entry the list withheld.

The browser leg opens the managed profile, adds a mood entry through
the control that used to be hidden and asserts the POST's status, and
finds the owner-only sentence and no upload control on the documents
page. The spec gets its own session jar and runs in the desktop
project only, like every other spec that moves the record selector.
2026-09-09 19:42:27 +02:00

30 lines
930 B
TypeScript

/**
* Re-export pin for the seeded test-user identity. The cookie jar that
* authenticates each spec is captured ONCE in `global-setup.ts` and the
* specs reach for it via `STORAGE_STATE_PATH` directly. We keep this
* file (instead of a barrel inside global-setup) only so future helpers
* specific to the spec-side (e.g. multi-user scenarios that need
* fresh logins) have a natural home.
*/
export {
E2E_USER,
E2E_OWNER,
E2E_OWNER_FULL_NAME,
E2E_GUARDIAN,
E2E_SCOPE_DELEGATE,
E2E_SCOPE_RECORDS,
E2E_LEVEL_RECORDS,
E2E_DELEGATE_MARKER_KG,
E2E_OWNER_MARKER_KG,
STORAGE_STATE_PATH,
OWNER_STORAGE_STATE_PATH,
DELEGATE_STORAGE_STATE_PATH,
SCOPE_DELEGATE_STORAGE_STATE_PATH,
SCOPE_A11Y_STORAGE_STATE_PATH,
SCOPE_CAPABILITIES_STORAGE_STATE_PATH,
FENCE_STORAGE_STATE_PATH,
FENCE_OFFLINE_STORAGE_STATE_PATH,
CROSS_TAB_STORAGE_STATE_PATH,
GUARDIAN_STORAGE_STATE_PATH,
} from "./global-setup";