Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
9ce685d
feat(visual-testing): add Playwright visual testing suite with R2 bas…
caio-pizzol Feb 11, 2026
ce2a924
ci: add visual testing PR validation and baseline workflows (SD-1867)
caio-pizzol Feb 11, 2026
480a366
fix(visual-testing): add html reporter for CI artifact upload
caio-pizzol Feb 11, 2026
7e2db4d
ci: add temporary workflow to seed Linux baselines in R2
caio-pizzol Feb 11, 2026
a449ee6
ci: remove temporary seed workflow
caio-pizzol Feb 11, 2026
1bd0b1b
ci(visual-testing): build baselines from stable branch
caio-pizzol Feb 11, 2026
be1ab69
ci: remove temporary seed workflow
caio-pizzol Feb 11, 2026
45f2a52
perf(visual-testing): increase Playwright workers to 4
caio-pizzol Feb 11, 2026
23a3e01
chore(visual-testing): add @behavior label to behavior tests
caio-pizzol Feb 11, 2026
313e19a
ci(visual-testing): add Playwright sharding across 4 CI runners
caio-pizzol Feb 11, 2026
f553fb5
ci(visual-testing): split setup from test shards to avoid redundant b…
caio-pizzol Feb 11, 2026
0a4f10b
ci(visual-testing): revert sharding, use single runner with 8 workers
caio-pizzol Feb 11, 2026
eb96b3e
feat(visual-testing): add 6 behavior tests ported from devtools suite
caio-pizzol Feb 11, 2026
5fefffd
feat(visual-testing): add 5 more behavior tests, organize into catego…
caio-pizzol Feb 11, 2026
5e66db9
docs(visual-testing): add developer-focused README for test suite
caio-pizzol Feb 11, 2026
86fdb7c
docs(visual-testing): add CLAUDE.md and AGENTS.md for agent guidance
caio-pizzol Feb 11, 2026
33f17e9
feat(visual-testing): port all devtools stories and add R2 doc download
caio-pizzol Feb 11, 2026
151be74
refactor(visual-testing): unify R2 into single bucket with mirrored p…
caio-pizzol Feb 11, 2026
941aa2f
chore(visual-testing): temp baseline seeding from branch, remove migr…
caio-pizzol Feb 11, 2026
3c5657f
chore(visual-testing): add temp seed workflow, revert baseline to stable
caio-pizzol Feb 11, 2026
9bae466
chore: trigger seed on push to this branch
caio-pizzol Feb 11, 2026
20614d6
fix(visual): remove argos, fix failing tests, parallelize downloads
caio-pizzol Feb 11, 2026
54d57a1
fix(visual): limit screenshotPages for large docs, add maxPages param
caio-pizzol Feb 11, 2026
41b6327
chore: update lock file
caio-pizzol Feb 11, 2026
2715b40
chore: move concurrency to 10
caio-pizzol Feb 11, 2026
a26304b
test(visual): mark flaky sdt-lock-modes as fixme
caio-pizzol Feb 11, 2026
6ed7ad0
chore: remove temporary visual seed workflow
caio-pizzol Feb 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .github/workflows/visual-baseline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Visual Baselines

permissions:
contents: read

on:
workflow_dispatch:
workflow_call:

concurrency:
group: visual-baseline
cancel-in-progress: false

jobs:
update:
runs-on: ubuntu-24.04
env:
SD_VISUAL_TESTING_R2_ACCOUNT_ID: ${{ secrets.SD_VISUAL_TESTING_R2_ACCOUNT_ID }}
SD_VISUAL_TESTING_R2_ACCESS_KEY_ID: ${{ secrets.SD_VISUAL_TESTING_R2_ACCESS_KEY_ID }}
SD_VISUAL_TESTING_R2_SECRET_ACCESS_KEY: ${{ secrets.SD_VISUAL_TESTING_R2_SECRET_ACCESS_KEY }}
SD_VISUAL_TESTING_R2_BUCKET: ${{ secrets.SD_VISUAL_TESTING_R2_BUCKET }}
steps:
- uses: actions/checkout@v6
with:
ref: stable

- name: Get visual test infrastructure from main
run: |
git fetch origin main --depth=1
git checkout FETCH_HEAD -- tests/visual
sed -i '/^packages:/a\ - tests/visual' pnpm-workspace.yaml

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: pnpm

- name: Install dependencies
run: pnpm install --ignore-scripts --no-frozen-lockfile

- name: Build SuperDoc
run: pnpm build

- name: Get Playwright version
id: pw
run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT
working-directory: tests/visual

- name: Cache Playwright browsers
uses: actions/cache@v5
id: pw-cache
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ steps.pw.outputs.version }}

- name: Install Playwright browsers
if: steps.pw-cache.outputs.cache-hit != 'true'
run: pnpm exec playwright install --with-deps chromium firefox webkit
working-directory: tests/visual

- name: Install Playwright system deps
if: steps.pw-cache.outputs.cache-hit == 'true'
run: pnpm exec playwright install-deps chromium firefox webkit
working-directory: tests/visual

- name: Download test documents from R2
run: pnpm docs:download
working-directory: tests/visual

- name: Generate baselines
run: pnpm test:update
working-directory: tests/visual

- name: Upload baselines to R2
run: pnpm baseline:upload
working-directory: tests/visual
79 changes: 79 additions & 0 deletions .github/workflows/visual-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Visual Tests

permissions:
contents: read

on:
pull_request:
branches: [main]
workflow_dispatch:

concurrency:
group: visual-test-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

jobs:
visual:
runs-on: ubuntu-latest
env:
SD_VISUAL_TESTING_R2_ACCOUNT_ID: ${{ secrets.SD_VISUAL_TESTING_R2_ACCOUNT_ID }}
SD_VISUAL_TESTING_R2_ACCESS_KEY_ID: ${{ secrets.SD_VISUAL_TESTING_R2_ACCESS_KEY_ID }}
SD_VISUAL_TESTING_R2_SECRET_ACCESS_KEY: ${{ secrets.SD_VISUAL_TESTING_R2_SECRET_ACCESS_KEY }}
SD_VISUAL_TESTING_R2_BUCKET: ${{ secrets.SD_VISUAL_TESTING_R2_BUCKET }}
steps:
- uses: actions/checkout@v6

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: pnpm

- name: Install dependencies
run: pnpm install --ignore-scripts

- name: Build SuperDoc
run: pnpm build

- name: Get Playwright version
id: pw
run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT
working-directory: tests/visual

- name: Cache Playwright browsers
uses: actions/cache@v5
id: pw-cache
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ steps.pw.outputs.version }}

- name: Install Playwright browsers
if: steps.pw-cache.outputs.cache-hit != 'true'
run: pnpm exec playwright install --with-deps chromium firefox webkit
working-directory: tests/visual

- name: Install Playwright system deps
if: steps.pw-cache.outputs.cache-hit == 'true'
run: pnpm exec playwright install-deps chromium firefox webkit
working-directory: tests/visual

- name: Download baselines from R2
run: pnpm baseline:download
working-directory: tests/visual

- name: Download test documents from R2
run: pnpm docs:download
working-directory: tests/visual

- name: Run visual tests
run: pnpm test
working-directory: tests/visual

- name: Upload report
if: always()
uses: actions/upload-artifact@v4
with:
name: visual-test-report
path: tests/visual/playwright-report/
retention-days: 14
2 changes: 2 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ packages/
collaboration-yjs/ Collaboration server
shared/ Internal utilities
e2e-tests/ Playwright tests
tests/visual/ Visual regression tests (Playwright + R2 baselines)
```

## Where to Look
Expand All @@ -62,6 +63,7 @@ e2e-tests/ Playwright tests
| DOCX import/export | `super-editor/src/core/super-converter/` |
| Style resolution | `layout-engine/style-engine/` |
| Main entry point (Vue) | `superdoc/src/SuperDoc.vue` |
| Visual regression tests | `tests/visual/` (see its CLAUDE.md) |

## Style Resolution Boundary

Expand Down
Loading
Loading