From e441c899affa730adf8ebca796f4ab3fddda69fc Mon Sep 17 00:00:00 2001 From: pablonyx Date: Sun, 16 Feb 2025 13:03:45 -0800 Subject: [PATCH] Playwright + Chromatic update (#4015) --- ...atic-tests.yml => pr-playwright-tests.yml} | 88 ++++++++++--------- web/playwright.config.ts | 2 +- 2 files changed, 47 insertions(+), 43 deletions(-) rename .github/workflows/{pr-chromatic-tests.yml => pr-playwright-tests.yml} (84%) diff --git a/.github/workflows/pr-chromatic-tests.yml b/.github/workflows/pr-playwright-tests.yml similarity index 84% rename from .github/workflows/pr-chromatic-tests.yml rename to .github/workflows/pr-playwright-tests.yml index 79de81da848..baa636f14d3 100644 --- a/.github/workflows/pr-chromatic-tests.yml +++ b/.github/workflows/pr-playwright-tests.yml @@ -1,6 +1,6 @@ -name: Run Chromatic Tests +name: Run Playwright Tests concurrency: - group: Run-Chromatic-Tests-${{ github.workflow }}-${{ github.head_ref || github.event.workflow_run.head_branch || github.run_id }} + group: Run-Playwright-Tests-${{ github.workflow }}-${{ github.head_ref || github.event.workflow_run.head_branch || github.run_id }} cancel-in-progress: true on: push @@ -198,43 +198,47 @@ jobs: cd deployment/docker_compose docker compose -f docker-compose.dev.yml -p danswer-stack down -v - chromatic-tests: - name: Chromatic Tests - - needs: playwright-tests - runs-on: - [ - runs-on, - runner=32cpu-linux-x64, - disk=large, - "run-id=${{ github.run_id }}", - ] - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Setup node - uses: actions/setup-node@v4 - with: - node-version: 22 - - - name: Install node dependencies - working-directory: ./web - run: npm ci - - - name: Download Playwright test results - uses: actions/download-artifact@v4 - with: - name: test-results - path: ./web/test-results - - - name: Run Chromatic - uses: chromaui/action@latest - with: - playwright: true - projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} - workingDir: ./web - env: - CHROMATIC_ARCHIVE_LOCATION: ./test-results +# NOTE: Chromatic UI diff testing is currently disabled. +# We are using Playwright for local and CI testing without visual regression checks. +# Chromatic may be reintroduced in the future for UI diff testing if needed. + +# chromatic-tests: +# name: Chromatic Tests + +# needs: playwright-tests +# runs-on: +# [ +# runs-on, +# runner=32cpu-linux-x64, +# disk=large, +# "run-id=${{ github.run_id }}", +# ] +# steps: +# - name: Checkout code +# uses: actions/checkout@v4 +# with: +# fetch-depth: 0 + +# - name: Setup node +# uses: actions/setup-node@v4 +# with: +# node-version: 22 + +# - name: Install node dependencies +# working-directory: ./web +# run: npm ci + +# - name: Download Playwright test results +# uses: actions/download-artifact@v4 +# with: +# name: test-results +# path: ./web/test-results + +# - name: Run Chromatic +# uses: chromaui/action@latest +# with: +# playwright: true +# projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} +# workingDir: ./web +# env: +# CHROMATIC_ARCHIVE_LOCATION: ./test-results diff --git a/web/playwright.config.ts b/web/playwright.config.ts index fa9e69483d0..3782de89263 100644 --- a/web/playwright.config.ts +++ b/web/playwright.config.ts @@ -23,7 +23,7 @@ export default defineConfig({ viewport: { width: 1280, height: 720 }, storageState: "admin_auth.json", }, - testIgnore: ["**/codeUtils.test.ts"], + testIgnore: ["**/codeUtils.test.ts", "**/chat/**/*.spec.ts"], }, ], });