Skip to content

Add unit tests, Playwright e2e tests, and CI workflow#151

Draft
Copilot wants to merge 4 commits intostagingfrom
copilot/add-unit-tests
Draft

Add unit tests, Playwright e2e tests, and CI workflow#151
Copilot wants to merge 4 commits intostagingfrom
copilot/add-unit-tests

Conversation

Copy link
Contributor

Copilot AI commented Feb 11, 2026

Adds vitest-based unit test infrastructure and Playwright end-to-end tests, with a GitHub Actions workflow to run both automatically.

Unit test coverage (42 tests)

  • src/lib/utils.tsisValidUrl, formatMinutes, calculateMarketPrice, getProjectLinkType (all editor type detection paths including onshape, fusion, blender, freecad, solvespace)
  • src/lib/currency.tsminutesToClay, minutesToBricks, calculateShopScore, calculateMinutes, calculateCurrencyPayout, calculatePayouts (pre/post beta cutoff, base printer logic, multipliers)

Playwright e2e tests (8 tests)

  • e2e/home.test.ts — homepage heading/content, login button, FAQ section, footer
  • e2e/approved-editors.test.ts — page heading, all editors listed, back link, no TinkerCAD notice

CI

  • .github/workflows/test.yml — separate unit and e2e jobs (e2e depends on unit passing), Node 22, explicit contents: read permissions, Playwright report uploaded as artifact

Scripts

  • npm test — run vitest unit tests
  • npm run test:e2e — run Playwright e2e tests
  • npm run test:all — run both vitest and Playwright

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 11, 2026 23:08
Co-authored-by: ArcaEge <40526225+ArcaEge@users.noreply.github.com>
Co-authored-by: ArcaEge <40526225+ArcaEge@users.noreply.github.com>
Copilot AI changed the title [WIP] Add unit tests for existing code Add unit tests and CI workflow Feb 11, 2026
Copilot AI requested a review from ArcaEge February 11, 2026 23:13
@ArcaEge
Copy link
Collaborator

ArcaEge commented Feb 11, 2026

@copilot use playwright instead and/or alongside

Co-authored-by: ArcaEge <40526225+ArcaEge@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 11, 2026

@copilot use playwright instead and/or alongside

Added Playwright alongside vitest in b35b0e1. The setup includes:

  • @playwright/test as a dev dependency
  • playwright.config.ts — builds + previews the app, runs tests from e2e/
  • e2e/home.test.ts — 4 tests for homepage content, login button, FAQ, footer
  • e2e/approved-editors.test.ts — 4 tests for the approved editors page
  • Scripts: test:e2e (playwright only), test:all (vitest + playwright)
  • CI workflow updated with separate unit and e2e jobs (e2e depends on unit passing first, uploads Playwright report as artifact)

Copilot AI changed the title Add unit tests and CI workflow Add unit tests, Playwright e2e tests, and CI workflow Feb 11, 2026
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

Comments