fix(e2e): modernize Playwright selectors for the Tailwind frontend - #5615
Merged
norman-abramovitz merged 4 commits intoJul 11, 2026
Merged
Conversation
The CF API helper's proxied reads/writes were hitting the backend without the passthrough headers, so every proxied call returned 400. Route the 42 proxy operations through pget/ppost/ppatch/pdelete wrappers that set cfApiBase=/pp/v1/proxy/v3 and inject x-cap-cnsi-list plus x-cap-passthrough: true; /api/v1/endpoints stays a plain call. getDomains queried /v3/domains?space_guids= — CF v3 has no such filter, so it 400'd. Resolve the space's org and query /v3/organizations/:org/domains instead. request.helper get/post/patch/delete now take optional extraHeaders, and error throws append the CF response body so 400/422 reasons are visible instead of hidden.
The Material-era selectors no longer exist in the rendered DOM: app-page-header and app-page-tabs are CDK portal sources whose host elements render zero-height, so every waitFor(visible) timed out and the whole suite mass-failed before reaching any assertion. Re-point to where content actually renders: - header/title: app-show-page-header (h1 projected via portal) - tabs: app-page-side-nav side-nav links; shared pageTab() matcher matches the label span exactly, since link text includes the icon ligature and substring matching collides (Services vs User Services) - page actions: .page-header-sub-nav (buttons portal out of the action-bar host, which is hidden for stopped apps) - confirm dialog: app-dialog-confirm - create/map route: both flows live on the routed Add Route page; route-map-dialog now drives its available-routes list (data-test hooks) with a filter-first radio selection - add missing waitForPage() to org/space page objects (specs call it; Playwright strips types unchecked so this only failed at runtime)
Sweep the spec-inline copies of dead Material selectors: - mat-dialog-container -> [role="dialog"] (the Tailwind dialog service renders a plain div panel; ~60 references suite-wide) - mat-tab / mat-nav-list -> side-nav items and their active class - app-application-page / app-applications-list -> components that exist (app-page-side-nav anchor, app-application-wall) - host/port inputs -> formcontrolname (placeholder matching is case-sensitive and never matched "Host") Flow updates for the modernized routes tab: - row actions (unmap/delete) moved behind the more_vert menu; open it before locating the action button - replace fixed sleeps after create/map with waits on the Add Route stepper closing, and nudge a list refresh when the routes list comes back cached - clicks that race the "Retrieving..." loading overlay get an extended timeout so actionability retry outlasts it
Three test-infra bugs surfaced while verifying the selector work: - The cfApi fixture teardown ran cleanupTestResources() after every test, label-sweeping ALL stratos-e2e-test apps on the CF — including a parallel worker's app mid-test. At 2+ workers this randomly deleted apps under running tests (redirects to the app wall, "app does not exist" on fixture calls, constant cleanup 404 noise). Fixtures already delete their own resources by guid, so drop the per-test sweep. - unmapRoute() passed the app guid where the CF v3 API expects the destination guid; the call always failed 422 and was swallowed by .catch() at most call sites. Look up the destination for the app and delete by its guid. - API request contexts inherited the 10s actionTimeout; CF writes (app create) regularly exceed that under load. Set an explicit 30s context timeout, and retry once on CC's intermittent 500s on destination writes. Result on application-routes @2 workers: 26 passed / 2 failed (remaining failures are one map-existing-route flow, tracked separately), up from 0 passing before the series.
norman-abramovitz
marked this pull request as ready for review
July 11, 2026 15:52
norman-abramovitz
approved these changes
Jul 11, 2026
norman-abramovitz
left a comment
Contributor
There was a problem hiding this comment.
LGTM - First Phase
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.
What
The Playwright e2e suite was mass-failing: every application/CF test timed out at
waitForPage. The page objects still targeted Material-era selectors that the Tailwind modernization removed or turned into zero-height CDK portal sources (app-page-header,app-page-tabs,mat-tab-group,mat-dialog-container, ...). The failures were load-independent — the app rendered fine; the tests were looking at elements that can never become visible.Changes
Page objects & shared components — re-point at the rendered DOM:
app-show-page-header(portal target), tabs →app-page-side-navpageTab()matcher that matches the tab label span exactly (link text includes the icon ligature, and substring matching collides on "Services" vs "User Services").page-header-sub-nav, confirm dialog →app-dialog-confirmdata-test="available-routes"list with filter-first radio selectionwaitForPage()the org/space specs already callSpecs — sweep the inline copies:
mat-dialog-container→[role="dialog"](~60 refs), dead component anchors → real ones, row actions opened via themore_vertmenu, fixed sleeps replaced with waits on real state transitions, extended click timeouts where the "Retrieving…" loading overlay races actionability.Test infra — three latent bugs found while verifying:
cfApifixture teardown label-swept allstratos-e2e-testapps after every test, deleting parallel workers' apps mid-test (source of most "random" flakes at 2+ workers)unmapRoute()passed the app guid where CF v3 expects the destination guid — it always 422'd and was swallowed by.catch()actionTimeout; CF writes regularly exceed that under load → explicit 30s, plus one retry on CC's intermittent destination-write 500sVerification
application-routes@2 workers against a live dev stack (4 CF endpoints): 26 passed / 2 failed / 4 skipped, up from 0 passing before the series. The 2 remaining failures are a single map-existing-route flow (Create after radio selection), tracked as follow-up work along with running the CF org/space suites against these page objects.Notes for reviewers
e2e/; no product code touched.