Feat/typescript playwright e2e 4246#4255
Feat/typescript playwright e2e 4246#4255omorros wants to merge 2 commits intoIBM:epic/ui-rewritefrom
Conversation
…ct admin UI (IBM#4246) Signed-off-by: Oriol Morros Vilaseca <OM368@student.aru.ac.uk>
|
Thanks, @omorros! Great contribution, we've been discussing adding the tests for the new UI in TS both to keep the isolated from the HTMX ones and to have them ready early on, so that we could write tests as we added features. I'm moving the base of the PR from main to the branch holding the new UI. |
There was a problem hiding this comment.
@omorros - thanks for your contribution!
Just having a few comments:
- The
Client E2E (Playwright)tests have failed https://github.com/IBM/mcp-context-forge/actions/runs/24522603636.
I thinkcheckoutpart is missing
# -----------------------------------------------------------
# 0️⃣ Checkout
# -----------------------------------------------------------
- name: ⬇️ Checkout source
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
persist-credentials: false
fetch-depth: 1
Can you please compare your file Client E2E (Playwright) with Lint & Test Client one at https://github.com/IBM/mcp-context-forge/actions/runs/24522602327/workflow?pr=4255?
- It'll be worth investigating and running e2e tests for the new React UI against the real API endpoints instead of mocking them in the e2e tests.
…lowlist Signed-off-by: Oriol Morros Vilaseca <OM368@student.aru.ac.uk>
|
Hey @marekdano, thanks for the review. Quick clarification: the checkout step is already in the workflow (lines 48 to 52). The actual cause of the failure was an unpinned actions/cache@v4. Every other workflow in the repo pins it by SHA, and IBM's allowlist enforces that. Fixed in 038fe4b. On running e2e against the real API, makes sense as a follow-up. This PR was scoped to mocked-backend smoke so it stays fast and doesn't overlap with Playwright CI Smoke. Happy to expand scope here if you'd rather not split it. |
The change still does not help to execute the smoke test successfully. https://github.com/IBM/mcp-context-forge/actions/workflows/client-e2e.yml
Yes, keep the smoke test with the mock data now. If we get the smoke test running successfully in CI for this PR, we can merge it. |
🔗 Related Issue
Closes #4246
📝 Summary
What does this PR do and why?
Adds a TypeScript Playwright E2E suite and CI workflow for the new React admin UI (
client/), per #4246. Covers smoke tests (app loads, unauth redirect, static assets) and authflows (login success / 401 / 500, loading state, forgot-password, pre-authed session). Backend is stubbed via
page.route()— no Python gateway required at test time.🏷️ Type of Change
🧪 Verification
Client-only changes; ran the client's npm scripts instead of the repo-level
maketargets.make lintnpm run lint,npm run format:check)make testmake coverage✅ Checklist
make black isort pre-commit)📓 Notes (optional)
Screenshots, design decisions, or additional context.
epic/ui-rewrite(notmain) —client/only exists on that epic.npm run dev:e2e→vite --base=/ --port 5173 --strictPort, spawned by Playwright'swebServer./auth/login) as a session-expiry and doeswindow.location.replace('/app/login'), wiping React state; the 401test asserts the observable outcome (stuck on
/app/login, no token) with an inline comment so any future fix will force the test to be updated.client-e2e.yml) is path-filtered toclient/**, caches browsers by lockfile hash, and uploads the HTML report + traces on failure.