Repository navigation
web: add Playwright E2E and visual regression tests - #193
oly-agents[bot] wants to merge 4 commits into
Conversation
Add a Playwright suite in web/e2e/ that runs against the repository's docker-compose.yaml stack: the job flow (submit, list, details, cancel), the commands and clusters list and detail pages, and toHaveScreenshot baselines for the six list and detail pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Gaurav Warale <gaurav.warale@pattern.com>
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio. |
There was a problem hiding this comment.
Argus review of 6823cc2: 3 inline findings, all Low.
What I checked:
- The Playwright config, the specs,
support/helpers, the compose overlay,run.shanddocker-entrypoint.sh. I traced them against the Next rewrite (API_URLis read at build time), theproxy.tsuser cookie, the Go routes (POST /job,POST /job/{id}/cancel), the shell plugin'scommandcontext, and the cancel and janitor flow. - How the screenshots stay stable: timestamps are frozen, the job ID and name are rewritten, the header ID is masked, the filter menu shows only a count badge, and dates are formatted absolutely (no relative times). I found no flake source.
- Requirements against the task: job submit → list → details → cancel, the commands and clusters list and detail pages, the 6
toHaveScreenshotbaselines, the README and AGENTS docs, and a reason for not wiring CI. All are covered. The UI has no job submit form, so submitting the job through the API is correct.
waitForJobStatus now checks the status against the list with toContain inside expect().toPass, so no regular expression is built from input (Wiz SAST WS-I011-JAVASCRIPT-00003 and WS-I013-JAVASCRIPT-00092). The E2E Postgres uses trust auth, so heimdall.e2e.yaml has a connection string without a password (Wiz secret SECRET-3012). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Gaurav Warale <gaurav.warale@pattern.com>
|
Fixed the Wiz secret finding (SECRET-3012, "DB Connection String", The two SAST findings ( |
- The cancel test reads the <dd> after the 'Canceled by' label, so it fails when canceled_by is wrong or missing. Before, 'e2e-user' in the User field made the check pass. - playwright.config.ts derives the default E2E_API_URL from E2E_API_PORT, so pnpm e2e:local follows the port that run.sh up uses. - README: document E2E_DOCKER_BASE_URL (pnpm e2e) and say that E2E_BASE_URL applies only to pnpm e2e:local. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Gaurav Warale <gaurav.warale@pattern.com>
|
Escalating 1 failed check that this PR did not cause:
A human needs to re-run the |
|
Recheck of the failed Do this: open the failed gh run rerun 46397663527 --failed --repo patterninc/heimdallWhat I checked again:
|
|
Final recheck (2 of 2) of the failed Do this: open the failed gh run rerun 46397663527 --failed --repo patterninc/heimdallNew evidence that the failure is a flake and not caused by this PR:
Still the same:
|
…2e-visual Co-authored-by: Gaurav Warale <gaurav.warale@pattern.com> # Conflicts: # web/pnpm-lock.yaml
|
👀 Reviewing |
There was a problem hiding this comment.
Argus follow-up review of 5e7d312. It covers the new commits since 6823cc2: 8d63e71, 36f115b, and the merge of main (#192, Next.js 16.4.6).
Earlier Argus comments:
- ✅ addressed:
Canceled byvalue check passes even whencanceled_byis wrong or missing (web/e2e/jobs.spec.ts). The test now reads the<dd>that follows theCanceled by<dt>and checks it withtoHaveText('e2e-user'). This matches thedt/ddsiblings thatDetailFieldsrenders, so the User field can no longer make the check pass. - ✅ addressed:
pnpm e2e:localignoresE2E_API_PORT(web/playwright.config.ts). The default is nowhttp://localhost:${E2E_API_PORT || 9190}.||treats an empty value the same way as${E2E_API_PORT:-9190}in the compose file andrun.sh. - ✅ addressed:
E2E_DOCKER_BASE_URLis undocumented (web/README.md). The settings table now has anE2E_DOCKER_BASE_URLrow forpnpm e2e, withhttp://heimdall:9090as the example. TheE2E_BASE_URLrow now says it applies only topnpm e2e:local.
What I checked in the new commits:
waitForJobStatusnow usesexpect(...).toPasswith an exacttoContainmatch. It no longer builds aRegExp, which clears both Wiz ReDoS findings. A transient API error is still retried until the 30 s timeout.- The E2E Postgres now uses
POSTGRES_HOST_AUTH_METHOD: trust, and the connection string has no password. The overlay resetsports, so the database stays unpublished and is reachable only on theheimdall-e2ecompose network.dev:stackis unaffected because it uses a different project and volume. - The merge resolution:
package.jsonhasnextandeslint-config-nextat 16.4.6 and keeps@playwright/test1.65.1. The lockfile keeps@patterninc/pattern-uiat the locked build0.0.0-main.202610271737.65d5c2ce3a27. Theexperimental.agentUpgradesetting that came in frommaindoes not change rendering.
No new findings.
No description provided.