test(e2e): cover desktop mutation smoke flow#329
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
d8a9088 to
ac7a24e
Compare
dea3cde to
daa945c
Compare
ac7a24e to
617b464
Compare
daa945c to
843a0da
Compare
617b464 to
dbf4383
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dbf4383b68
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| HOME: path.join(runtimeRoot, "home"), | ||
| XDG_CACHE_HOME: path.join(runtimeRoot, "cache"), | ||
| XDG_CONFIG_HOME: path.join(runtimeRoot, "config"), | ||
| XDG_DATA_HOME: path.join(runtimeRoot, "data"), | ||
| TMPDIR: path.join(runtimeRoot, "tmp"), |
There was a problem hiding this comment.
Redirect Windows app-data dirs for smoke mutations
When this suite is run on Windows (it only skips macOS), the app DB is resolved via app.path().app_data_dir() in src-tauri/src/lib.rs, which uses Windows app-data locations rather than HOME/XDG_*. The new create_project_from_folder smoke path writes to the database, so these env overrides still let the test create/rename a smoke project in the user's real 2code profile; include APPDATA/LOCALAPPDATA under runtimeRoot or skip Windows before running the mutation.
Useful? React with 👍 / 👎.
Merge activity
|
* perf(git): rely on watcher invalidation for refresh Co-authored-by: multica-agent <github@multica.ai> * fix(settings): retry cached ipc after failure Co-authored-by: multica-agent <github@multica.ai> * fix(notes): serialize profile autosaves Co-authored-by: multica-agent <github@multica.ai> * perf(db): index profile and pty lookup columns Co-authored-by: multica-agent <github@multica.ai> * chore(deps): resolve high audit advisories Co-authored-by: multica-agent <github@multica.ai> * ci: check website and node tooling Co-authored-by: multica-agent <github@multica.ai> * test(e2e): cover desktop mutation smoke flow Co-authored-by: multica-agent <github@multica.ai> --------- Co-authored-by: multica-agent <github@multica.ai>
|
Merged as part of the stack in #331. |

Plan 014: Add desktop mutation smoke coverage and release gate
Status
plans/013-ci-website-node-tooling-checks.md3ee5b79, 2026-06-13Why this matters
Current desktop smoke coverage mostly verifies that the app window renders. Many highest-risk flows are IPC mutations: create project/profile, interact with terminal/session state, and observe Git/file refresh. Release CI should gate on at least one real Tauri-driver mutation path so generated bindings, backend commands, DB migrations, and UI wiring are tested together.
Current state
Resolved in this checkout:
e2e-tests/test/smoke.test.mjsnow runs the app with isolated temporary HOME/XDG directories, creates a temporary git fixture, creates a project through Tauri IPC, renames it through the sidebar UI, and verifies persisted project state via Tauri IPC.workflow_call, and.github/workflows/release.ymlgates publishing on that Linux smoke workflow.e2e-tests/README.mddocuments the mutation coverage, isolated runtime data, local Linux command, and release gate.Relevant files:
e2e-tests/test/smoke.test.mjs— Mocha/Selenium/Tauri driver smoke tests.e2e-tests/README.md— local e2e instructions..github/workflows/tauri-smoke.yml— smoke workflow using virtual display/Tauri driver..github/workflows/release.yml— release workflow.Current excerpt:
smoke.test.mjshas basic render assertions around app shell; it does not create/delete project/profile or exercise terminal/Git mutations.Commands you will need
cd e2e-tests && bun install --frozen-lockfile && bun teste2e-tests/README.mdbun run lint:check && ./node_modules/.bin/tsc --noEmit && cargo test --manifest-path src-tauri/Cargo.tomlScope
In scope:
Out of scope:
Git workflow
Branch
advisor/014-desktop-mutation-smoke; committest(e2e): cover desktop mutation smoke flow.Steps
Step 1: Choose the smallest reliable mutation flow
Prefer this flow:
If profile creation is flaky in CI, use project create/delete plus a simple file-tree operation instead.
Verify: local e2e command passes repeatedly twice.
Step 2: Add selectors/test hooks only where necessary
If UI lacks stable selectors, add minimal
data-testid/accessible labels in source components. Prefer accessible roles/names over implementation-specific CSS selectors.Verify: app frontend tests/typecheck pass if source changed.
Step 3: Wire smoke into release gating
Ensure
.github/workflows/release.ymlrequires the smoke workflow/job before packaging/publishing, or documents that release is blocked by required GitHub checks. If usingworkflow_run, make the dependency explicit and maintainable.Verify: workflow syntax is valid; local equivalent commands pass.
Step 4: Update docs
Update
e2e-tests/README.mdwith exact local commands and any required system services (xvfb, Tauri driver, WebKit driver).Verify: commands in docs match actual package scripts.
Test plan
Done criteria
STOP conditions
Maintenance notes
Keep smoke tests short and deterministic. Add broader exploratory coverage separately; this plan is for release confidence, not exhaustive QA.