Skip to content

Fix Playwright Console navigation and API proxy URLs - #1

Merged
hhovsepy merged 2 commits into
hhovsepy:playwright-migrationfrom
jshaughn:fix-playwright-console-routes
Nov 3, 2026
Merged

hhovsepy merged 2 commits into
hhovsepy:playwright-migrationfrom
jshaughn:fix-playwright-console-routes

Conversation

@jshaughn

@jshaughn jshaughn commented Oct 29, 2026 •

Copy link
Copy Markdown

The vendored Playwright tests construct standalone Kiali page and API URLs. OpenShift Console exposes pages under /ossmconsole/ or native /k8s/ resource tabs, and Kiali APIs through /api/proxy/plugin/ossmconsole/kiali/api. The original URLs therefore navigate to the wrong pages and send direct API requests to the wrong endpoints.

Add an OSSMC-owned URL adapter that:

  • Translates list pages, graphs, and resource details to Console routes, preserving query parameters and fragments.
  • Routes Kiali /api requests through the Console service proxy, including the bare API root and query strings, without adding a second prefix to existing proxy URLs.
  • Preserves standalone Kiali behavior and uses the runner's port 9000 default in OSSMC mode.

The vendored URL helper re-exports the adapter so shared navigation, direct URL-helper calls, and API polling use the same implementation. The sync script regenerates that re-export when refreshing upstream tests.

Sub-PR for kiali#885, targeting its source branch, hhovsepy:playwright-migration.

Validation:

  • yarn test: 36 URL-adaptation checks and 770 existing unit tests pass. The new checks run as part of the normal unit-test command.
  • A direct Playwright API request against a local test server verifies the actual proxy path and query string. The proxy regression checks failed before the API mapping was added.
  • Three navigation integration checks fail against the original vendored URL helper.
  • Lint of the changed helpers/tests and yarn tsc -p e2e --noEmit pass after the API change.
  • Full yarn lint, yarn tsc --noEmit, and yarn build passed for the navigation change, with existing repository warnings only.
  • Core-1 Playwright discovery succeeds; the .unit.ts checks are excluded from browser-test discovery.
  • The sync-script adapter fragment regenerates the exact checked-in URL-helper shim; shell syntax and formatting checks pass.

A full run against a deployed Console has not been performed.

Signed-off-by: Jay Shaughnessy <jshaughn@redhat.com>
Signed-off-by: Jay Shaughnessy <jshaughn@redhat.com>
@jshaughn jshaughn changed the title Fix Playwright navigation to OpenShift Console routes Fix Playwright Console navigation and API proxy URLs Oct 29, 2026
@hhovsepy
hhovsepy merged commit f2f208f into hhovsepy:playwright-migration Nov 3, 2026
@github-project-automation github-project-automation Bot moved this from 👀 In review to ✅ Done in Kiali Sprint 26-15 | Kiali v2.35 Nov 3, 2026
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.

2 participants