Add unit tests, Playwright e2e tests, and CI workflow#151
Draft
Add unit tests, Playwright e2e tests, and CI workflow#151
Conversation
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
Collaborator
|
@copilot use playwright instead and/or alongside |
Co-authored-by: ArcaEge <40526225+ArcaEge@users.noreply.github.com>
Contributor
Author
Added Playwright alongside vitest in
|
Copilot
AI
changed the title
Add unit tests and CI workflow
Add unit tests, Playwright e2e tests, and CI workflow
Feb 11, 2026
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.
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.ts—isValidUrl,formatMinutes,calculateMarketPrice,getProjectLinkType(all editor type detection paths including onshape, fusion, blender, freecad, solvespace)src/lib/currency.ts—minutesToClay,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, footere2e/approved-editors.test.ts— page heading, all editors listed, back link, no TinkerCAD noticeCI
.github/workflows/test.yml— separateunitande2ejobs (e2e depends on unit passing), Node 22, explicitcontents: readpermissions, Playwright report uploaded as artifactScripts
npm test— run vitest unit testsnpm run test:e2e— run Playwright e2e testsnpm 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.