test(ui): nav data-testids + routerLink, discovery spec finds real bugs#488
Merged
nicdavidson merged 1 commit intodevelopfrom Apr 22, 2026
Merged
test(ui): nav data-testids + routerLink, discovery spec finds real bugs#488nicdavidson merged 1 commit intodevelopfrom
nicdavidson merged 1 commit intodevelopfrom
Conversation
The 2026-04-22 discovery run couldn't navigate the sidebar because the
admin UI's nav items are <button (click)="handleNavClick(item)"> with no
routerLink, href, or testid. Force-clicks either timed out on
actionability or fell through to neighboring elements.
This branch fixes that at the source:
Sidebar (df-side-nav.component.html):
* Leaf items are now <a routerLink> instead of <button (click)>. Real
browser affordances (middle-click / ctrl-click opens in a new tab,
hover shows URL, copy link works, screen readers announce "link").
handleNavClick() keeps clearing the error banner but routing now
happens through [routerLink].
* data-testid on every leaf (`nav-api-connections-event-scripts`) and
every expansion-panel header (`nav-group-api-connections`).
Common dialog / table buttons:
* data-testid on df-manage-table's `+` and refresh-schema buttons.
* data-testid on df-confirm-dialog's confirm / cancel buttons.
Automation:
* New NavPage page-object (e2e/fixtures/nav.ts) that expands parent
accordions and routes to any leaf by path.
* Discovery spec (_findings.spec.ts) now uses NavPage; reaches real
forms on four of five journeys.
First rerun surfaced concrete findings (not fixed here, just reported):
• api-db: Database create form has zero mat-selects at the position
where a service-type picker was expected.
• roles: create form renders only 1 input/select — a role form should
have many fields. Suggests a lazy-load or licensing gate.
• admins: /admin-settings/admins path still can't be reached via
NavPage — the expansion panel opening logic may need another pass.
• event-scripts: page crashed after picking service=db on the create
form. Needs a focused repro.
Files prefixed with `_` are exploratory; playwright.config.ts now
ignores them on the default run so CI isn't gated on flaky discovery.
cadcd7f to
3809422
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Yesterday's attempt to add a Playwright discovery sweep (PR #487) hit a wall: the admin sidebar isn't automatable. `button.nav-item` elements have no `routerLink`, no `href`, no `data-testid`. Force-clicks either time out on actionability or fall through to nearby elements. Net result: zero bugs surfaced by the discovery run.
What this PR does
Sidebar affordances (df-side-nav.component.html)
Common UI testids
Automation infrastructure
What the discovery spec surfaced on first run
After the nav fix, the discovery reached real forms on 4 of 5 journeys:
Bug fixes not in this PR — these are findings to triage separately.
Test plan
Out of scope / follow-ups