Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ jobs:
- name: Visual regression test
run: node --run visual

- name: Upload test failure artifacts
if: failure()
uses: actions/upload-artifact@v7
with:
name: test-artifacts
path: |
test/browser/**/__screenshots__/**
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we add visual screenshots and failed screenshots in the same directory? Wonder if we should change screenshotDirectory for browser tests? I think we may have to upload https://vitest.dev/guide/cli.html#attachmentsdir. Can you check if the diff screenshots are uploaded

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we add visual screenshots and failed screenshots in the same directory?

This only captures screenshots from failed tests (test/browser), this won't upload screenshots from visual tests (tests/visual).

Wonder if we should change screenshotDirectory for browser tests?

No need, we can already target them with the test/browser path.

I think we may have to upload https://vitest.dev/guide/cli.html#attachmentsdir

Done

Can you check if the diff screenshots are uploaded

It does now.
https://github.com/Comcast/react-data-grid/actions/runs/22916570893/artifacts/5855351059

test/browser/**/__traces__/**
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
test/browser/**/__traces__/**

Do we generate traces?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not. I kept it in case we ever want to enable and debug them.

.vitest-attachments/test/**/*
if-no-files-found: ignore

- name: Upload coverage
uses: codecov/codecov-action@v5
with:
Expand Down
3 changes: 1 addition & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ export default defineConfig(
commands: { resizeColumn, dragFill },
viewport,
headless: true,
ui: false,
screenshotFailures: !isCI
ui: false
},
setupFiles: ['test/browser/styles.css', 'test/setupBrowser.ts', 'test/failOnConsole.ts']
}
Expand Down
Loading