Registration e2e step-1 specs broken by E5 Signal Forms migration — [formcontrolname] locators no longer match (CI e2e-anonymous red on master) #737

Closed
opened 2026-07-20 17:07:51 +00:00 by spikerj · 1 comment
Owner

Symptom

e2e-anonymous fails on master (e.g. spikersoft-angular run 11178, job 40564): 3 tests in anonymous-registration-validation.spec.ts time out waiting for locator('[formcontrolname="firstName"]'). First failing runs were 11111/11112 — the #462 merge push — so this predates the unrelated #465 merge at head.

Root cause

E5 wave-1 (#722, PR #462) migrated the registration stepper to Signal Forms: inputs now bind [formField]="basicInfoForm.firstName" and no longer render a formcontrolname attribute. The spec's field() / fieldError() helpers still locate by [formcontrolname=…], so every field lookup times out. (The signal-forms rule's COPPA gate — "registration e2e walk green before merge" — is exactly what this restores.)

Fix

Per the e2e selector convention (#315): add data-testid to the five spec-driven step-1 inputs (first name, last name, DOB, username, email), mirror them in e2e/support/testids.ts, and switch the spec helpers to getByTestId / mat-form-field:has([data-testid=…]) mat-error. Test-id locators also survive any future forms-API change.

## Symptom `e2e-anonymous` fails on master (e.g. spikersoft-angular run 11178, job 40564): 3 tests in `anonymous-registration-validation.spec.ts` time out waiting for `locator('[formcontrolname="firstName"]')`. First failing runs were 11111/11112 — the #462 merge push — so this predates the unrelated #465 merge at head. ## Root cause E5 wave-1 (#722, PR #462) migrated the registration stepper to Signal Forms: inputs now bind `[formField]="basicInfoForm.firstName"` and no longer render a `formcontrolname` attribute. The spec's `field()` / `fieldError()` helpers still locate by `[formcontrolname=…]`, so every field lookup times out. (The signal-forms rule's COPPA gate — "registration e2e walk green before merge" — is exactly what this restores.) ## Fix Per the e2e selector convention (#315): add `data-testid` to the five spec-driven step-1 inputs (first name, last name, DOB, username, email), mirror them in `e2e/support/testids.ts`, and switch the spec helpers to `getByTestId` / `mat-form-field:has([data-testid=…]) mat-error`. Test-id locators also survive any future forms-API change.
Author
Owner

Resolved in spikersoft-angular PR #466 (merged to master 2026-07-20 17:11Z). Step-1 registration inputs now carry data-testid (reg-field-*, mirrored in TESTIDS), and the spec helpers locate by test id instead of the formcontrolname attribute that Signal Forms no longer renders. Verified 4/4 registration specs green locally against the live API; the e2e-anonymous job goes green again on the next master push. Closing.

Resolved in spikersoft-angular PR #466 (merged to `master` 2026-07-20 17:11Z). Step-1 registration inputs now carry `data-testid` (`reg-field-*`, mirrored in `TESTIDS`), and the spec helpers locate by test id instead of the `formcontrolname` attribute that Signal Forms no longer renders. Verified 4/4 registration specs green locally against the live API; the `e2e-anonymous` job goes green again on the next master push. Closing.
Sign in to join this conversation.