Skip to content

Add E2E tests with Playwright#5

Merged
Tiryoh merged 2 commits intomainfrom
add-e2e-tests
Mar 18, 2026
Merged

Add E2E tests with Playwright#5
Tiryoh merged 2 commits intomainfrom
add-e2e-tests

Conversation

@Tiryoh
Copy link
Copy Markdown
Owner

@Tiryoh Tiryoh commented Mar 7, 2026

Summary

  • Add Playwright E2E test suite (42 test cases) covering all UI functionality as a regression safety net for upcoming component refactoring
  • Add CI workflow job (e2e) to run Playwright tests on PRs with report upload on failure
  • Include test fixture .bag file generated via Docker + ROS Noetic, with generation script for reproducibility

Test coverage

Area Cases What's tested
Initial page 5 Title, upload area, hidden filters/table, footer
File upload 3 Rosout load, diagnostics detection, tab display
Rosout filters 8 Severity, node, keyword, regex, AND/OR, clear, select all
Rosout statistics 4 Show/hide stats, severity counts, top nodes
Rosout export 3 CSV, JSON, TXT download
Rosout table 5 Headers, rows, preview limit, timezone, color coding
Diagnostics tab 6 Tab switch, filters (level, name, keyword), clear
Diagnostics table 5 Headers, row expand/collapse, preview limit, timezone
Diagnostics export 3 CSV, JSON, TXT download

Test plan

  • npm run test:e2e — 42/42 passed (13.7s)
  • npm run test — 40/40 unit tests passed
  • npm run build — Build successful

🤖 Generated with Claude Code

Set up Playwright with 42 test cases covering all UI functionality:
- File upload, rosout/diagnostics tab switching
- Filter panel (severity, node, keyword, regex, AND/OR mode)
- Statistics panel, export (CSV/JSON/TXT), message table
- Diagnostics table with row expand/collapse
- Timezone toggle and preview limit controls

Include test fixture (.bag file) generated via Docker + ROS Noetic,
with the generation script for reproducibility.

Add e2e job to CI workflow with Playwright report upload on failure.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 7, 2026

Test Results

40 tests  ±0   40 ✅ ±0   0s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 2478d72. ± Comparison against base commit 5c0dba2.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 7, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an end-to-end (E2E) Playwright test suite to provide UI regression coverage ahead of upcoming refactors, and wires it into CI.

Changes:

  • Introduces Playwright configuration and an npm run test:e2e script.
  • Adds a comprehensive E2E spec plus a committed rosbag fixture and a reproducible generation script.
  • Updates CI workflow to run E2E tests and upload the Playwright HTML report on failures.

Reviewed changes

Copilot reviewed 7 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
vite.config.ts Excludes e2e/** from Vitest test discovery so unit tests don’t pick up Playwright specs.
playwright.config.ts Adds Playwright runner configuration (testDir, webServer, retries/workers in CI).
package.json Adds Playwright dependency and test:e2e script.
package-lock.json Locks Playwright-related dependencies.
e2e/app.spec.ts Adds the Playwright E2E test suite covering main UI flows.
e2e/fixtures/test_sample.bag Adds a small rosbag fixture used by E2E tests.
e2e/fixtures/generate_test_bag.py Adds a script to regenerate the rosbag fixture (Docker/ROS Noetic).
.github/workflows/test.yml Adds an e2e CI job to run Playwright tests and upload report on failure; updates path filters.
.gitignore Ignores Playwright output directories (test-results/, playwright-report/).
.eslintignore Excludes Playwright/E2E files from ESLint runs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 4 to 11
push:
paths:
- 'src/**'
- 'e2e/**'
- 'playwright.config.ts'
- 'package.json'
- 'package-lock.json'
- '.github/workflows/test.yml'
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow is path-filtered, but changes to vite.config.ts (which controls Vitest behavior) will not trigger this workflow. Consider adding vite.config.ts to the on.push.paths list so CI runs when test/build configuration changes.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 2478d72

  • Added vite.config.ts to both on.push.paths and on.pull_request.paths

paths:
- 'src/**'
- 'e2e/**'
- 'playwright.config.ts'
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, vite.config.ts changes will not trigger the workflow on pull requests due to the current paths filter. Consider including vite.config.ts in on.pull_request.paths to avoid missing CI runs when test/build config is updated.

Suggested change
- 'playwright.config.ts'
- 'playwright.config.ts'
- 'vite.config.ts'

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 2478d72

  • Added vite.config.ts to both on.push.paths and on.pull_request.paths

@Tiryoh Tiryoh merged commit 3dce607 into main Mar 18, 2026
6 checks passed
@Tiryoh Tiryoh deleted the add-e2e-tests branch March 18, 2026 13:35
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.

2 participants