diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e4e72c..756b914 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ on: push: branches: [main] pull_request: - branches: [main] + branches: [main, fix/color-conversion-safety] jobs: lint: @@ -42,3 +42,16 @@ jobs: cache: 'npm' - run: npm ci - run: npm run test + + e2e: + name: Browser conversion regressions + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + - run: npm ci + - run: npx playwright-core install --with-deps chromium + - run: npm run test:e2e diff --git a/README.md b/README.md index 57f521d..27ea2f3 100644 --- a/README.md +++ b/README.md @@ -159,3 +159,9 @@ Made with ❤️ using [Nuxt](https://nuxt.com) and [culori](https://culorijs.or ## Batch conversion boundaries Batch conversion parses CSS and brace-based SCSS declarations, including nested rules and SCSS variable values. Selectors, comments, strings, URLs, and interpolation spans are preserved. Indented `.sass` is not supported; export it as `.scss` or CSS first. Literal colors alongside interpolation and inside var()/env() fallbacks are converted. Invalid stylesheets show an error instead of producing a partially converted file. Parsing and conversion run in a cancellable Web Worker, and stale results are discarded when files or settings change. + +## Browser regression suite + +Install Chromium with `npx playwright-core install --with-deps chromium`, then run `npm run test:e2e`. Browser tests run in Vitest's Node environment against the built app, using real input/conversion/worker/upload/download flows. A controlled worker stub is used only to deterministically deliver a late stale result after reset; conversion/download assertions use the real worker. CI runs the browser suite for main-target and stacked fixes-target PRs. + +This E2E branch is stacked on `fix/color-conversion-safety`; review and merge the functional fixes first. Local browser execution may require network access for the Playwright browser download. diff --git a/app/components/color/FormatCard.vue b/app/components/color/FormatCard.vue index 8dc377b..d092dc5 100644 --- a/app/components/color/FormatCard.vue +++ b/app/components/color/FormatCard.vue @@ -40,6 +40,7 @@ async function copyToClipboard() {