chore: setup testing frameworks #19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude/setup-testing-framework-01P3F7RUyGNimJM32YiSAGxm"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Deploying with
Cloudflare Workers
The latest updates on your project. Learn more about integrating Git with Workers.
View logs
1f75271bBranch Preview URL
Changes Requested
Please address the following before merging:
.github/workflows/ci.yml: Make Playwright installation robustnpx playwright install-deps(system packages) unconditionally as its own step before E2E tests.npx playwright install --with-deps chromium firefox webkit(keep the cache step).~/.cache/ms-playwright) + key are correct so browser downloads are cached.playwright.config.ts: CI stability improvementswebServer.timeoutfrom120000to at least180000(300000 recommended for slow runners).use(e.g.launchOptions: { args: ['--no-sandbox', '--disable-dev-shm-usage'] }) to reduce sandbox/runner failures.E2E test robustness (
tests/e2e/theme-selector.spec.ts/src/components/react/ThemeSelector.tsx)data-testid="theme-selector-button") and use that in tests instead of relying on the exact accessible nameSelect theme./) or updatepage.goto()to the correct page where the component exists.role="menu"/role="menuitem") or update tests to select by stable attributes.Summary of Changes
unit-testsande2e-testsin.github/workflows/ci.yml.playwright.config.tswith multi-browser projects, HTML reporter (playwright-report), and webServer settings.vitest.config.tsand test setuptests/setup.ts.tests/e2e/theme-selector.spec.tsand unit teststests/unit/*for theme manager and themes.package.jsonscripts and devDependencies to include Vitest, Playwright, testing-library, and related tooling.src/pages/ui-preview.astroheading class changes andThemeSelector.tsxbackdropdata-testidadded.Overall Feedback
Negative:
webServer.timeoutis low for slower runners./. That will lead to false negatives as UI copy or routes change.Positive:
playwright.config.tsandvitest.config.ts, and providing focused tests for the theme system is excellent work and will significantly improve confidence once the CI flow is hardened. Great job! 🚀@Pertempto — after you push the CI install/deps fix and add a stable test selector (or update the tests to use it), I will re-run the review focused on remaining flakiness.
File:
.github/workflows/ci.ymlInstall step currently uses
npx playwright install --with-deps(good), but be explicit about the browsers you expect to run in CI so it's robust if config changes. Replace with or add an explicit install:npx playwright install --with-deps chromium firefox webkitConsider caching Playwright browser downloads to speed CI. Example cache step (insert before
Install Playwright browsers):Confirm the artifact upload path
playwright-report/matches the Playwrightreporteroutput folder inplaywright.config.ts. If you rely on the default HTML reporter, make the reporter explicit in the config:[['html', { outputFolder: 'playwright-report' }]]so the artifact step always finds the report.tests/e2e/theme-selector.spec.ts— tests depend ongetByRole('button', { name: 'Select theme' }). That label is brittle and will break if copy or i18n changes. Please either:data-testid="theme-selector-button") and update tests to usegetByTestId, orAdding a testid is the safest short-term fix.