Skip to content

Add CI with browser tests - #30

Merged
2SikNinja merged 3 commits into
masterfrom
browser-tests-ci
Nov 17, 2026
Merged

2SikNinja merged 3 commits into
masterfrom
browser-tests-ci

Conversation

@2SikNinja

Copy link
Copy Markdown
Owner

Pickify had no CI. This adds a GitHub Actions workflow that runs on every pull request and every push to master, with two jobs:

  • Typecheck, lint and unit tests: generates Next's route types, then runs tsc, ESLint and Vitest.
  • Browser tests: builds the app and runs Playwright in Chromium on a desktop and a phone-sized screen. When they fail, the HTML report, screenshots and traces are uploaded to the run.

The browser tests (e2e/) run against a production build with every /api call answered by a fake API in the browser and a stand-in YouTube player. They need no database, Last.fm or YouTube, and use made-up songs with no covers. They check:

  • A full session: search, choosing Quick and 25 songs, picking two songs in each of three rounds, landing on the playlist, and what's sent to the API.
  • None of these swaps the round and clears picks; Not for me is sent with the pick.
  • Playing on the page, pausing, and skipping keep the player's buttons in sync.
  • Removing a song and Undo.
  • The YouTube links are prepared as the playlist opens.
  • The volume is remembered after a reload (desktop only, phones hide the slider).
  • The home, round and playlist pages never scroll sideways.

New npm script: npm run testBrowser. New dev dependency: @playwright/test. README has a section on running them.

Testing: all 15 browser tests pass locally (16 with one skipped on phones), and three repeated runs were stable. Typecheck, lint and all 168 unit tests pass. This PR's own CI run is the first real run of the workflow.


Generated by Claude Code

@2SikNinja
2SikNinja merged commit c81ca5e into master Nov 17, 2026
4 checks passed
@2SikNinja
2SikNinja deleted the browser-tests-ci branch November 17, 2026 09:15
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.

1 participant