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
42 changes: 42 additions & 0 deletions .github/workflows/pr-visual-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: PR Visual Tests

on:
pull_request:

jobs:
visual_tests:
name: Visual Tests
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.51.1-jammy
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install Packages
run: npm ci
- name: Run Visual Tests
run: npm run playwright
env:
CI: 'true'
- name: Upload Playwright Report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: ./playwright-report
retention-days: 1
- name: Save PR ID
if: always()
run: |
pr="${{ github.event.pull_request.number }}"
echo $pr > ./pr-id.txt
shell: bash
- name: Create PR Artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: pr
path: ./pr-id.txt
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ docs/diplodoc/pages/api
storybook-static
.cache
.tmp
playwright-report
playwright-report-docker
playwright/.cache-docker
test-results
14 changes: 1 addition & 13 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,11 @@ const esModules = [
].join('|');

module.exports = {
// verbose: true,
// preset: 'ts-jest',
// testEnvironment: 'jsdom',
// transform: {
// '^.+\\.(js|ts)?$': 'ts-jest',
// },
// modulePathIgnorePatterns: ['<rootDir>/build/'],
// transformIgnorePatterns: [`<rootDir>/node_modules/(?!${esModules})`],
// moduleNameMapper: {
// '^.+\\.(css|scss)$': '<rootDir>/test-utils/style.mock.ts',
// },
// setupFiles: ['<rootDir>/test-utils/globals.mock.ts'],
// testPathIgnorePatterns: ['.visual.'],
...createJsWithTsPreset(),
transform: {
'^.+\\.(js|ts)?$': ['ts-jest', {useESM: true}],
},
transformIgnorePatterns: [`<rootDir>/node_modules/(?!${esModules})`],
testMatch: ['**/*.test.[jt]s?(x)'],
testPathIgnorePatterns: ['.visual.'],
};
Loading
Loading