test: add comprehensive e2e test suite with shared helpers and DB seeding
Extract shared test runner (helpers.js), add file-based SQLite with setup_db.py for fixture seeding, and add tests for auth guard, credentials management, full registration flow, health endpoint, password auth, and magic link registration errors. 66 checks across 7 test files.
This commit is contained in:
parent
dbd7449ea1
commit
c381896de4
10 changed files with 422 additions and 30 deletions
13
tests/e2e/test_health.js
Normal file
13
tests/e2e/test_health.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
// tests/e2e/test_health.js
|
||||
// Smoke test: health endpoint returns OK.
|
||||
|
||||
const { TARGET_URL, run } = require('./helpers');
|
||||
|
||||
run(async (page, assert) => {
|
||||
console.log('\n--- Health endpoint ---');
|
||||
const resp = await page.request.get(`${TARGET_URL}/health`);
|
||||
assert(resp.ok(), `Health endpoint returns 200 (status: ${resp.status()})`);
|
||||
|
||||
const body = await resp.json();
|
||||
assert(body.status === 'ok', `Health response is {"status":"ok"} (got: ${JSON.stringify(body)})`);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue