Skip to content

e2e: convert remaining brittle selectors to getByTestId - #1

Merged
HelgeSverre merged 1 commit into
mainfrom
feature/e2e-getbytestid
Jul 8, 2026
Merged

HelgeSverre merged 1 commit into
mainfrom
feature/e2e-getbytestid

Conversation

@HelgeSverre

Copy link
Copy Markdown
Member

e2e: convert remaining brittle selectors to getByTestId

The registry e2e suite already uses getByTestId heavily (~195 uses); this converts the ~40 leftover brittle selectors (waitForSelector('.class'), locator('[data-testid=…]'), #id) to the getByTestId API for consistency and robustness.

  • 40 selectors converted across admin.spec.ts, publisher.spec.ts, tokens.spec.ts.
  • 1 testid added — data-testid="stats-grid" on the admin dashboard grid in templates/admin.html (only element touched that lacked one; all others already had testids).
  • Locator-only — no test logic or assertions changed. Kept non-brittle plain-tag selectors (locator('body'), chained locator('input')) as-is.

Verified: zero residual brittle selectors; every getByTestId('X') resolves to a data-testid="X" in templates/** (including dynamic Alpine :data-testid bindings like status-banned/toast-success). CI's e2e job is the runtime gate.

@HelgeSverre
HelgeSverre merged commit 2b9d31c into main Jul 8, 2026
1 check passed
@HelgeSverre
HelgeSverre deleted the feature/e2e-getbytestid branch July 10, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant