Repository navigation
Feat/e2e testing - #47
Merged
Merged
Conversation
…kspace modules - commands.rs: 18 tests covering CRUD, search, scan, stats, delete - trash.rs: 12 tests covering manifest, move/restore/delete/empty - workspace.rs: 7 new tests for validation, nested scan, sort order Total: 41 Rust tests passing
- Configure vitest with jsdom environment and Tauri API mocks - SearchPanel: 8 tests (rendering, search input, close, results) - EditorTabs: 10 tests (tab names, clicks, sidebar toggle, fullscreen) - WorkspaceWelcome: 8 tests (brand, actions, recents, keyboard hint) - Add test:rust, test:ui, test:ui:watch scripts to package.json Total: 26 component tests passing
37 testids added across: - WorkspaceWelcome (welcome-page, welcome-create-new, etc.) - MainLayout (main-layout, sidebar, editor-area) - FileExplorer (file-explorer, explorer-search, file-tree, etc.) - EditorTabs (editor-tabs, editor-tab, new-tab-button, etc.) - EditorPane (editor-pane) - EditorHeader (editor-header, undo-button, redo-button, preview-toggle) - SearchPanel (search-backdrop, search-modal, search-input, etc.)
- Upgrade playwright.config.ts: CI reporters, trace/video/screenshot - Add shared helpers (resetApp, locators, utility functions) - smoke.spec.ts: 5 tests (load, title, CSS vars, console, render) - welcome.spec.ts: 9 tests (brand, buttons, descriptions, hints) - layout.spec.ts: 10 tests (sidebar, editor, explorer, toolbar) - editor.spec.ts: 10 tests (tabs, new tab, toggle, header, undo/redo) - search.spec.ts: 8 tests (modal, shortcuts, input, close, backdrop) - Update .gitignore with Playwright output directories
Separate test pipeline running in parallel: - Rust backend tests (cargo test, no node setup needed) - React component tests (vitest, needs node_modules) - Playwright E2E tests (with browser install and report artifact) - Gate job to verify all test jobs pass Existing ci.yml remains unchanged for build checks.
- ci.yml -> build.yml (lint, typecheck, prettier, vite/tauri build) - setup.yml -> node-setup.yml (reusable npm ci + cache) - Update all internal references
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Full testing infrastructure for Cinder-notes across three tiers: Rust backend unit tests, React component tests, and Playwright end-to-end tests.
Related issue
#46
Commits
bd82f51test(rust): add comprehensive unit tests for commands, trash, and workspace modules
43730bbtest(react): add Vitest + React Testing Library component tests
0604fc3chore: add data-testid attributes to 7 components for E2E testing
fa87702test(e2e): add Playwright E2E test suite with 42 tests across 6 specs
7d89ef6ci: add tests.yml workflow for Rust, React, and Playwright tests
fae49baci: rename workflow files for clarity
Rust Backend Tests (41 tests)
Unit tests added directly within each module behind
#[cfg(test)], usingtempfilefor isolated filesystem testing.read_note,write_note,create_note,rename_note,create_folder,scan_workspace,search_workspace,workspace_stats,delete_note,delete_foldermove_to_trash(file and folder),restore_item,delete_item,empty_allvalidate_workspace_path, nested directory scanning, sort order (folders first, alphabetical within type), hidden directory and non-markdown file exclusionReact Component Tests (26 tests)
Vitest + React Testing Library + jsdom. Tauri APIs are fully mocked in a shared setup file.
Playwright E2E Tests (42 tests)
Browser-based tests running against the Vite dev server. All selectors use
data-testidattributes.CI Changes
Workflow files renamed for clarity and a new test pipeline added:
build.yml(was
ci.yml)
Build
Lint, typecheck, prettier, Vite build, Tauri build
tests.ymlTests
Rust tests, React component tests, Playwright E2E (parallel)
node-setup.yml(was
setup.yml)
Node Setup
Reusable
npm ci+
node_modulescache
The Playwright job uploads the HTML report as a GitHub artifact (14-day retention) for failure inspection.
npm Scripts
test:rustcargo test --manifest-path src-tauri/Cargo.tomltest:uivitest run --config vitest.config.tstest:ui:watchvitest --config vitest.config.tstest:e2enpx playwright testtest:e2e:uinpx playwright test --ui