Skip to content

Commit 654f163

Browse files
B2JK-Industryclaude
andcommitted
fix(test): patch teacher signup email + birth-year select per G-01/G-14
CI v5 surfaced two new failures from prior PR-P shipping that the test fixtures hadn't caught up to: 1. golden-paths #5 (class mode) — `/api/nauczyciel/signup` POST omitted the `email` field. PR-P G-14 (8303296) made email required (Zod `.string().email()` non-optional) so the verify- link flow has somewhere to send. Test now passes `email: "${teacherUser}@example.com"`. 2. smoke.spec.ts:37 — `selectOption({value: "2000"})` on the register form's birth-year dropdown. PR-P G-01 (85ae293) clamped the dropdown to 11 options (currentYear-6 → -16 = 2010-2020). 2000 is no longer present so the locator times out at 60s. Switched to "2010" — oldest option, age 16, no parent-email gate (matches the pre-existing comment intent). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e485256 commit 654f163

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

e2e/golden-paths.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ test.describe("golden paths", () => {
224224
username: teacherUser,
225225
password: "correct horse battery 1",
226226
displayName: "Teacher Test",
227+
// G-14 made email required (verify-link flow). Tests need to
228+
// supply something deliverable-shaped or signup 400s.
229+
email: `${teacherUser}@example.com`,
227230
schoolName: "Playwright School",
228231
});
229232
expect(tSignup.status, `teacher signup: ${JSON.stringify(tSignup)}`).toBeLessThan(400);

e2e/smoke.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ test.describe("smoke — landing + auth + city", () => {
3131
await page.goto("/register");
3232
await page.getByLabel(/Użytkownik|Username|Ім'я|Jméno/i).fill(u);
3333
await page.getByLabel(/Hasło|Password|Пароль|Heslo/i).fill("correct horse battery 1");
34-
// 16-plus birth year to skip parent-email
34+
// G-01 — birth year dropdown only contains currentYear-6 → -16
35+
// (so the GDPR-K target band is the only valid range). 2010 is
36+
// the OLDEST option (= age 16, no parent-email gate).
3537
await page
3638
.getByLabel(/Rok urodzenia|RODO-K/i)
37-
.selectOption({ value: "2000" });
39+
.selectOption({ value: "2010" });
3840
// Button text is t.submitRegister — see lib/locales/*.ts.
3941
await page
4042
.getByRole("button", { name: /Stwórz konto|Create account|Створити акаунт|Vytvořit účet/i })

0 commit comments

Comments
 (0)