Skip to content

test(playwright): initial playwright config and tests#900

Merged
JosephKav merged 12 commits into
masterfrom
test/playwright/init
Jun 30, 2026
Merged

test(playwright): initial playwright config and tests#900
JosephKav merged 12 commits into
masterfrom
test/playwright/init

Conversation

@JosephKav

@JosephKav JosephKav commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Introduces Playwright for frontend e2e tests.

Test infrastructure

  • playwright.config.ts - one project per browser (Chromium, Firefox, WebKit), each split into a parallel-safe project and a single-worker -mutating project for stateful flows (create/delete/ordering) that share one backend. Adds two mobile viewports (Pixel 8, iPhone 16) running the read-only/validation specs only.
  • Makefile targets - playwright-tests-setup / -teardown / -tests / -full boot a managed Argus server (seeded from config.yml.example), poll its healthcheck, and tear it down cleanly.
  • .github/workflows/playwright.yml - builds Argus (web + binary), starts the test server, type-checks, runs the suite across all browsers, uploads screenshots/traces/HTML report, and posts a results summary comment on PRs.

Coverage

  • Dashboard & navigation.
  • Service lifecycle - create -> verify -> refresh -> delete for GitHub, URL, manual, and URL (JSON / basic-auth / header-auth) lookups; update-available vs up-to-date status and the skip-release flow.
  • Secret inheritance - masked header/basic-auth/webhook/notify secrets survive unrelated edits and service/notifier renames (verified end-to-end via real lookups, webhook sends, and Gotify test messages).
  • Service ordering - drag-and-drop reorder + persistence in both grid and table views.
  • WebHook actions - real send success/failure and the resend-blocked timer.
  • Modal field validation - exhaustive per-field checks across Options, Command, ID/Name, Dashboard, Latest/Deployed Version (incl. url_commands, require, docker pairing), WebHook, and ~20 Notify types.

Fixes & features (surfaced while building the e2e suite)

API / backend

  • Serialise concurrent operations per service - a reference-counted per-service-ID lock: create/edit/delete take it exclusively, refreshes take it shared. Edit/delete wait out an in-flight op (so a background refresh can't bounce a user's save) then re-check the service still exists (it may have been renamed/deleted while waiting); create/refresh return 409 on conflict. OrderMu is released across the network verify so a slow CheckFetches can't block other services' order reads.
  • Expose default latest_version/deployed_version type - /service/defaults now carries the default lookup type. The service-edit form builders drop their hardcoded UI fallback types (latest_version, deployed_version, require.docker, webhook) and inherit them from the defaults/hardDefaults response instead.
  • Don't announce the initial manual version on create/edit - seeding a manual deployed_version during create/edit no longer broadcasts a VERSION/UPDATED event, so it no longer raises a spurious "Updated to version 'X'" toast; the version is still applied and persisted.
  • Keep url lookup headers across edits - the censored config API now returns masked url-lookup headers and the edit-form schema carries headers for the url type, so the form no longer loads them empty and saving no longer drops them.
  • Observe the WebSocket Hub clients off the Run loop - extract addClient/removeClient/broadcast and add a query channel so tests can observe the clients map without racing the Run goroutine's writes.

UI

  • Keep an in-progress reorder when the server order changes - reconcile membership (drop removed ids, append new ones, keep the user's order) instead of resetting to the server order, so a concurrent create/delete elsewhere can't clobber a pending drag-reorder.
  • Render FieldSet as a div to fix nested subgrid sizing - Chromium doesn't propagate subgrid track sizing through a <fieldset>, which the deeply-nested service-edit modal relies on; render as <div role="group">.
  • Stable e2e hooks - data-update-available on the service card, an aria-label on the resend-timer hourglass, and IDs on field-check inputs.

Tooling / deps

@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.70%. Comparing base (76363a3) to head (4fcf75c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #900      +/-   ##
==========================================
+ Coverage   99.70%   99.70%   +0.01%     
==========================================
  Files         197      197              
  Lines       12451    12545      +94     
==========================================
+ Hits        12413    12507      +94     
  Misses         33       33              
  Partials        5        5              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown

✅ Playwright Test Results

Count
✅ Passed 299
❌ Failed 0
🔄 Flaky 0
⏭️ Skipped 4

Duration: 942.2s

View screenshots & full report

JosephKav added 11 commits June 29, 2026 19:11
- vite-tsconfig-paths is deprecated now that Vite resolves tsconfig
  paths natively; remove the plugin and set resolve.tsconfigPaths: true.
- vite-plugin-babel's `filter` is planned for deprecation and, since
  1.7.0, is applied after `include` (default /\.jsx?$/), so the old
  `filter: /\.tsx?$/` no longer matches as intended. Migrate to
  `include`, split into explicit .ts and .tsx passes (the latter adding
  @babel/plugin-syntax-jsx).
Chromium doesn't propagate subgrid track sizing through a <fieldset>
grid container, and the service-edit modal nests grid-cols-subgrid
field-sets several levels deep. Render FieldSet as a <div role="group">
instead.
returned them from the censored config API, so the edit form loaded
them empty and saving dropped them. Return the headers (masked), and
extend the edit-form schema to carry headers for the url type only
(github has none).
- Add a reference-counted per-service-ID lock: create/edit/delete take
  it exclusively, refreshes take it shared. Edit and delete wait out an
  in-flight op rather than failing fast (so a background refresh can't
  bounce a user's save), then re-check the service still exists since it
  may have been renamed or deleted while waiting; create and refresh
  return 409 on conflict instead.
- Release OrderMu across the network verify so a slow CheckFetches can't
  block other services' order reads, and check the AddService error.
  Save() now holds OrderMu as a read lock while encoding.
The clients map is owned by the Run goroutine. Extract the
register/unregister/broadcast bodies into
addClient/removeClient/broadcast, and add a query channel so external
readers (tests) can observe the map on that goroutine without racing its
writes.

help_test shortens pingPeriod so writePump tests don't wait out the
production default.
Reconcile membership (drop removed ids, append new ones, keep the user's
order) instead of resetting to the server order, so a concurrent
create/delete elsewhere can't clobber a pending reorder.
Surface hooks the Playwright suite relies on:
- data-update-available on the service card
- aria-label on the resend-timer hourglass
- id on field-check inputs
Drop the hardcoded UI fallback default types from the service form
builders (latest_version, deployed_version, require.docker, webhook) in
favour of the type now carried in the defaults/hardDefaults response,
and refactor the builders to a consistent isX-type / undefined pattern.
- bump @biomejs/biome from 2.5.0 to 2.5.1
- bump @playwright/test from ^1.61.0 to ^1.61.1
- bump @tailwindcss/vite from ^4.3.1 to ^4.3.2
- bump @tanstack/react-query from ^5.101.0 to ^5.101.2
- bump @tanstack/react-query-devtools from 5.101.0 to 5.101.2
- bump @types/node from 26.0.0 to 26.0.1
- bump globals from 17.6.0 to 17.7.0
- bump lucide-react from ^1.21.0 to ^1.22.0
- bump partysocket from ^1.2.0 to ^1.3.0
- bump react-router-dom from ^7.18.0 to ^7.18.1
- bump tailwindcss from ^4.3.1 to ^4.3.2
- bump vite from 8.0.16 to 8.1.0
@JosephKav JosephKav force-pushed the test/playwright/init branch from 681af23 to 4fcf75c Compare June 30, 2026 01:26
@JosephKav JosephKav merged commit 88b26d9 into master Jun 30, 2026
8 checks passed
@JosephKav JosephKav deleted the test/playwright/init branch June 30, 2026 01:48
@JosephKav JosephKav added javascript Pull requests that update Javascript code go Pull requests that update Go code labels Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Pull requests that update Go code javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant