feat(ci): add blocking desktop E2E smoke test (MAT-135) - #174
Conversation
A new e2e-smoke CI job builds the real debug binary (tauri-plugin-pilot compiled in) with an E2E CSP overlay, launches it under xvfb with an empty temporary profile, and drives the critical path through the actual UI and Tauri IPC: paste a link served by a local deterministic fixture server (HEAD + Range/206), resolve it in the Link Grabber, start the download, wait for completion in the Downloads view, then verify the file's name, size, and SHA-256. The app is restarted to prove the completed download persists through SQLite. On failure the job uploads a screenshot, page HTML, console and app logs, and the temp profile data as diagnostic artifacts.
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
📝 WalkthroughWalkthroughAdds a deterministic desktop E2E smoke test that exercises link analysis, downloading, checksum validation, and persistence after restart. CI builds and runs the app under Xvfb, caches ChangesDesktop E2E smoke testing
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant CI
participant SmokeScript
participant TauriApp
participant FixtureServer
participant Profile
CI->>SmokeScript: Build and run smoke test
SmokeScript->>FixtureServer: Start deterministic fixture server
SmokeScript->>TauriApp: Launch isolated app
SmokeScript->>TauriApp: Analyze link and start download
TauriApp->>FixtureServer: Request fixture.bin
FixtureServer-->>TauriApp: Return 4 MiB payload
TauriApp->>Profile: Persist completed download
SmokeScript->>Profile: Verify size and SHA-256
SmokeScript->>TauriApp: Restart app
TauriApp->>Profile: Restore completed download row
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)
246-247: 📐 Maintainability & Code Quality | 🔵 TrivialConfirm this check is required for merges.
The workflow defines
E2E smoke (desktop), but it becomes blocking only when that exact check is required by the target branch’s protection rule or ruleset. The PR objective explicitly requires this external configuration.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/ci.yml around lines 246 - 247, Confirm that the exact “E2E smoke (desktop)” check from the e2e-smoke workflow is configured as a required status check in the target branch’s protection rule or ruleset, and update the external repository configuration if necessary so it blocks merges.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/e2e/smoke.sh`:
- Around line 145-148: Update the restart persistence flow around launch_app and
the subsequent wait_for assertion to explicitly navigate to the Downloads route
after restarting, before waiting for the completed download row. Preserve the
existing fixture.bin assertion and timeout behavior once the Downloads view is
active.
---
Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 246-247: Confirm that the exact “E2E smoke (desktop)” check from
the e2e-smoke workflow is configured as a required status check in the target
branch’s protection rule or ruleset, and update the external repository
configuration if necessary so it blocks merges.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7c98ef46-ba61-4b26-8033-1cc11ad38133
📒 Files selected for processing (9)
.github/workflows/ci.yml.gitignoreCHANGELOG.mdscripts/e2e/fixture-server.pyscripts/e2e/smoke.shscripts/e2e/tauri.e2e.conf.jsonsrc/views/DownloadsView/DownloadsTable.tsxsrc/views/LinkGrabberView/ActionsBar.tsxsrc/views/LinkGrabberView/PasteZone.tsx
There was a problem hiding this comment.
cubic analysis
No issues found across 9 files
Linked issue analysis
Linked issue: MAT-135: [Lot 3] Ajouter un smoke E2E desktop bloquant
| Status | Acceptance criteria | Notes |
|---|---|---|
| ✅ | R-01 — The test drives the compiled Tauri app (not a mocked frontend) | CI builds a debug binary with the pilot plugin and the smoke script launches the real debug binary and drives it via tauri-pilot. |
| ✅ | R-02 — Test starts from an empty profile and uses no external internet | smoke.sh creates an isolated temporary profile (exports HOME and XDG dirs into a mktemp dir) and the fixture server is served locally on 127.0.0.1. |
| ✅ | R-03 — The downloaded file matches expected name, size and SHA-256 | The fixture server serves a deterministic 4 MiB payload and the smoke script checks file presence, size and runs sha256sum -c against the expected SHA. |
| ✅ | R-04 — After restart the completed download remains visible with a consistent state | Downloads rows now expose data-state and data-testid; the smoke script restarts the app and waits for a download-row[data-state=Completed] and verifies the filename text. |
| R-05 — Scenario is blocking in CI and fails on IPC errors, backend panic, timeout, or incorrect content | A dedicated e2e-smoke CI job is added and will fail on errors/timeouts and upload diagnostics, but making it a blocking merge requirement (branch-protection required status check) is an external repo configuration change not performed by this PR. | |
| ✅ | R-06 — On failure logs, screenshot and profile data are uploaded as CI artifacts | The smoke script collects screenshots, HTML, console/app logs and copies profile data into e2e-artifacts on failure; the workflow uploads e2e-artifacts when the job fails. |
Closes MAT-135.
What
Adds a blocking desktop E2E smoke test that proves the critical path through the compiled Tauri app, real IPC, the Rust engine, SQLite, and the filesystem — no mocked frontend.
scripts/e2e/fixture-server.py— stdlib-only local HTTP fixture on 127.0.0.1: serves a deterministic 4 MiB/fixture.binwith HEAD, full GET, and Range/206 (the engine requires Range support).--self-testvalidates it standalone.scripts/e2e/smoke.sh— orchestrator: builds nothing itself, launches the debug binary (tauri-plugin-pilot is compiled into debug builds) with an empty temp profile, then drives the UI via tauri-pilot: paste the fixture URL in the Link Grabber, analyze, wait for the row to come online, Start All Online, wait fordata-state=Completedin the Downloads view, verify the file's name, size, and SHA-256, restart the app, and check the completed download is still visible (R-01..R-04).scripts/e2e/tauri.e2e.conf.json— CSP overlay for the E2E build only: production CSP blocksevaland canvas image loads, which tauri-pilot needs for driving and screenshots. Production config is untouched.data-testidhooks on the paste textarea, Analyze button, Start All Online button, and download rows (data-statemirrors the row state).e2e-smokeCI job (ubuntu, 30 min timeout): builds the debug binary with the overlay config, runs the smoke underxvfb-run, and on failure uploads screenshot, page HTML, console log, app logs, and the temp profile data as artifacts (R-05, R-06).Notes
mktemp -d /tmp/vxe2e.XXXXXXdir. It lives directly under /tmp because the pilot socket path is capped at ~108 bytes (SUN_LEN).XDG_RUNTIME_DIRisolation means a locally running dev instance can't collide with the test.waitcommand silently times out when the element appears after the call, so the script pollsquerySelectorviaevalinstead.tauri-pilot fillthrows on<textarea>(it uses the HTMLInputElement value setter); the paste zone is uncontrolled, so a plain value assignment works.xvfb-run(exit 0), plus a run on a real display. Failure artifacts (screenshot, HTML, logs) verified working.E2E smoke (desktop)check to the required status checks (same aschangelog-check).Out of scope (per ticket)
Exhaustive E2E of all views, tests against public hosters, 3-OS matrix.
Summary by cubic
Adds a blocking desktop E2E smoke test that drives the real Tauri app in CI to guard the download critical path. Meets Linear MAT-135 by validating the file and persistence via a local fixture and real IPC.
New Features
e2e-smokeCI job: builds the debug app withtauri-plugin-pilot, runs under Xvfb, and executes the end-to-end flow.scripts/e2e/fixture-server.pyandscripts/e2e/smoke.sh; checks name, size, SHA‑256, and post-restart visibility.data-testidhooks (paste-input,analyze-links,start-all-online,download-rowwithdata-state).Migration
Written for commit 70b36be. Summary will update on new commits.
Summary by CodeRabbit
Tests
Chores