Skip to content

Add browser test of the ViSR UI and a -browser image - #3

Open
gilesknap wants to merge 1 commit into
blueapi-scansfrom
sci-ui-tests
Open

gilesknap wants to merge 1 commit into
blueapi-scansfrom
sci-ui-tests

Conversation

@gilesknap

Copy link
Copy Markdown
Contributor

Stacked on #2.

  • ui/spectroscopy: drives the ViSR web UI (b01-1-sci-ui) in headless Chromium with Playwright. Checks the blueapi worker is idle, submits a spectroscopy scan with the UI defaults, waits for "Plan succeeded" and confirms the task via blueapi; aborts only its own task on failure; saves a screenshot on failure.
  • Auth: the client_credentials token is sent as a bearer header only to the UI's own origin. The sci-ui oauth2-proxy needs skip_jwt_bearer_tokens and extra_jwt_issuers (see README).
  • New -browser image target on the Playwright base with a ui extra, built by the same CI; the existing image is unchanged.
  • Container tags: pre-release tags (containing -) no longer move latest / latest-browser.
  • Tests run the check against the real SPA (atlas visr@0.5.4-auth-test-10) with fake backends; they skip in CI and run locally per README.

Intended to run as a b01-1-nightly-ui CronJob at 03:00.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AnYWTg1W6CEzGFkugPgeUa

ui/spectroscopy drives the ViSR web UI in headless Chromium with
Playwright: it checks the blueapi worker is idle, submits a spectroscopy
scan with the UI defaults, waits for it to finish and confirms the task
through blueapi, aborting its own task on failure. It authenticates with
the client_credentials token as a bearer header, sent only to the UI's
own origin; the sci-ui oauth2-proxy needs skip_jwt_bearer_tokens and
extra_jwt_issuers for this.

A second image target, tagged -browser, is built on the Playwright base
with the new ui extra. Pre-release tags no longer move latest or
latest-browser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AnYWTg1W6CEzGFkugPgeUa
@codecov

codecov Bot commented Oct 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 34.55657% with 214 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.01%. Comparing base (70289d6) to head (f22aada).

Files with missing lines Patch % Lines
src/visr_tests/browser.py 26.38% 173 Missing ⚠️
src/visr_tests/ui/spectroscopy.py 30.00% 28 Missing ⚠️
src/visr_tests/conftest.py 55.55% 12 Missing ⚠️
src/visr_tests/services.py 96.00% 1 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##           blueapi-scans       #3       +/-   ##
==================================================
- Coverage          90.90%   67.01%   -23.90%     
==================================================
  Files                 13       15        +2     
  Lines                451      764      +313     
==================================================
+ Hits                 410      512      +102     
- Misses                41      252      +211     

☔ 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.

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.

1 participant