diff --git a/.config/.jscpd.json b/.config/.jscpd.json
index 48bc7431db18..ca7ea4c40988 100644
--- a/.config/.jscpd.json
+++ b/.config/.jscpd.json
@@ -34,6 +34,7 @@
"**/test-results/**",
"**/tests/**",
"**/tsconfig.json",
+ "**/e2e/**/*.spec.ts",
"packages/components/scripts/post-build/components.ts",
"packages/components/src/components/**/*.spec.tsx",
"packages/components/src/components/**/index.html",
diff --git a/.github/workflows/02-e2e-patternhub.yml b/.github/workflows/02-e2e-patternhub.yml
new file mode 100644
index 000000000000..211f5b70fb19
--- /dev/null
+++ b/.github/workflows/02-e2e-patternhub.yml
@@ -0,0 +1,77 @@
+name: ๐ญ Playwright E2E
+
+on:
+ workflow_call:
+ inputs:
+ version:
+ required: true
+ type: string
+ path:
+ required: false
+ type: string
+
+permissions:
+ actions: write
+ contents: write
+
+jobs:
+ playwright-patternhub:
+ name: ๐งช๐ญ - patternhub
+ runs-on: ubuntu-24.04 # Use Ubuntu 24.04 explicitly
+ container:
+ image: mcr.microsoft.com/playwright:v${{ inputs.version }}
+ options: --user 1001
+ steps:
+ - name: โฌ Checkout repo
+ uses: actions/checkout@v4
+
+ - name: ๐ Init Cache
+ uses: ./.github/actions/npm-cache
+
+ - name: โฌ Download foundations build
+ uses: actions/download-artifact@v4
+ with:
+ name: db-ux-foundations-build
+ path: packages/foundations/build
+
+ - name: โฌ Download output
+ uses: actions/download-artifact@v4
+ with:
+ name: db-ux-output
+ path: output
+
+ - name: โฌ Download components styles build
+ uses: actions/download-artifact@v4
+ with:
+ name: db-ux-components-build
+ path: packages/components/build
+
+ - name: โฌ Download patternhub
+ uses: actions/download-artifact@v4
+ with:
+ name: db-ux-patternhub
+ path: build-showcases/patternhub
+
+ # We test everything for patternhub and main branch
+ - name: ๐ฉโ๐ฌ Test showcase with Playwright ๐ญ
+ shell: bash
+ env:
+ NEXT_PUBLIC_BASE_PATH: ${{ inputs.path }}
+ run: |
+ mkdir -p ./build-showcases${{ inputs.path }}
+ cp -RT ./build-showcases/patternhub ./build-showcases${{ inputs.path }}
+ npm run test:e2e --workspace=patternhub
+
+ - name: ๐ฃ Print GitHub Report
+ if: failure()
+ shell: bash
+ run: |
+ npx playwright merge-reports --reporter github ./blob-report
+
+ - name: ๐ Upload test results
+ if: failure()
+ uses: actions/upload-artifact@v4
+ with:
+ name: patternhub-playwright-results
+ path: ./showcases/patternhub/test-results
+ retention-days: 30
diff --git a/.github/workflows/02-e2e-regenerate.yml b/.github/workflows/02-e2e-regenerate.yml
index ba02dbd507e7..d04a779a150b 100644
--- a/.github/workflows/02-e2e-regenerate.yml
+++ b/.github/workflows/02-e2e-regenerate.yml
@@ -78,7 +78,8 @@ jobs:
cp -RT ./build-showcases/${{ inputs.type }} ./build-showcases${{ inputs.path }}
npm run regenerate:screenshots --workspace=patternhub
else
- npm run regenerate:screenshots --workspace=react-showcase
+ npm run regenerate:visual-snapshots --workspace=react-showcase
+ npm run regenerate:aria-snapshots --workspace=react-showcase
fi
- name: ๐ Upload components
diff --git a/.github/workflows/02-e2e-showcases.yml b/.github/workflows/02-e2e-showcases.yml
index 18cce5d67188..dd47880be40f 100644
--- a/.github/workflows/02-e2e-showcases.yml
+++ b/.github/workflows/02-e2e-showcases.yml
@@ -9,9 +9,16 @@ on:
showcase:
required: true
type: string
- path:
- required: false
- type: string
+ outputs:
+ aria-snapshots-changed:
+ description: "If aria snapshots changed in current PR"
+ value: ${{ jobs.playwright-showcases.outputs.aria-snapshots-changed }}
+ aria-snapshots-changed-to-main:
+ description: "If aria snapshots changed to main branch"
+ value: ${{ jobs.playwright-showcases.outputs.aria-snapshots-changed-to-main }}
+ visual-snapshots-changed:
+ description: "If visual snapshots changed"
+ value: ${{ jobs.playwright-showcases.outputs.visual-snapshots-changed }}
permissions:
actions: write
@@ -27,11 +34,18 @@ jobs:
strategy:
fail-fast: false
matrix:
- shardIndex: [1, 2, 3, 4, 5, 6]
- shardTotal: [6]
+ shardIndex: [1, 2, 3, 4]
+ shardTotal: [4]
+ outputs:
+ aria-snapshots-changed: ${{ steps.aria-snapshots.outputs.aria-snapshots-changed }}
+ aria-snapshots-changed-to-main: ${{ steps.aria-snapshots.outputs.aria-snapshots-changed-to-main }}
+ visual-snapshots-changed: ${{ steps.visual-snapshots.outputs.visual-snapshots-changed }}
steps:
- name: โฌ Checkout repo
uses: actions/checkout@v4
+ with:
+ fetch-depth: 0 # fetch all history for all branches
+ fetch-tags: false
- name: ๐ Init Cache
uses: ./.github/actions/npm-cache
@@ -60,21 +74,50 @@ jobs:
name: db-ux-${{ inputs.showcase }}
path: build-showcases/${{ inputs.showcase }}
- - name: ๐งด Copy patternhub testing app
- if: inputs.path
- shell: bash
- run: |
- mkdir -p ./build-showcases${{ inputs.path }}
- cp -RT ./build-showcases/${{ inputs.showcase }} ./build-showcases${{ inputs.path }}
-
+ # We test everything for patternhub and main branch
- name: ๐ฉโ๐ฌ Test showcase with Playwright ๐ญ
shell: bash
+ if: github.event.pull_request == null
env:
NEXT_PUBLIC_BASE_PATH: ${{ inputs.path }}
run: |
- ls ./build-showcases${{ inputs.path }}
npm run test:e2e --workspace=${{ inputs.showcase }} -- --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
+ # We check if aria-snapshots were changed
+ - name: ๐ฉโ๐ฌ Test aria-snapshots with Playwright ๐ญ
+ id: aria-snapshots
+ shell: bash
+ if: github.event.pull_request != null
+ run: |
+ npm run test:aria-snapshots --workspace=${{ inputs.showcase }} -- --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --update-snapshots
+ OUTPUT=$(npx --no tsx scripts/github/snapshot-changes/check-aria.ts)
+ echo "aria-snapshots-changed=$OUTPUT" >> $GITHUB_OUTPUT
+ OUTPUT=$(npx --no tsx scripts/github/snapshot-changes/check-main-aria.ts)
+ echo "aria-snapshots-changed-to-main=$OUTPUT" >> $GITHUB_OUTPUT
+
+ - name: ๐ฉโ๐ฌ Test axe-core with Playwright ๐ญ
+ shell: bash
+ if: github.event.pull_request != null
+ run: |
+ npm run test:axe-core --workspace=${{ inputs.showcase }} -- --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
+
+ - name: ๐ฉโ๐ฌ Test visual-snapshots with Playwright ๐ญ
+ id: visual-snapshots
+ shell: bash
+ if: github.event.pull_request != null
+ run: |
+ npm run test:visual-snapshots --workspace=${{ inputs.showcase }} -- --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --update-snapshots
+ OUTPUT=$(npx --no tsx scripts/github/snapshot-changes/check-visual.ts)
+ echo "visual-snapshots-changed=$OUTPUT" >> $GITHUB_OUTPUT
+
+ - name: ๐ฉโ๐ฌ Test a11y-checker with Playwright ๐ญ
+ shell: bash
+ if: |
+ github.event.pull_request != null &&
+ steps.aria-snapshots.outputs.aria-snapshots-changed-to-main=='true'
+ run: |
+ npm run test:a11y-checker --workspace=${{ inputs.showcase }} -- --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
+
- name: ๐ฃ Print GitHub Report
if: failure()
shell: bash
@@ -88,11 +131,3 @@ jobs:
name: ${{ inputs.showcase }}-playwright-results-${{ matrix.shardIndex }}
path: ./showcases/${{ inputs.showcase }}/test-results
retention-days: 30
-
- - name: ๐ Upload aChecker results
- if: failure()
- uses: actions/upload-artifact@v4
- with:
- name: ${{ inputs.showcase }}-showcase-achecker-results-${{ matrix.shardIndex }}
- path: ./showcases/${{ inputs.showcase }}-showcase/results
- retention-days: 30
diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml
index 3ba33923b60d..0ad5a391c4b4 100644
--- a/.github/workflows/default.yml
+++ b/.github/workflows/default.yml
@@ -133,12 +133,11 @@ jobs:
showcase: vue-showcase
test-showcase-patternhub:
- uses: ./.github/workflows/02-e2e-showcases.yml
+ uses: ./.github/workflows/02-e2e-patternhub.yml
needs: [build-showcase-patternhub, get-playwright-version]
with:
version: ${{ needs.get-playwright-version.outputs.version }}
path: ${{ needs.build-showcase-patternhub.outputs.path }}
- showcase: patternhub
regenerate-snapshots-components:
if: always() && needs.test-components.result == 'failure'
@@ -170,14 +169,24 @@ jobs:
get-playwright-version
]
+ # This job runs only if aria-snapshots were changed compared to main or if it runs on main branch
test-screen-reader:
+ if: |
+ needs.test-showcase-react.outputs.aria-snapshots-changed-to-main == 'true' ||
+ github.event.pull_request == null
uses: ./.github/workflows/02-e2e-screen-reader.yml
- needs: [build-showcase-react, init-playwright, get-playwright-version]
+ needs: [test-showcase-react, init-playwright, get-playwright-version]
with:
version: ${{ needs.get-playwright-version.outputs.version }}
regenerate-snapshots:
- if: always() && (needs.test-showcase-angular.result == 'failure' || needs.test-showcase-react.result == 'failure' || needs.test-showcase-vue.result == 'failure')
+ if: |
+ needs.test-showcase-angular.outputs.aria-snapshots-changed == 'true' ||
+ needs.test-showcase-angular.outputs.visual-snapshots-changed == 'true' ||
+ needs.test-showcase-react.outputs.aria-snapshots-changed == 'true' ||
+ needs.test-showcase-react.outputs.visual-snapshots-changed == 'true' ||
+ needs.test-showcase-vue.outputs.aria-snapshots-changed == 'true' ||
+ needs.test-showcase-vue.outputs.visual-snapshots-changed == 'true'
uses: ./.github/workflows/02-e2e-regenerate.yml
with:
version: ${{ needs.get-playwright-version.outputs.version }}
@@ -231,7 +240,7 @@ jobs:
resultTestShowcasePatternhub="${{ needs.test-showcase-patternhub.result }}"
resultTestScreenReader="${{ needs.test-screen-reader.result }}"
if [[ $resultTestFoundations == "success" ]] && \
- [[ $resultTestScreenReader == "success" ]] && \
+ [[ $resultTestScreenReader == "success" || $resultTestScreenReader == "skipped" ]] && \
[[ $resultTestShowcaseStencil == "success" ]] && \
[[ $resultTestShowcaseAngular == "success" ]] && \
[[ $resultTestShowcaseReact == "success" ]] && \
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index dc416719ecd7..d6e5df22020d 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -130,12 +130,11 @@ jobs:
showcase: vue-showcase
test-showcase-patternhub:
- uses: ./.github/workflows/02-e2e-showcases.yml
+ uses: ./.github/workflows/02-e2e-patternhub.yml
needs: [build-showcase-patternhub, get-playwright-version]
with:
- path: ${{ needs.build-showcase-patternhub.outputs.path }}
version: ${{ needs.get-playwright-version.outputs.version }}
- showcase: patternhub
+ path: ${{ needs.build-showcase-patternhub.outputs.path }}
test-screen-reader:
uses: ./.github/workflows/02-e2e-screen-reader.yml
diff --git a/__snapshots__/custom-select/showcase/webkit/DBCustomSelect-should-match-screenshot-1/DBCustomSelect-should-match-screenshot.png b/__snapshots__/custom-select/showcase/webkit/DBCustomSelect-should-match-screenshot-1/DBCustomSelect-should-match-screenshot.png
index 2deab5179355..c6228106dc64 100644
Binary files a/__snapshots__/custom-select/showcase/webkit/DBCustomSelect-should-match-screenshot-1/DBCustomSelect-should-match-screenshot.png and b/__snapshots__/custom-select/showcase/webkit/DBCustomSelect-should-match-screenshot-1/DBCustomSelect-should-match-screenshot.png differ
diff --git a/__snapshots__/stack/showcase/chromium-highContrast/should-have-same-aria-snapshot/DBStack-should-have-same-aria-snapshot.yaml b/__snapshots__/stack/showcase/chromium-highContrast/should-have-same-aria-snapshot/DBStack-should-have-same-aria-snapshot.yaml
new file mode 100644
index 000000000000..bd4a43c942f8
--- /dev/null
+++ b/__snapshots__/stack/showcase/chromium-highContrast/should-have-same-aria-snapshot/DBStack-should-have-same-aria-snapshot.yaml
@@ -0,0 +1,94 @@
+- main:
+ - heading "DBStack" [level=1]
+ - link "Density"
+ - text: Functional
+ - link "Content 1"
+ - text: Content 2 Content 3 (Default) Regular
+ - link "Content 1"
+ - text: Content 2 Content 3 Expressive
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Variant"
+ - text: (Default) Simple
+ - link "Content 1"
+ - text: Content 2 Content 3 Divider
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Gap"
+ - text: none
+ - link "Content 1"
+ - text: Content 2 Content 3 3x-small
+ - link "Content 1"
+ - text: Content 2 Content 3 2x-small
+ - link "Content 1"
+ - text: Content 2 Content 3 x-small
+ - link "Content 1"
+ - text: Content 2 Content 3 (Default) small
+ - link "Content 1"
+ - text: Content 2 Content 3 medium
+ - link "Content 1"
+ - text: Content 2 Content 3 large
+ - link "Content 1"
+ - text: Content 2 Content 3 x-large
+ - link "Content 1"
+ - text: Content 2 Content 3 2x-large
+ - link "Content 1"
+ - text: Content 2 Content 3 3x-large
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Direction"
+ - text: (Default) Column
+ - link "Content 1"
+ - text: Content 2 Content 3 Row
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Wrap"
+ - text: "(Default) No Wrap: Column"
+ - link "Content 1"
+ - text: "Content 2 Content 3 No Wrap: Row"
+ - link "Content 1"
+ - text: "Content 2 Content 3 Wrap: Column"
+ - link "Content 1"
+ - text: "Content 2 Content 3 Wrap: Row"
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Alignment Column"
+ - text: (Default) Stretch
+ - link "Content 1"
+ - text: Content 2 Content 3 Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Alignment Row"
+ - text: (Default) Stretch
+ - link "Content 1"
+ - text: Content 2 Content 3 Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Justify Content Column"
+ - text: (Default) Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3 Space-Between
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Justify Content Row"
+ - text: (Default) Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3 Space-Between
+ - link "Content 1"
+ - text: Content 2 Content 3
\ No newline at end of file
diff --git a/__snapshots__/stack/showcase/chromium/should-have-same-aria-snapshot/DBStack-should-have-same-aria-snapshot.yaml b/__snapshots__/stack/showcase/chromium/should-have-same-aria-snapshot/DBStack-should-have-same-aria-snapshot.yaml
new file mode 100644
index 000000000000..bd4a43c942f8
--- /dev/null
+++ b/__snapshots__/stack/showcase/chromium/should-have-same-aria-snapshot/DBStack-should-have-same-aria-snapshot.yaml
@@ -0,0 +1,94 @@
+- main:
+ - heading "DBStack" [level=1]
+ - link "Density"
+ - text: Functional
+ - link "Content 1"
+ - text: Content 2 Content 3 (Default) Regular
+ - link "Content 1"
+ - text: Content 2 Content 3 Expressive
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Variant"
+ - text: (Default) Simple
+ - link "Content 1"
+ - text: Content 2 Content 3 Divider
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Gap"
+ - text: none
+ - link "Content 1"
+ - text: Content 2 Content 3 3x-small
+ - link "Content 1"
+ - text: Content 2 Content 3 2x-small
+ - link "Content 1"
+ - text: Content 2 Content 3 x-small
+ - link "Content 1"
+ - text: Content 2 Content 3 (Default) small
+ - link "Content 1"
+ - text: Content 2 Content 3 medium
+ - link "Content 1"
+ - text: Content 2 Content 3 large
+ - link "Content 1"
+ - text: Content 2 Content 3 x-large
+ - link "Content 1"
+ - text: Content 2 Content 3 2x-large
+ - link "Content 1"
+ - text: Content 2 Content 3 3x-large
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Direction"
+ - text: (Default) Column
+ - link "Content 1"
+ - text: Content 2 Content 3 Row
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Wrap"
+ - text: "(Default) No Wrap: Column"
+ - link "Content 1"
+ - text: "Content 2 Content 3 No Wrap: Row"
+ - link "Content 1"
+ - text: "Content 2 Content 3 Wrap: Column"
+ - link "Content 1"
+ - text: "Content 2 Content 3 Wrap: Row"
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Alignment Column"
+ - text: (Default) Stretch
+ - link "Content 1"
+ - text: Content 2 Content 3 Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Alignment Row"
+ - text: (Default) Stretch
+ - link "Content 1"
+ - text: Content 2 Content 3 Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Justify Content Column"
+ - text: (Default) Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3 Space-Between
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Justify Content Row"
+ - text: (Default) Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3 Space-Between
+ - link "Content 1"
+ - text: Content 2 Content 3
\ No newline at end of file
diff --git a/__snapshots__/stack/showcase/firefox/should-have-same-aria-snapshot/DBStack-should-have-same-aria-snapshot.yaml b/__snapshots__/stack/showcase/firefox/should-have-same-aria-snapshot/DBStack-should-have-same-aria-snapshot.yaml
new file mode 100644
index 000000000000..bd4a43c942f8
--- /dev/null
+++ b/__snapshots__/stack/showcase/firefox/should-have-same-aria-snapshot/DBStack-should-have-same-aria-snapshot.yaml
@@ -0,0 +1,94 @@
+- main:
+ - heading "DBStack" [level=1]
+ - link "Density"
+ - text: Functional
+ - link "Content 1"
+ - text: Content 2 Content 3 (Default) Regular
+ - link "Content 1"
+ - text: Content 2 Content 3 Expressive
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Variant"
+ - text: (Default) Simple
+ - link "Content 1"
+ - text: Content 2 Content 3 Divider
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Gap"
+ - text: none
+ - link "Content 1"
+ - text: Content 2 Content 3 3x-small
+ - link "Content 1"
+ - text: Content 2 Content 3 2x-small
+ - link "Content 1"
+ - text: Content 2 Content 3 x-small
+ - link "Content 1"
+ - text: Content 2 Content 3 (Default) small
+ - link "Content 1"
+ - text: Content 2 Content 3 medium
+ - link "Content 1"
+ - text: Content 2 Content 3 large
+ - link "Content 1"
+ - text: Content 2 Content 3 x-large
+ - link "Content 1"
+ - text: Content 2 Content 3 2x-large
+ - link "Content 1"
+ - text: Content 2 Content 3 3x-large
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Direction"
+ - text: (Default) Column
+ - link "Content 1"
+ - text: Content 2 Content 3 Row
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Wrap"
+ - text: "(Default) No Wrap: Column"
+ - link "Content 1"
+ - text: "Content 2 Content 3 No Wrap: Row"
+ - link "Content 1"
+ - text: "Content 2 Content 3 Wrap: Column"
+ - link "Content 1"
+ - text: "Content 2 Content 3 Wrap: Row"
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Alignment Column"
+ - text: (Default) Stretch
+ - link "Content 1"
+ - text: Content 2 Content 3 Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Alignment Row"
+ - text: (Default) Stretch
+ - link "Content 1"
+ - text: Content 2 Content 3 Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Justify Content Column"
+ - text: (Default) Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3 Space-Between
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Justify Content Row"
+ - text: (Default) Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3 Space-Between
+ - link "Content 1"
+ - text: Content 2 Content 3
\ No newline at end of file
diff --git a/__snapshots__/stack/showcase/mobile-chrome/should-have-same-aria-snapshot/DBStack-should-have-same-aria-snapshot.yaml b/__snapshots__/stack/showcase/mobile-chrome/should-have-same-aria-snapshot/DBStack-should-have-same-aria-snapshot.yaml
new file mode 100644
index 000000000000..bd4a43c942f8
--- /dev/null
+++ b/__snapshots__/stack/showcase/mobile-chrome/should-have-same-aria-snapshot/DBStack-should-have-same-aria-snapshot.yaml
@@ -0,0 +1,94 @@
+- main:
+ - heading "DBStack" [level=1]
+ - link "Density"
+ - text: Functional
+ - link "Content 1"
+ - text: Content 2 Content 3 (Default) Regular
+ - link "Content 1"
+ - text: Content 2 Content 3 Expressive
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Variant"
+ - text: (Default) Simple
+ - link "Content 1"
+ - text: Content 2 Content 3 Divider
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Gap"
+ - text: none
+ - link "Content 1"
+ - text: Content 2 Content 3 3x-small
+ - link "Content 1"
+ - text: Content 2 Content 3 2x-small
+ - link "Content 1"
+ - text: Content 2 Content 3 x-small
+ - link "Content 1"
+ - text: Content 2 Content 3 (Default) small
+ - link "Content 1"
+ - text: Content 2 Content 3 medium
+ - link "Content 1"
+ - text: Content 2 Content 3 large
+ - link "Content 1"
+ - text: Content 2 Content 3 x-large
+ - link "Content 1"
+ - text: Content 2 Content 3 2x-large
+ - link "Content 1"
+ - text: Content 2 Content 3 3x-large
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Direction"
+ - text: (Default) Column
+ - link "Content 1"
+ - text: Content 2 Content 3 Row
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Wrap"
+ - text: "(Default) No Wrap: Column"
+ - link "Content 1"
+ - text: "Content 2 Content 3 No Wrap: Row"
+ - link "Content 1"
+ - text: "Content 2 Content 3 Wrap: Column"
+ - link "Content 1"
+ - text: "Content 2 Content 3 Wrap: Row"
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Alignment Column"
+ - text: (Default) Stretch
+ - link "Content 1"
+ - text: Content 2 Content 3 Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Alignment Row"
+ - text: (Default) Stretch
+ - link "Content 1"
+ - text: Content 2 Content 3 Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Justify Content Column"
+ - text: (Default) Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3 Space-Between
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Justify Content Row"
+ - text: (Default) Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3 Space-Between
+ - link "Content 1"
+ - text: Content 2 Content 3
\ No newline at end of file
diff --git a/__snapshots__/stack/showcase/mobile-safari/should-have-same-aria-snapshot/DBStack-should-have-same-aria-snapshot.yaml b/__snapshots__/stack/showcase/mobile-safari/should-have-same-aria-snapshot/DBStack-should-have-same-aria-snapshot.yaml
new file mode 100644
index 000000000000..bd4a43c942f8
--- /dev/null
+++ b/__snapshots__/stack/showcase/mobile-safari/should-have-same-aria-snapshot/DBStack-should-have-same-aria-snapshot.yaml
@@ -0,0 +1,94 @@
+- main:
+ - heading "DBStack" [level=1]
+ - link "Density"
+ - text: Functional
+ - link "Content 1"
+ - text: Content 2 Content 3 (Default) Regular
+ - link "Content 1"
+ - text: Content 2 Content 3 Expressive
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Variant"
+ - text: (Default) Simple
+ - link "Content 1"
+ - text: Content 2 Content 3 Divider
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Gap"
+ - text: none
+ - link "Content 1"
+ - text: Content 2 Content 3 3x-small
+ - link "Content 1"
+ - text: Content 2 Content 3 2x-small
+ - link "Content 1"
+ - text: Content 2 Content 3 x-small
+ - link "Content 1"
+ - text: Content 2 Content 3 (Default) small
+ - link "Content 1"
+ - text: Content 2 Content 3 medium
+ - link "Content 1"
+ - text: Content 2 Content 3 large
+ - link "Content 1"
+ - text: Content 2 Content 3 x-large
+ - link "Content 1"
+ - text: Content 2 Content 3 2x-large
+ - link "Content 1"
+ - text: Content 2 Content 3 3x-large
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Direction"
+ - text: (Default) Column
+ - link "Content 1"
+ - text: Content 2 Content 3 Row
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Wrap"
+ - text: "(Default) No Wrap: Column"
+ - link "Content 1"
+ - text: "Content 2 Content 3 No Wrap: Row"
+ - link "Content 1"
+ - text: "Content 2 Content 3 Wrap: Column"
+ - link "Content 1"
+ - text: "Content 2 Content 3 Wrap: Row"
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Alignment Column"
+ - text: (Default) Stretch
+ - link "Content 1"
+ - text: Content 2 Content 3 Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Alignment Row"
+ - text: (Default) Stretch
+ - link "Content 1"
+ - text: Content 2 Content 3 Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Justify Content Column"
+ - text: (Default) Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3 Space-Between
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Justify Content Row"
+ - text: (Default) Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3 Space-Between
+ - link "Content 1"
+ - text: Content 2 Content 3
\ No newline at end of file
diff --git a/__snapshots__/stack/showcase/webkit/should-have-same-aria-snapshot/DBStack-should-have-same-aria-snapshot.yaml b/__snapshots__/stack/showcase/webkit/should-have-same-aria-snapshot/DBStack-should-have-same-aria-snapshot.yaml
new file mode 100644
index 000000000000..bd4a43c942f8
--- /dev/null
+++ b/__snapshots__/stack/showcase/webkit/should-have-same-aria-snapshot/DBStack-should-have-same-aria-snapshot.yaml
@@ -0,0 +1,94 @@
+- main:
+ - heading "DBStack" [level=1]
+ - link "Density"
+ - text: Functional
+ - link "Content 1"
+ - text: Content 2 Content 3 (Default) Regular
+ - link "Content 1"
+ - text: Content 2 Content 3 Expressive
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Variant"
+ - text: (Default) Simple
+ - link "Content 1"
+ - text: Content 2 Content 3 Divider
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Gap"
+ - text: none
+ - link "Content 1"
+ - text: Content 2 Content 3 3x-small
+ - link "Content 1"
+ - text: Content 2 Content 3 2x-small
+ - link "Content 1"
+ - text: Content 2 Content 3 x-small
+ - link "Content 1"
+ - text: Content 2 Content 3 (Default) small
+ - link "Content 1"
+ - text: Content 2 Content 3 medium
+ - link "Content 1"
+ - text: Content 2 Content 3 large
+ - link "Content 1"
+ - text: Content 2 Content 3 x-large
+ - link "Content 1"
+ - text: Content 2 Content 3 2x-large
+ - link "Content 1"
+ - text: Content 2 Content 3 3x-large
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Direction"
+ - text: (Default) Column
+ - link "Content 1"
+ - text: Content 2 Content 3 Row
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Wrap"
+ - text: "(Default) No Wrap: Column"
+ - link "Content 1"
+ - text: "Content 2 Content 3 No Wrap: Row"
+ - link "Content 1"
+ - text: "Content 2 Content 3 Wrap: Column"
+ - link "Content 1"
+ - text: "Content 2 Content 3 Wrap: Row"
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Alignment Column"
+ - text: (Default) Stretch
+ - link "Content 1"
+ - text: Content 2 Content 3 Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Alignment Row"
+ - text: (Default) Stretch
+ - link "Content 1"
+ - text: Content 2 Content 3 Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Justify Content Column"
+ - text: (Default) Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3 Space-Between
+ - link "Content 1"
+ - text: Content 2 Content 3
+ - link "Justify Content Row"
+ - text: (Default) Start
+ - link "Content 1"
+ - text: Content 2 Content 3 Center
+ - link "Content 1"
+ - text: Content 2 Content 3 End
+ - link "Content 1"
+ - text: Content 2 Content 3 Space-Between
+ - link "Content 1"
+ - text: Content 2 Content 3
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index bcec699f6b80..bd9c37931374 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -42268,7 +42268,7 @@
},
"showcases/next-showcase": {
"dependencies": {
- "next": "*",
+ "next": "latest",
"react": "18.3.1",
"react-dom": "18.3.1"
},
diff --git a/packages/components/_templates/mitosis/new/showcases/e2e-a11y-test.ejs.t b/packages/components/_templates/mitosis/new/showcases/e2e-a11y-test.ejs.t
index 1366e5c4fec1..a6a948401494 100644
--- a/packages/components/_templates/mitosis/new/showcases/e2e-a11y-test.ejs.t
+++ b/packages/components/_templates/mitosis/new/showcases/e2e-a11y-test.ejs.t
@@ -2,7 +2,6 @@
to: "<%= showcases ? `../../showcases/e2e/${name}/${name}-a11y.spec.ts` : null %>"
---
import { test } from '@playwright/test';
-// @ts-expect-error - required for playwright
import { getA11yTest } from '../default.ts';
test.describe('DB<%= h.changeCase.pascal(name) %>', () => {
diff --git a/packages/components/_templates/mitosis/new/showcases/e2e-snapshot-test.ejs.t b/packages/components/_templates/mitosis/new/showcases/e2e-snapshot-test.ejs.t
index 275ba5b99211..a9335429030b 100644
--- a/packages/components/_templates/mitosis/new/showcases/e2e-snapshot-test.ejs.t
+++ b/packages/components/_templates/mitosis/new/showcases/e2e-snapshot-test.ejs.t
@@ -2,7 +2,6 @@
to: "<%= showcases ? `../../showcases/e2e/${name}/${name}-snapshot.spec.ts` : null %>"
---
import { test } from '@playwright/test';
-// @ts-expect-error - required for playwright
import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
const path = '<%= name %>';
diff --git a/scripts/github/snapshot-changes/check-aria.ts b/scripts/github/snapshot-changes/check-aria.ts
new file mode 100644
index 000000000000..74c55ba6df75
--- /dev/null
+++ b/scripts/github/snapshot-changes/check-aria.ts
@@ -0,0 +1,3 @@
+import { checkSnapshotChanges } from './check.js';
+
+console.log(checkSnapshotChanges(true));
diff --git a/scripts/github/snapshot-changes/check-main-aria.ts b/scripts/github/snapshot-changes/check-main-aria.ts
new file mode 100644
index 000000000000..34b88ddad6df
--- /dev/null
+++ b/scripts/github/snapshot-changes/check-main-aria.ts
@@ -0,0 +1,3 @@
+import { checkSnapshotChanges } from './check.js';
+
+console.log(checkSnapshotChanges(true, 'origin/main'));
diff --git a/scripts/github/snapshot-changes/check-visual.ts b/scripts/github/snapshot-changes/check-visual.ts
new file mode 100644
index 000000000000..56e7cc3e476f
--- /dev/null
+++ b/scripts/github/snapshot-changes/check-visual.ts
@@ -0,0 +1,3 @@
+import { checkSnapshotChanges } from './check.js';
+
+console.log(checkSnapshotChanges(false));
diff --git a/scripts/github/snapshot-changes/check.ts b/scripts/github/snapshot-changes/check.ts
new file mode 100644
index 000000000000..464dae4c8903
--- /dev/null
+++ b/scripts/github/snapshot-changes/check.ts
@@ -0,0 +1,22 @@
+import { execSync } from 'node:child_process';
+
+export const checkSnapshotChanges = (aria = true, branch = ''): boolean => {
+ try {
+ // Run the Git command to check for changes compared to the main branch
+ const changedFiles = execSync(`git diff ${branch} --name-only`, {
+ encoding: 'utf8'
+ })
+ .split('\n')
+ .filter(Boolean);
+
+ // Check if any file in __snapshots__ with the name *-aria-snapshot.yml has changed
+ return changedFiles.some(
+ (file) =>
+ file.startsWith('__snapshots__') &&
+ file.endsWith(aria ? '-aria-snapshot.yaml' : '-screenshot.png')
+ );
+ } catch (error) {
+ console.error('Error while checking for changes:', error.message);
+ return false;
+ }
+};
diff --git a/showcases/angular-showcase/package.json b/showcases/angular-showcase/package.json
index 17c18044c0ce..422bf475fd35 100644
--- a/showcases/angular-showcase/package.json
+++ b/showcases/angular-showcase/package.json
@@ -8,8 +8,12 @@
"ng": "ng",
"preview": "npx http-server ../../build-showcases",
"start": "ng serve --serve-path angular-showcase",
+ "test:a11y-checker": "cross-env showcase=angular-showcase npx playwright test --config=../playwright.a11y-checker.ts",
+ "test:aria-snapshots": "cross-env showcase=angular-showcase npx playwright test --config=../playwright.aria-snapshots.ts",
+ "test:axe-core": "cross-env showcase=angular-showcase npx playwright test --config=../playwright.axe-core.ts",
"test:e2e": "cross-env showcase=angular-showcase npx playwright test --config=../playwright.config.ts",
"test:ui": "npm run test:e2e -- --ui",
+ "test:visual-snapshots": "cross-env showcase=angular-showcase npx playwright test --config=../playwright.visual-snapshots.ts",
"watch": "ng build --watch --configuration development"
},
"dependencies": {
diff --git a/showcases/e2e/accordion-item/accordion-item-a11y-checker.spec.ts b/showcases/e2e/accordion-item/accordion-item-a11y-checker.spec.ts
new file mode 100644
index 000000000000..833ec1ea29e5
--- /dev/null
+++ b/showcases/e2e/accordion-item/accordion-item-a11y-checker.spec.ts
@@ -0,0 +1,6 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBAccordionItem', () => {
+ runA11yCheckerTest({ path: '04/accordion-item' });
+});
diff --git a/showcases/e2e/accordion-item/accordion-item-aria-snapshot.spec.ts b/showcases/e2e/accordion-item/accordion-item-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..ce53a523da1d
--- /dev/null
+++ b/showcases/e2e/accordion-item/accordion-item-aria-snapshot.spec.ts
@@ -0,0 +1,7 @@
+import { test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+
+const path = '04/accordion-item';
+test.describe('DBAccordionItem', () => {
+ runAriaSnapshotTest({ path });
+});
diff --git a/showcases/e2e/accordion-item/accordion-item-a11y.spec.ts b/showcases/e2e/accordion-item/accordion-item-axe-core.spec.ts
similarity index 81%
rename from showcases/e2e/accordion-item/accordion-item-a11y.spec.ts
rename to showcases/e2e/accordion-item/accordion-item-axe-core.spec.ts
index 687909ec1980..61adce89e6b0 100644
--- a/showcases/e2e/accordion-item/accordion-item-a11y.spec.ts
+++ b/showcases/e2e/accordion-item/accordion-item-axe-core.spec.ts
@@ -1,5 +1,5 @@
import { test } from '@playwright/test';
-import { runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
// Showcase uses
outside of in this case
@@ -14,5 +14,4 @@ test.describe('DBAccordionItem', () => {
density: 'functional',
axeDisableRules
});
- runA11yCheckerTest({ path: '04/accordion-item' });
});
diff --git a/showcases/e2e/accordion-item/accordion-item-snapshot.spec.ts b/showcases/e2e/accordion-item/accordion-item-visual-snapshot.spec.ts
similarity index 58%
rename from showcases/e2e/accordion-item/accordion-item-snapshot.spec.ts
rename to showcases/e2e/accordion-item/accordion-item-visual-snapshot.spec.ts
index 59160e60614c..cef276bf90e3 100644
--- a/showcases/e2e/accordion-item/accordion-item-snapshot.spec.ts
+++ b/showcases/e2e/accordion-item/accordion-item-visual-snapshot.spec.ts
@@ -1,8 +1,7 @@
import { test } from '@playwright/test';
-import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
+import { getDefaultScreenshotTest } from '../default.ts';
const path = '04/accordion-item';
test.describe('DBAccordionItem', () => {
getDefaultScreenshotTest({ path });
- runAriaSnapshotTest({ path });
});
diff --git a/showcases/e2e/accordion/accordion-a11y-checker.spec.ts b/showcases/e2e/accordion/accordion-a11y-checker.spec.ts
new file mode 100644
index 000000000000..8f0c293d5c9b
--- /dev/null
+++ b/showcases/e2e/accordion/accordion-a11y-checker.spec.ts
@@ -0,0 +1,8 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBAccordion', () => {
+ runA11yCheckerTest({
+ path: '04/accordion'
+ });
+});
diff --git a/showcases/e2e/accordion/accordion-aria-snapshot.spec.ts b/showcases/e2e/accordion/accordion-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..80f776bfe3a6
--- /dev/null
+++ b/showcases/e2e/accordion/accordion-aria-snapshot.spec.ts
@@ -0,0 +1,7 @@
+import { test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+
+const path = '04/accordion';
+test.describe('DBAccordion', () => {
+ runAriaSnapshotTest({ path });
+});
diff --git a/showcases/e2e/accordion/accordion-a11y.spec.ts b/showcases/e2e/accordion/accordion-axe-core.spec.ts
similarity index 80%
rename from showcases/e2e/accordion/accordion-a11y.spec.ts
rename to showcases/e2e/accordion/accordion-axe-core.spec.ts
index e8ba7642de52..b3339e738ea4 100644
--- a/showcases/e2e/accordion/accordion-a11y.spec.ts
+++ b/showcases/e2e/accordion/accordion-axe-core.spec.ts
@@ -1,9 +1,5 @@
import { test } from '@playwright/test';
-import {
- hasWebComponentSyntax,
- runA11yCheckerTest,
- runAxeCoreTest
-} from '../default.ts';
+import { hasWebComponentSyntax, runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
// https://stackoverflow.com/questions/78129019/can-you-have-an-li-in-a-autonomous-custom-element-with-the-parent-ul-not
@@ -14,7 +10,4 @@ test.describe('DBAccordion', () => {
runAxeCoreTest({ path: '04/accordion', skipAxe });
runAxeCoreTest({ path: '04/accordion', color: lvl3, skipAxe });
runAxeCoreTest({ path: '04/accordion', density: 'functional', skipAxe });
- runA11yCheckerTest({
- path: '04/accordion'
- });
});
diff --git a/showcases/e2e/accordion/accordion-snapshot.spec.ts b/showcases/e2e/accordion/accordion-visual-snapshot.spec.ts
similarity index 57%
rename from showcases/e2e/accordion/accordion-snapshot.spec.ts
rename to showcases/e2e/accordion/accordion-visual-snapshot.spec.ts
index b5c162140b82..be9b70a5c081 100644
--- a/showcases/e2e/accordion/accordion-snapshot.spec.ts
+++ b/showcases/e2e/accordion/accordion-visual-snapshot.spec.ts
@@ -1,8 +1,7 @@
import { test } from '@playwright/test';
-import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
+import { getDefaultScreenshotTest } from '../default.ts';
const path = '04/accordion';
test.describe('DBAccordion', () => {
getDefaultScreenshotTest({ path });
- runAriaSnapshotTest({ path });
});
diff --git a/showcases/e2e/badge/badge-a11y-checker.spec.ts b/showcases/e2e/badge/badge-a11y-checker.spec.ts
new file mode 100644
index 000000000000..1802c7cf8ad6
--- /dev/null
+++ b/showcases/e2e/badge/badge-a11y-checker.spec.ts
@@ -0,0 +1,6 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBBadge', () => {
+ runA11yCheckerTest({ path: '06/badge' });
+});
diff --git a/showcases/e2e/badge/badge-aria-snapshot.spec.ts b/showcases/e2e/badge/badge-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..6710314ea5f9
--- /dev/null
+++ b/showcases/e2e/badge/badge-aria-snapshot.spec.ts
@@ -0,0 +1,7 @@
+import { test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+
+const path = '06/badge';
+test.describe('DBBadge', () => {
+ runAriaSnapshotTest({ path });
+});
diff --git a/showcases/e2e/badge/badge-a11y.spec.ts b/showcases/e2e/badge/badge-axe-core.spec.ts
similarity index 71%
rename from showcases/e2e/badge/badge-a11y.spec.ts
rename to showcases/e2e/badge/badge-axe-core.spec.ts
index d7d09c66d03a..2c42c74766b6 100644
--- a/showcases/e2e/badge/badge-a11y.spec.ts
+++ b/showcases/e2e/badge/badge-axe-core.spec.ts
@@ -1,10 +1,9 @@
import { test } from '@playwright/test';
-import { runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
test.describe('DBBadge', () => {
runAxeCoreTest({ path: '06/badge' });
runAxeCoreTest({ path: '06/badge', color: lvl3 });
runAxeCoreTest({ path: '06/badge', density: 'functional' });
- runA11yCheckerTest({ path: '06/badge' });
});
diff --git a/showcases/e2e/badge/badge-snapshot.spec.ts b/showcases/e2e/badge/badge-visual-snapshot.spec.ts
similarity index 55%
rename from showcases/e2e/badge/badge-snapshot.spec.ts
rename to showcases/e2e/badge/badge-visual-snapshot.spec.ts
index 868e27baef7a..ecc1645a60fe 100644
--- a/showcases/e2e/badge/badge-snapshot.spec.ts
+++ b/showcases/e2e/badge/badge-visual-snapshot.spec.ts
@@ -1,8 +1,7 @@
import { test } from '@playwright/test';
-import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
+import { getDefaultScreenshotTest } from '../default.ts';
const path = '06/badge';
test.describe('DBBadge', () => {
getDefaultScreenshotTest({ path });
- runAriaSnapshotTest({ path });
});
diff --git a/showcases/e2e/brand/brand-a11y-checker.spec.ts b/showcases/e2e/brand/brand-a11y-checker.spec.ts
new file mode 100644
index 000000000000..7e985870c092
--- /dev/null
+++ b/showcases/e2e/brand/brand-a11y-checker.spec.ts
@@ -0,0 +1,6 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBBrand', () => {
+ runA11yCheckerTest({ path: '04/brand' });
+});
diff --git a/showcases/e2e/brand/brand-aria-snapshot.spec.ts b/showcases/e2e/brand/brand-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..0640b2406694
--- /dev/null
+++ b/showcases/e2e/brand/brand-aria-snapshot.spec.ts
@@ -0,0 +1,7 @@
+import { test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+
+const path = '04/brand';
+test.describe('DBBrand', () => {
+ runAriaSnapshotTest({ path });
+});
diff --git a/showcases/e2e/brand/brand-a11y.spec.ts b/showcases/e2e/brand/brand-axe-core.spec.ts
similarity index 71%
rename from showcases/e2e/brand/brand-a11y.spec.ts
rename to showcases/e2e/brand/brand-axe-core.spec.ts
index 334824f4ce78..0b6b12fbb32b 100644
--- a/showcases/e2e/brand/brand-a11y.spec.ts
+++ b/showcases/e2e/brand/brand-axe-core.spec.ts
@@ -1,10 +1,9 @@
import { test } from '@playwright/test';
-import { runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
test.describe('DBBrand', () => {
runAxeCoreTest({ path: '04/brand' });
runAxeCoreTest({ path: '04/brand', color: lvl3 });
runAxeCoreTest({ path: '04/brand', density: 'functional' });
- runA11yCheckerTest({ path: '04/brand' });
});
diff --git a/showcases/e2e/brand/brand-snapshot.spec.ts b/showcases/e2e/brand/brand-visual-snapshot.spec.ts
similarity index 55%
rename from showcases/e2e/brand/brand-snapshot.spec.ts
rename to showcases/e2e/brand/brand-visual-snapshot.spec.ts
index c38c75f4bbe1..2c47d3ba7aed 100644
--- a/showcases/e2e/brand/brand-snapshot.spec.ts
+++ b/showcases/e2e/brand/brand-visual-snapshot.spec.ts
@@ -1,8 +1,7 @@
import { test } from '@playwright/test';
-import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
+import { getDefaultScreenshotTest } from '../default.ts';
const path = '04/brand';
test.describe('DBBrand', () => {
getDefaultScreenshotTest({ path });
- runAriaSnapshotTest({ path });
});
diff --git a/showcases/e2e/button/button-a11y-checker.spec.ts b/showcases/e2e/button/button-a11y-checker.spec.ts
new file mode 100644
index 000000000000..489357070523
--- /dev/null
+++ b/showcases/e2e/button/button-a11y-checker.spec.ts
@@ -0,0 +1,6 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBButton', () => {
+ runA11yCheckerTest({ path: '02/button' });
+});
diff --git a/showcases/e2e/button/button-aria-snapshot.spec.ts b/showcases/e2e/button/button-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..8dc51f65a9dc
--- /dev/null
+++ b/showcases/e2e/button/button-aria-snapshot.spec.ts
@@ -0,0 +1,7 @@
+import { test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+
+const path = '02/button';
+test.describe('DBButton', () => {
+ runAriaSnapshotTest({ path });
+});
diff --git a/showcases/e2e/button/button-a11y.spec.ts b/showcases/e2e/button/button-axe-core.spec.ts
similarity index 71%
rename from showcases/e2e/button/button-a11y.spec.ts
rename to showcases/e2e/button/button-axe-core.spec.ts
index e2378566e824..25c27c271a11 100644
--- a/showcases/e2e/button/button-a11y.spec.ts
+++ b/showcases/e2e/button/button-axe-core.spec.ts
@@ -1,10 +1,9 @@
import { test } from '@playwright/test';
-import { runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
test.describe('DBButton', () => {
runAxeCoreTest({ path: '02/button' });
runAxeCoreTest({ path: '02/button', color: lvl3 });
runAxeCoreTest({ path: '02/button', density: 'functional' });
- runA11yCheckerTest({ path: '02/button' });
});
diff --git a/showcases/e2e/button/button-snapshot.spec.ts b/showcases/e2e/button/button-visual-snapshot.spec.ts
similarity index 56%
rename from showcases/e2e/button/button-snapshot.spec.ts
rename to showcases/e2e/button/button-visual-snapshot.spec.ts
index e91837801d0f..cefaae2b953a 100644
--- a/showcases/e2e/button/button-snapshot.spec.ts
+++ b/showcases/e2e/button/button-visual-snapshot.spec.ts
@@ -1,8 +1,7 @@
import { test } from '@playwright/test';
-import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
+import { getDefaultScreenshotTest } from '../default.ts';
const path = '02/button';
test.describe('DBButton', () => {
getDefaultScreenshotTest({ path });
- runAriaSnapshotTest({ path });
});
diff --git a/showcases/e2e/card/card-a11y-checker.spec.ts b/showcases/e2e/card/card-a11y-checker.spec.ts
new file mode 100644
index 000000000000..f1cce4317d66
--- /dev/null
+++ b/showcases/e2e/card/card-a11y-checker.spec.ts
@@ -0,0 +1,6 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBCard', () => {
+ runA11yCheckerTest({ path: '01/card' });
+});
diff --git a/showcases/e2e/card/card-aria-snapshot.spec.ts b/showcases/e2e/card/card-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..1ee147d79058
--- /dev/null
+++ b/showcases/e2e/card/card-aria-snapshot.spec.ts
@@ -0,0 +1,7 @@
+import { test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+
+const path = '01/card';
+test.describe('DBCard', () => {
+ runAriaSnapshotTest({ path });
+});
diff --git a/showcases/e2e/card/card-a11y.spec.ts b/showcases/e2e/card/card-axe-core.spec.ts
similarity index 71%
rename from showcases/e2e/card/card-a11y.spec.ts
rename to showcases/e2e/card/card-axe-core.spec.ts
index cfb90811432f..6499c2ea3722 100644
--- a/showcases/e2e/card/card-a11y.spec.ts
+++ b/showcases/e2e/card/card-axe-core.spec.ts
@@ -1,10 +1,9 @@
import { test } from '@playwright/test';
-import { runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
test.describe('DBCard', () => {
runAxeCoreTest({ path: '01/card' });
runAxeCoreTest({ path: '01/card', color: lvl3 });
runAxeCoreTest({ path: '01/card', density: 'functional' });
- runA11yCheckerTest({ path: '01/card' });
});
diff --git a/showcases/e2e/card/card-snapshot.spec.ts b/showcases/e2e/card/card-visual-snapshot.spec.ts
similarity index 55%
rename from showcases/e2e/card/card-snapshot.spec.ts
rename to showcases/e2e/card/card-visual-snapshot.spec.ts
index fed9820efaca..7faed98e0f81 100644
--- a/showcases/e2e/card/card-snapshot.spec.ts
+++ b/showcases/e2e/card/card-visual-snapshot.spec.ts
@@ -1,8 +1,7 @@
import { test } from '@playwright/test';
-import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
+import { getDefaultScreenshotTest } from '../default.ts';
const path = '01/card';
test.describe('DBCard', () => {
getDefaultScreenshotTest({ path });
- runAriaSnapshotTest({ path });
});
diff --git a/showcases/e2e/checkbox/checkbox-a11y-checker.spec.ts b/showcases/e2e/checkbox/checkbox-a11y-checker.spec.ts
new file mode 100644
index 000000000000..cb0bd0f556cc
--- /dev/null
+++ b/showcases/e2e/checkbox/checkbox-a11y-checker.spec.ts
@@ -0,0 +1,6 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBCheckbox', () => {
+ runA11yCheckerTest({ path: '03/checkbox' });
+});
diff --git a/showcases/e2e/checkbox/checkbox-aria-snapshot.spec.ts b/showcases/e2e/checkbox/checkbox-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..9cf63f8c0c51
--- /dev/null
+++ b/showcases/e2e/checkbox/checkbox-aria-snapshot.spec.ts
@@ -0,0 +1,7 @@
+import { test } from '@playwright/test';
+
+const path = '03/checkbox';
+test.describe('DBCheckbox', () => {
+ // TODO: There is an issue with playwright ariaSnapshot not working properly for react
+ // runAriaSnapshotTest({ path });
+});
diff --git a/showcases/e2e/checkbox/checkbox-a11y.spec.ts b/showcases/e2e/checkbox/checkbox-axe-core.spec.ts
similarity index 71%
rename from showcases/e2e/checkbox/checkbox-a11y.spec.ts
rename to showcases/e2e/checkbox/checkbox-axe-core.spec.ts
index 4440aaad7405..15ebaa6dd6c0 100644
--- a/showcases/e2e/checkbox/checkbox-a11y.spec.ts
+++ b/showcases/e2e/checkbox/checkbox-axe-core.spec.ts
@@ -1,10 +1,9 @@
import { test } from '@playwright/test';
-import { runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
test.describe('DBCheckbox', () => {
runAxeCoreTest({ path: '03/checkbox' });
runAxeCoreTest({ path: '03/checkbox', color: lvl3 });
runAxeCoreTest({ path: '03/checkbox', density: 'functional' });
- runA11yCheckerTest({ path: '03/checkbox' });
});
diff --git a/showcases/e2e/checkbox/checkbox-snapshot.spec.ts b/showcases/e2e/checkbox/checkbox-visual-snapshot.spec.ts
similarity index 89%
rename from showcases/e2e/checkbox/checkbox-snapshot.spec.ts
rename to showcases/e2e/checkbox/checkbox-visual-snapshot.spec.ts
index 45d2a447dd67..e8be5c6f4cfa 100644
--- a/showcases/e2e/checkbox/checkbox-snapshot.spec.ts
+++ b/showcases/e2e/checkbox/checkbox-visual-snapshot.spec.ts
@@ -7,5 +7,5 @@ test.describe('DBCheckbox', () => {
path
});
// TODO: There is an issue with playwright ariaSnapshot not working properly for react
- // runAriaSnapshotTest({ path });
+ //
});
diff --git a/showcases/e2e/custom-select/custom-select-a11y-checker.spec.ts b/showcases/e2e/custom-select/custom-select-a11y-checker.spec.ts
new file mode 100644
index 000000000000..0e63ed2e8780
--- /dev/null
+++ b/showcases/e2e/custom-select/custom-select-a11y-checker.spec.ts
@@ -0,0 +1,8 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+const path = '03/custom-select';
+
+test.describe('DBCustomSelect', () => {
+ runA11yCheckerTest({ path });
+});
diff --git a/showcases/e2e/custom-select/custom-select-aria-snapshot.spec.ts b/showcases/e2e/custom-select/custom-select-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..522caf4f0d5c
--- /dev/null
+++ b/showcases/e2e/custom-select/custom-select-aria-snapshot.spec.ts
@@ -0,0 +1,22 @@
+import { type Page, test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+
+const path = '03/custom-select';
+
+const preScreenShot = async (page: Page) => {
+ const components = await page
+ .locator('main')
+ .locator('.db-custom-select')
+ .all();
+ for (const component of components) {
+ await component.evaluate((comp: HTMLElement) => {
+ const detailsElement = comp.querySelector('details');
+ detailsElement.dataset.test = 'true';
+ detailsElement.open = true;
+ });
+ }
+};
+
+test.describe('DBCustomSelect', () => {
+ runAriaSnapshotTest({ path, preScreenShot });
+});
diff --git a/showcases/e2e/custom-select/custom-select-a11y.spec.ts b/showcases/e2e/custom-select/custom-select-axe-core.spec.ts
similarity index 74%
rename from showcases/e2e/custom-select/custom-select-a11y.spec.ts
rename to showcases/e2e/custom-select/custom-select-axe-core.spec.ts
index a5dc929832c8..098f8e8eb9f6 100644
--- a/showcases/e2e/custom-select/custom-select-a11y.spec.ts
+++ b/showcases/e2e/custom-select/custom-select-axe-core.spec.ts
@@ -1,5 +1,5 @@
import { test } from '@playwright/test';
-import { runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
const path = '03/custom-select';
@@ -8,5 +8,4 @@ test.describe('DBCustomSelect', () => {
runAxeCoreTest({ path });
runAxeCoreTest({ path, color: lvl3 });
runAxeCoreTest({ path, density: 'functional' });
- runA11yCheckerTest({ path });
});
diff --git a/showcases/e2e/custom-select/custom-select-snapshot.spec.ts b/showcases/e2e/custom-select/custom-select-visual-snapshot.spec.ts
similarity index 81%
rename from showcases/e2e/custom-select/custom-select-snapshot.spec.ts
rename to showcases/e2e/custom-select/custom-select-visual-snapshot.spec.ts
index c4582ede1839..8aa6463bd5af 100644
--- a/showcases/e2e/custom-select/custom-select-snapshot.spec.ts
+++ b/showcases/e2e/custom-select/custom-select-visual-snapshot.spec.ts
@@ -1,5 +1,5 @@
import { type Page, test } from '@playwright/test';
-import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
+import { getDefaultScreenshotTest } from '../default.ts';
const path = '03/custom-select';
@@ -19,5 +19,4 @@ const preScreenShot = async (page: Page) => {
test.describe('DBCustomSelect', () => {
getDefaultScreenshotTest({ path, preScreenShot });
- runAriaSnapshotTest({ path, preScreenShot });
});
diff --git a/showcases/e2e/divider/divider-a11y-checker.spec.ts b/showcases/e2e/divider/divider-a11y-checker.spec.ts
new file mode 100644
index 000000000000..b8c1b4fc4671
--- /dev/null
+++ b/showcases/e2e/divider/divider-a11y-checker.spec.ts
@@ -0,0 +1,6 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBDivider', () => {
+ runA11yCheckerTest({ path: '01/divider' });
+});
diff --git a/showcases/e2e/divider/divider-aria-snapshot.spec.ts b/showcases/e2e/divider/divider-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..4945798f94d2
--- /dev/null
+++ b/showcases/e2e/divider/divider-aria-snapshot.spec.ts
@@ -0,0 +1,8 @@
+import { test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+
+const path = '01/divider';
+const fixedHeight = 1500;
+test.describe('DBDivider', () => {
+ runAriaSnapshotTest({ path, fixedHeight });
+});
diff --git a/showcases/e2e/divider/divider-a11y.spec.ts b/showcases/e2e/divider/divider-axe-core.spec.ts
similarity index 71%
rename from showcases/e2e/divider/divider-a11y.spec.ts
rename to showcases/e2e/divider/divider-axe-core.spec.ts
index d015e1180cfe..a1373a2dad88 100644
--- a/showcases/e2e/divider/divider-a11y.spec.ts
+++ b/showcases/e2e/divider/divider-axe-core.spec.ts
@@ -1,10 +1,9 @@
import { test } from '@playwright/test';
-import { runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
test.describe('DBDivider', () => {
runAxeCoreTest({ path: '01/divider' });
runAxeCoreTest({ path: '01/divider', color: lvl3 });
runAxeCoreTest({ path: '01/divider', density: 'functional' });
- runA11yCheckerTest({ path: '01/divider' });
});
diff --git a/showcases/e2e/divider/divider-snapshot.spec.ts b/showcases/e2e/divider/divider-visual-snapshot.spec.ts
similarity index 59%
rename from showcases/e2e/divider/divider-snapshot.spec.ts
rename to showcases/e2e/divider/divider-visual-snapshot.spec.ts
index 1979d3d05713..e512b569598e 100644
--- a/showcases/e2e/divider/divider-snapshot.spec.ts
+++ b/showcases/e2e/divider/divider-visual-snapshot.spec.ts
@@ -1,9 +1,8 @@
import { test } from '@playwright/test';
-import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
+import { getDefaultScreenshotTest } from '../default.ts';
const path = '01/divider';
const fixedHeight = 1500;
test.describe('DBDivider', () => {
getDefaultScreenshotTest({ path, fixedHeight });
- runAriaSnapshotTest({ path, fixedHeight });
});
diff --git a/showcases/e2e/drawer/drawer-a11y-checker.spec.ts b/showcases/e2e/drawer/drawer-a11y-checker.spec.ts
new file mode 100644
index 000000000000..d6ff4a0c44ff
--- /dev/null
+++ b/showcases/e2e/drawer/drawer-a11y-checker.spec.ts
@@ -0,0 +1,6 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBDrawer', () => {
+ runA11yCheckerTest({ path: '01/drawer' });
+});
diff --git a/showcases/e2e/drawer/drawer-aria-snapshot.spec.ts b/showcases/e2e/drawer/drawer-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..2b90cf7de020
--- /dev/null
+++ b/showcases/e2e/drawer/drawer-aria-snapshot.spec.ts
@@ -0,0 +1,7 @@
+import { test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+
+const path = '01/drawer';
+test.describe('DBDrawer', () => {
+ runAriaSnapshotTest({ path });
+});
diff --git a/showcases/e2e/drawer/drawer-a11y.spec.ts b/showcases/e2e/drawer/drawer-axe-core.spec.ts
similarity index 80%
rename from showcases/e2e/drawer/drawer-a11y.spec.ts
rename to showcases/e2e/drawer/drawer-axe-core.spec.ts
index 5aa1a61e86a1..bd45173105a6 100644
--- a/showcases/e2e/drawer/drawer-a11y.spec.ts
+++ b/showcases/e2e/drawer/drawer-axe-core.spec.ts
@@ -1,5 +1,5 @@
import { type Page, test } from '@playwright/test';
-import { runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
const preAxe = async (page: Page) => {
@@ -11,5 +11,4 @@ test.describe('DBDrawer', () => {
runAxeCoreTest({ path: '01/drawer', preAxe });
runAxeCoreTest({ path: '01/drawer', preAxe, color: lvl3 });
runAxeCoreTest({ path: '01/drawer', preAxe, density: 'functional' });
- runA11yCheckerTest({ path: '01/drawer' });
});
diff --git a/showcases/e2e/drawer/drawer-snapshot.spec.ts b/showcases/e2e/drawer/drawer-visual-snapshot.spec.ts
similarity index 56%
rename from showcases/e2e/drawer/drawer-snapshot.spec.ts
rename to showcases/e2e/drawer/drawer-visual-snapshot.spec.ts
index 0386c2906cf0..1189310302c5 100644
--- a/showcases/e2e/drawer/drawer-snapshot.spec.ts
+++ b/showcases/e2e/drawer/drawer-visual-snapshot.spec.ts
@@ -1,10 +1,9 @@
import { test } from '@playwright/test';
-import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
+import { getDefaultScreenshotTest } from '../default.ts';
const path = '01/drawer';
test.describe('DBDrawer', () => {
getDefaultScreenshotTest({
path
});
- runAriaSnapshotTest({ path });
});
diff --git a/showcases/e2e/header/header-a11y-checker.spec.ts b/showcases/e2e/header/header-a11y-checker.spec.ts
new file mode 100644
index 000000000000..4acb6416a798
--- /dev/null
+++ b/showcases/e2e/header/header-a11y-checker.spec.ts
@@ -0,0 +1,10 @@
+import { test } from '@playwright/test';
+import { hasWebComponentSyntax, runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBHeader', () => {
+ // TODO: We skip this for now until mitosis output is correct
+ runA11yCheckerTest({
+ path: '01/header',
+ skipChecker: hasWebComponentSyntax(process.env.showcase)
+ });
+});
diff --git a/showcases/e2e/header/header-aria-snapshot.spec.ts b/showcases/e2e/header/header-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..975806a9cf78
--- /dev/null
+++ b/showcases/e2e/header/header-aria-snapshot.spec.ts
@@ -0,0 +1,11 @@
+import { test } from '@playwright/test';
+import { isStencil, runAriaSnapshotTest } from '../default.ts';
+
+const path = '01/header';
+test.describe('DBHeader', () => {
+ if (isStencil(process.env.showcase)) {
+ test.skip();
+ }
+
+ runAriaSnapshotTest({ path });
+});
diff --git a/showcases/e2e/header/header-a11y.spec.ts b/showcases/e2e/header/header-axe-core.spec.ts
similarity index 72%
rename from showcases/e2e/header/header-a11y.spec.ts
rename to showcases/e2e/header/header-axe-core.spec.ts
index 545bb08ef3cb..dd4e8f347c84 100644
--- a/showcases/e2e/header/header-a11y.spec.ts
+++ b/showcases/e2e/header/header-axe-core.spec.ts
@@ -1,9 +1,5 @@
import { test } from '@playwright/test';
-import {
- hasWebComponentSyntax,
- runA11yCheckerTest,
- runAxeCoreTest
-} from '../default.ts';
+import { hasWebComponentSyntax, runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
test.describe('DBHeader', () => {
@@ -22,8 +18,4 @@ test.describe('DBHeader', () => {
skipAxe: hasWebComponentSyntax(process.env.showcase)
});
// TODO: We skip this for now until mitosis output is correct
- runA11yCheckerTest({
- path: '01/header',
- skipChecker: hasWebComponentSyntax(process.env.showcase)
- });
});
diff --git a/showcases/e2e/header/header-snapshot.spec.ts b/showcases/e2e/header/header-visual-snapshot.spec.ts
similarity index 61%
rename from showcases/e2e/header/header-snapshot.spec.ts
rename to showcases/e2e/header/header-visual-snapshot.spec.ts
index 6c3c4c53bef2..7790a64effd6 100644
--- a/showcases/e2e/header/header-snapshot.spec.ts
+++ b/showcases/e2e/header/header-visual-snapshot.spec.ts
@@ -1,9 +1,5 @@
import { test } from '@playwright/test';
-import {
- getDefaultScreenshotTest,
- isStencil,
- runAriaSnapshotTest
-} from '../default.ts';
+import { getDefaultScreenshotTest, isStencil } from '../default.ts';
const path = '01/header';
test.describe('DBHeader', () => {
@@ -12,5 +8,4 @@ test.describe('DBHeader', () => {
}
getDefaultScreenshotTest({ path });
- runAriaSnapshotTest({ path });
});
diff --git a/showcases/e2e/home/showcase-home.spec.ts b/showcases/e2e/home/showcase-home.spec.ts
index 93a165efd31b..60dda1bcb9bd 100644
--- a/showcases/e2e/home/showcase-home.spec.ts
+++ b/showcases/e2e/home/showcase-home.spec.ts
@@ -1,5 +1,5 @@
import { AxeBuilder } from '@axe-core/playwright';
-import { expect, test, type Page } from '@playwright/test';
+import { expect, type Page, test } from '@playwright/test';
import { hasWebComponentSyntax, isStencil, waitForDBPage } from '../default';
const testFormComponents = async (
diff --git a/showcases/e2e/icon/icon-a11y-checker.spec.ts b/showcases/e2e/icon/icon-a11y-checker.spec.ts
new file mode 100644
index 000000000000..eda1141dcbb4
--- /dev/null
+++ b/showcases/e2e/icon/icon-a11y-checker.spec.ts
@@ -0,0 +1,6 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBIcon', () => {
+ runA11yCheckerTest({ path: '04/icon' });
+});
diff --git a/showcases/e2e/icon/icon-aria-snapshot.spec.ts b/showcases/e2e/icon/icon-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..b5028306f255
--- /dev/null
+++ b/showcases/e2e/icon/icon-aria-snapshot.spec.ts
@@ -0,0 +1,7 @@
+import { test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+
+const path = '04/icon';
+test.describe('DBIcon', () => {
+ runAriaSnapshotTest({ path });
+});
diff --git a/showcases/e2e/icon/icon-a11y.spec.ts b/showcases/e2e/icon/icon-axe-core.spec.ts
similarity index 71%
rename from showcases/e2e/icon/icon-a11y.spec.ts
rename to showcases/e2e/icon/icon-axe-core.spec.ts
index 26fca2761261..327f808cac2d 100644
--- a/showcases/e2e/icon/icon-a11y.spec.ts
+++ b/showcases/e2e/icon/icon-axe-core.spec.ts
@@ -1,10 +1,9 @@
import { test } from '@playwright/test';
-import { runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
test.describe('DBIcon', () => {
runAxeCoreTest({ path: '04/icon' });
runAxeCoreTest({ path: '04/icon', color: lvl3 });
runAxeCoreTest({ path: '04/icon', density: 'functional' });
- runA11yCheckerTest({ path: '04/icon' });
});
diff --git a/showcases/e2e/icon/icon-snapshot.spec.ts b/showcases/e2e/icon/icon-visual-snapshot.spec.ts
similarity index 55%
rename from showcases/e2e/icon/icon-snapshot.spec.ts
rename to showcases/e2e/icon/icon-visual-snapshot.spec.ts
index f27142ec1464..b866e50de5de 100644
--- a/showcases/e2e/icon/icon-snapshot.spec.ts
+++ b/showcases/e2e/icon/icon-visual-snapshot.spec.ts
@@ -1,8 +1,7 @@
import { test } from '@playwright/test';
-import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
+import { getDefaultScreenshotTest } from '../default.ts';
const path = '04/icon';
test.describe('DBIcon', () => {
getDefaultScreenshotTest({ path });
- runAriaSnapshotTest({ path });
});
diff --git a/showcases/e2e/infotext/infotext-a11y-checker.spec.ts b/showcases/e2e/infotext/infotext-a11y-checker.spec.ts
new file mode 100644
index 000000000000..8c27080e3057
--- /dev/null
+++ b/showcases/e2e/infotext/infotext-a11y-checker.spec.ts
@@ -0,0 +1,6 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBInfotext', () => {
+ runA11yCheckerTest({ path: '04/infotext' });
+});
diff --git a/showcases/e2e/infotext/infotext-aria-snapshot.spec.ts b/showcases/e2e/infotext/infotext-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..f6bd139ea820
--- /dev/null
+++ b/showcases/e2e/infotext/infotext-aria-snapshot.spec.ts
@@ -0,0 +1,7 @@
+import { test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+
+const path = '04/infotext';
+test.describe('DBInfotext', () => {
+ runAriaSnapshotTest({ path });
+});
diff --git a/showcases/e2e/infotext/infotext-a11y.spec.ts b/showcases/e2e/infotext/infotext-axe-core.spec.ts
similarity index 71%
rename from showcases/e2e/infotext/infotext-a11y.spec.ts
rename to showcases/e2e/infotext/infotext-axe-core.spec.ts
index ad60b2a5651a..d39cdd67992a 100644
--- a/showcases/e2e/infotext/infotext-a11y.spec.ts
+++ b/showcases/e2e/infotext/infotext-axe-core.spec.ts
@@ -1,10 +1,9 @@
import { test } from '@playwright/test';
-import { runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
test.describe('DBInfotext', () => {
runAxeCoreTest({ path: '04/infotext' });
runAxeCoreTest({ path: '04/infotext', color: lvl3 });
runAxeCoreTest({ path: '04/infotext', density: 'functional' });
- runA11yCheckerTest({ path: '04/infotext' });
});
diff --git a/showcases/e2e/infotext/infotext-snapshot.spec.ts b/showcases/e2e/infotext/infotext-visual-snapshot.spec.ts
similarity index 56%
rename from showcases/e2e/infotext/infotext-snapshot.spec.ts
rename to showcases/e2e/infotext/infotext-visual-snapshot.spec.ts
index a07d47cb6172..7a31b9a51584 100644
--- a/showcases/e2e/infotext/infotext-snapshot.spec.ts
+++ b/showcases/e2e/infotext/infotext-visual-snapshot.spec.ts
@@ -1,8 +1,7 @@
import { test } from '@playwright/test';
-import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
+import { getDefaultScreenshotTest } from '../default.ts';
const path = '04/infotext';
test.describe('DBInfotext', () => {
getDefaultScreenshotTest({ path });
- runAriaSnapshotTest({ path });
});
diff --git a/showcases/e2e/input/input-a11y-checker.spec.ts b/showcases/e2e/input/input-a11y-checker.spec.ts
new file mode 100644
index 000000000000..af97d2ec65a8
--- /dev/null
+++ b/showcases/e2e/input/input-a11y-checker.spec.ts
@@ -0,0 +1,8 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBInput', () => {
+ runA11yCheckerTest({
+ path: '03/input'
+ });
+});
diff --git a/showcases/e2e/input/input-aria-snapshot.spec.ts b/showcases/e2e/input/input-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..e996c8912ea3
--- /dev/null
+++ b/showcases/e2e/input/input-aria-snapshot.spec.ts
@@ -0,0 +1,7 @@
+import { test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+
+const path = '03/input';
+test.describe('DBInput', () => {
+ runAriaSnapshotTest({ path });
+});
diff --git a/showcases/e2e/input/input-a11y.spec.ts b/showcases/e2e/input/input-axe-core.spec.ts
similarity index 71%
rename from showcases/e2e/input/input-a11y.spec.ts
rename to showcases/e2e/input/input-axe-core.spec.ts
index 64845ada3cf7..db301387acdd 100644
--- a/showcases/e2e/input/input-a11y.spec.ts
+++ b/showcases/e2e/input/input-axe-core.spec.ts
@@ -1,5 +1,5 @@
import { test } from '@playwright/test';
-import { runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
test.describe('DBInput', () => {
@@ -9,7 +9,4 @@ test.describe('DBInput', () => {
path: '03/input',
density: 'functional'
});
- runA11yCheckerTest({
- path: '03/input'
- });
});
diff --git a/showcases/e2e/input/input-snapshot.spec.ts b/showcases/e2e/input/input-visual-snapshot.spec.ts
similarity index 56%
rename from showcases/e2e/input/input-snapshot.spec.ts
rename to showcases/e2e/input/input-visual-snapshot.spec.ts
index 73f718b52b56..ffac172fa0e0 100644
--- a/showcases/e2e/input/input-snapshot.spec.ts
+++ b/showcases/e2e/input/input-visual-snapshot.spec.ts
@@ -1,10 +1,9 @@
import { test } from '@playwright/test';
-import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
+import { getDefaultScreenshotTest } from '../default.ts';
const path = '03/input';
test.describe('DBInput', () => {
getDefaultScreenshotTest({
path
});
- runAriaSnapshotTest({ path });
});
diff --git a/showcases/e2e/link/link-a11y-checker.spec.ts b/showcases/e2e/link/link-a11y-checker.spec.ts
new file mode 100644
index 000000000000..e97c2203b928
--- /dev/null
+++ b/showcases/e2e/link/link-a11y-checker.spec.ts
@@ -0,0 +1,10 @@
+import { test } from '@playwright/test';
+import { isStencil, runA11yCheckerTest } from '../default.ts';
+
+const aCheckerDisableRules = isStencil(process.env.showcase)
+ ? ['text_contrast_sufficient', 'aria_attribute_valid']
+ : ['aria_attribute_valid']; // TODO: This is a false positive -> add an issue in https://github.com/IBMa/equal-access
+
+test.describe('DBLink', () => {
+ runA11yCheckerTest({ path: '02/link', aCheckerDisableRules });
+});
diff --git a/showcases/e2e/link/link-aria-snapshot.spec.ts b/showcases/e2e/link/link-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..ea1f9f2f952a
--- /dev/null
+++ b/showcases/e2e/link/link-aria-snapshot.spec.ts
@@ -0,0 +1,7 @@
+import { test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+
+const path = '02/link';
+test.describe('DBLink', () => {
+ runAriaSnapshotTest({ path });
+});
diff --git a/showcases/e2e/link/link-a11y.spec.ts b/showcases/e2e/link/link-axe-core.spec.ts
similarity index 78%
rename from showcases/e2e/link/link-a11y.spec.ts
rename to showcases/e2e/link/link-axe-core.spec.ts
index bd7486335aeb..4a1ed5869b0f 100644
--- a/showcases/e2e/link/link-a11y.spec.ts
+++ b/showcases/e2e/link/link-axe-core.spec.ts
@@ -1,5 +1,5 @@
import { test } from '@playwright/test';
-import { isStencil, runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { isStencil, runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
const aCheckerDisableRules = isStencil(process.env.showcase)
@@ -10,5 +10,4 @@ test.describe('DBLink', () => {
runAxeCoreTest({ path: '02/link' });
runAxeCoreTest({ path: '02/link', color: lvl3 });
runAxeCoreTest({ path: '02/link', density: 'functional' });
- runA11yCheckerTest({ path: '02/link', aCheckerDisableRules });
});
diff --git a/showcases/e2e/link/link-snapshot.spec.ts b/showcases/e2e/link/link-visual-snapshot.spec.ts
similarity index 56%
rename from showcases/e2e/link/link-snapshot.spec.ts
rename to showcases/e2e/link/link-visual-snapshot.spec.ts
index f42daec07a61..f9a228292ed2 100644
--- a/showcases/e2e/link/link-snapshot.spec.ts
+++ b/showcases/e2e/link/link-visual-snapshot.spec.ts
@@ -1,10 +1,9 @@
import { test } from '@playwright/test';
-import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
+import { getDefaultScreenshotTest } from '../default.ts';
const path = '02/link';
test.describe('DBLink', () => {
getDefaultScreenshotTest({
path
});
- runAriaSnapshotTest({ path });
});
diff --git a/showcases/e2e/navigation-item/navigation-item-a11y-checker.spec.ts b/showcases/e2e/navigation-item/navigation-item-a11y-checker.spec.ts
new file mode 100644
index 000000000000..4bbddc66609c
--- /dev/null
+++ b/showcases/e2e/navigation-item/navigation-item-a11y-checker.spec.ts
@@ -0,0 +1,8 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+const fixedHeight = 1800; // Set fixed height, because of issues with angulars `ngAfterContentInit`
+
+test.describe('DBNavigationItem', () => {
+ runA11yCheckerTest({ path: '05/navigation-item', fixedHeight });
+});
diff --git a/showcases/e2e/navigation-item/navigation-item-aria-snapshot.spec.ts b/showcases/e2e/navigation-item/navigation-item-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..afd24a725217
--- /dev/null
+++ b/showcases/e2e/navigation-item/navigation-item-aria-snapshot.spec.ts
@@ -0,0 +1,13 @@
+import { test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+
+const path = '05/navigation-item';
+const fixedHeight = 1800;
+test.describe('DBNavigationItem', () => {
+ // Set fixed height, because of issues with angulars `ngAfterContentInit`
+
+ runAriaSnapshotTest({
+ path,
+ fixedHeight
+ });
+});
diff --git a/showcases/e2e/navigation-item/navigation-item-a11y.spec.ts b/showcases/e2e/navigation-item/navigation-item-axe-core.spec.ts
similarity index 77%
rename from showcases/e2e/navigation-item/navigation-item-a11y.spec.ts
rename to showcases/e2e/navigation-item/navigation-item-axe-core.spec.ts
index 1d6f602ef5e1..d15f3a279e40 100644
--- a/showcases/e2e/navigation-item/navigation-item-a11y.spec.ts
+++ b/showcases/e2e/navigation-item/navigation-item-axe-core.spec.ts
@@ -1,9 +1,5 @@
import { test } from '@playwright/test';
-import {
- hasWebComponentSyntax,
- runA11yCheckerTest,
- runAxeCoreTest
-} from '../default.ts';
+import { hasWebComponentSyntax, runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
const fixedHeight = 1800; // Set fixed height, because of issues with angulars `ngAfterContentInit`
@@ -22,5 +18,4 @@ test.describe('DBNavigationItem', () => {
fixedHeight,
skipAxe
});
- runA11yCheckerTest({ path: '05/navigation-item', fixedHeight });
});
diff --git a/showcases/e2e/navigation-item/navigation-item-snapshot.spec.ts b/showcases/e2e/navigation-item/navigation-item-visual-snapshot.spec.ts
similarity index 68%
rename from showcases/e2e/navigation-item/navigation-item-snapshot.spec.ts
rename to showcases/e2e/navigation-item/navigation-item-visual-snapshot.spec.ts
index edd6a64194ab..75fd3b306c19 100644
--- a/showcases/e2e/navigation-item/navigation-item-snapshot.spec.ts
+++ b/showcases/e2e/navigation-item/navigation-item-visual-snapshot.spec.ts
@@ -1,5 +1,5 @@
import { test } from '@playwright/test';
-import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
+import { getDefaultScreenshotTest } from '../default.ts';
const path = '05/navigation-item';
const fixedHeight = 1800;
@@ -9,8 +9,4 @@ test.describe('DBNavigationItem', () => {
path,
fixedHeight
});
- runAriaSnapshotTest({
- path,
- fixedHeight
- });
});
diff --git a/showcases/e2e/navigation/navigation-a11y-checker.spec.ts b/showcases/e2e/navigation/navigation-a11y-checker.spec.ts
new file mode 100644
index 000000000000..1f42463afd37
--- /dev/null
+++ b/showcases/e2e/navigation/navigation-a11y-checker.spec.ts
@@ -0,0 +1,6 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBNavigation', () => {
+ runA11yCheckerTest({ path: '05/navigation' });
+});
diff --git a/showcases/e2e/navigation/navigation-aria-snapshot.spec.ts b/showcases/e2e/navigation/navigation-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..2fa08c9f2fc0
--- /dev/null
+++ b/showcases/e2e/navigation/navigation-aria-snapshot.spec.ts
@@ -0,0 +1,11 @@
+import { test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+
+const path = '05/navigation';
+const fixedHeight = 1200;
+test.describe('DBNavigation', () => {
+ runAriaSnapshotTest({
+ path,
+ fixedHeight
+ });
+});
diff --git a/showcases/e2e/navigation/navigation-a11y.spec.ts b/showcases/e2e/navigation/navigation-axe-core.spec.ts
similarity index 73%
rename from showcases/e2e/navigation/navigation-a11y.spec.ts
rename to showcases/e2e/navigation/navigation-axe-core.spec.ts
index 72142436aedd..960d5fa6ec85 100644
--- a/showcases/e2e/navigation/navigation-a11y.spec.ts
+++ b/showcases/e2e/navigation/navigation-axe-core.spec.ts
@@ -1,9 +1,5 @@
import { test } from '@playwright/test';
-import {
- hasWebComponentSyntax,
- runA11yCheckerTest,
- runAxeCoreTest
-} from '../default.ts';
+import { hasWebComponentSyntax, runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
const skipAxe = hasWebComponentSyntax(process.env.showcase);
@@ -11,5 +7,4 @@ test.describe('DBNavigation', () => {
runAxeCoreTest({ path: '05/navigation', skipAxe });
runAxeCoreTest({ path: '05/navigation', color: lvl3, skipAxe });
runAxeCoreTest({ path: '05/navigation', density: 'functional', skipAxe });
- runA11yCheckerTest({ path: '05/navigation' });
});
diff --git a/showcases/e2e/navigation/navigation-snapshot.spec.ts b/showcases/e2e/navigation/navigation-visual-snapshot.spec.ts
similarity index 60%
rename from showcases/e2e/navigation/navigation-snapshot.spec.ts
rename to showcases/e2e/navigation/navigation-visual-snapshot.spec.ts
index 7f107752a122..82921371de7b 100644
--- a/showcases/e2e/navigation/navigation-snapshot.spec.ts
+++ b/showcases/e2e/navigation/navigation-visual-snapshot.spec.ts
@@ -1,5 +1,5 @@
import { test } from '@playwright/test';
-import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
+import { getDefaultScreenshotTest } from '../default.ts';
const path = '05/navigation';
const fixedHeight = 1200;
@@ -8,8 +8,4 @@ test.describe('DBNavigation', () => {
path,
fixedHeight
});
- runAriaSnapshotTest({
- path,
- fixedHeight
- });
});
diff --git a/showcases/e2e/notification/notification-a11y-checker.spec.ts b/showcases/e2e/notification/notification-a11y-checker.spec.ts
new file mode 100644
index 000000000000..2ace5491e165
--- /dev/null
+++ b/showcases/e2e/notification/notification-a11y-checker.spec.ts
@@ -0,0 +1,6 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBNotification', () => {
+ runA11yCheckerTest({ path: '06/notification' });
+});
diff --git a/showcases/e2e/notification/notification-aria-snapshot.spec.ts b/showcases/e2e/notification/notification-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..63c69ad61c05
--- /dev/null
+++ b/showcases/e2e/notification/notification-aria-snapshot.spec.ts
@@ -0,0 +1,7 @@
+import { test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+
+const path = '06/notification';
+test.describe('DBNotification', () => {
+ runAriaSnapshotTest({ path });
+});
diff --git a/showcases/e2e/notification/notification-a11y.spec.ts b/showcases/e2e/notification/notification-axe-core.spec.ts
similarity index 72%
rename from showcases/e2e/notification/notification-a11y.spec.ts
rename to showcases/e2e/notification/notification-axe-core.spec.ts
index e05cc9259179..f4130b1c96ff 100644
--- a/showcases/e2e/notification/notification-a11y.spec.ts
+++ b/showcases/e2e/notification/notification-axe-core.spec.ts
@@ -1,10 +1,9 @@
import { test } from '@playwright/test';
-import { runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
test.describe('DBNotification', () => {
runAxeCoreTest({ path: '06/notification' });
runAxeCoreTest({ path: '06/notification', color: lvl3 });
runAxeCoreTest({ path: '06/notification', density: 'functional' });
- runA11yCheckerTest({ path: '06/notification' });
});
diff --git a/showcases/e2e/notification/notification-snapshot.spec.ts b/showcases/e2e/notification/notification-visual-snapshot.spec.ts
similarity index 58%
rename from showcases/e2e/notification/notification-snapshot.spec.ts
rename to showcases/e2e/notification/notification-visual-snapshot.spec.ts
index 74f51146720f..49cf39279c05 100644
--- a/showcases/e2e/notification/notification-snapshot.spec.ts
+++ b/showcases/e2e/notification/notification-visual-snapshot.spec.ts
@@ -1,8 +1,7 @@
import { test } from '@playwright/test';
-import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
+import { getDefaultScreenshotTest } from '../default.ts';
const path = '06/notification';
test.describe('DBNotification', () => {
getDefaultScreenshotTest({ path });
- runAriaSnapshotTest({ path });
});
diff --git a/showcases/e2e/popover/popover-a11y-checker.spec.ts b/showcases/e2e/popover/popover-a11y-checker.spec.ts
new file mode 100644
index 000000000000..a50e56824dfa
--- /dev/null
+++ b/showcases/e2e/popover/popover-a11y-checker.spec.ts
@@ -0,0 +1,6 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBPopover', () => {
+ runA11yCheckerTest({ path: '01/popover' });
+});
diff --git a/showcases/e2e/popover/popover-aria-snapshot.spec.ts b/showcases/e2e/popover/popover-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..4921d46e28da
--- /dev/null
+++ b/showcases/e2e/popover/popover-aria-snapshot.spec.ts
@@ -0,0 +1,13 @@
+import { test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+import { hoverPre } from '../fixtures/hover';
+
+const selector = '.db-popover';
+const path = '01/popover';
+
+test.describe('DBPopover', () => {
+ runAriaSnapshotTest({
+ path,
+ preScreenShot: async (page) => hoverPre(page, selector)
+ });
+});
diff --git a/showcases/e2e/popover/popover-a11y.spec.ts b/showcases/e2e/popover/popover-axe-core.spec.ts
similarity index 80%
rename from showcases/e2e/popover/popover-a11y.spec.ts
rename to showcases/e2e/popover/popover-axe-core.spec.ts
index 04f274ce3f8e..6e7bc1b2bb7b 100644
--- a/showcases/e2e/popover/popover-a11y.spec.ts
+++ b/showcases/e2e/popover/popover-axe-core.spec.ts
@@ -1,5 +1,5 @@
import { type Page, test } from '@playwright/test';
-import { runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { runAxeCoreTest } from '../default.ts';
import { hoverPre } from '../fixtures/hover';
import { lvl3 } from '../fixtures/variants';
@@ -11,5 +11,4 @@ test.describe('DBPopover', () => {
runAxeCoreTest({ path: '01/popover', preAxe });
runAxeCoreTest({ path: '01/popover', color: lvl3, preAxe });
runAxeCoreTest({ path: '01/popover', density: 'functional', preAxe });
- runA11yCheckerTest({ path: '01/popover' });
});
diff --git a/showcases/e2e/popover/popover-snapshot.spec.ts b/showcases/e2e/popover/popover-visual-snapshot.spec.ts
similarity index 68%
rename from showcases/e2e/popover/popover-snapshot.spec.ts
rename to showcases/e2e/popover/popover-visual-snapshot.spec.ts
index 358791770599..b6431c6d3746 100644
--- a/showcases/e2e/popover/popover-snapshot.spec.ts
+++ b/showcases/e2e/popover/popover-visual-snapshot.spec.ts
@@ -1,9 +1,5 @@
import { test } from '@playwright/test';
-import {
- getDefaultScreenshotTest,
- isStencil,
- runAriaSnapshotTest
-} from '../default.ts';
+import { getDefaultScreenshotTest, isStencil } from '../default.ts';
import { hoverPre } from '../fixtures/hover';
const selector = '.db-popover';
@@ -16,8 +12,4 @@ test.describe('DBPopover', () => {
// The fixed popover may differ slightly in different browsers
ratio: isStencil(process.env.showcase) ? '0.05' : '0.01'
});
- runAriaSnapshotTest({
- path,
- preScreenShot: async (page) => hoverPre(page, selector)
- });
});
diff --git a/showcases/e2e/radio/radio-a11y-checker.spec.ts b/showcases/e2e/radio/radio-a11y-checker.spec.ts
new file mode 100644
index 000000000000..8b6f17433e08
--- /dev/null
+++ b/showcases/e2e/radio/radio-a11y-checker.spec.ts
@@ -0,0 +1,6 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBRadio', () => {
+ runA11yCheckerTest({ path: '03/radio' });
+});
diff --git a/showcases/e2e/radio/radio-aria-snapshot.spec.ts b/showcases/e2e/radio/radio-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..2e09ecb3b797
--- /dev/null
+++ b/showcases/e2e/radio/radio-aria-snapshot.spec.ts
@@ -0,0 +1,7 @@
+import { test } from '@playwright/test';
+
+const path = '03/radio';
+test.describe('DBRadio', () => {
+ // TODO: There is an issue with playwright ariaSnapshot not working properly for react
+ // runAriaSnapshotTest({ path });
+});
diff --git a/showcases/e2e/radio/radio-a11y.spec.ts b/showcases/e2e/radio/radio-axe-core.spec.ts
similarity index 71%
rename from showcases/e2e/radio/radio-a11y.spec.ts
rename to showcases/e2e/radio/radio-axe-core.spec.ts
index 2df86d9b97b0..bf95ef8ac66f 100644
--- a/showcases/e2e/radio/radio-a11y.spec.ts
+++ b/showcases/e2e/radio/radio-axe-core.spec.ts
@@ -1,10 +1,9 @@
import { test } from '@playwright/test';
-import { runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
test.describe('DBRadio', () => {
runAxeCoreTest({ path: '03/radio' });
runAxeCoreTest({ path: '03/radio', color: lvl3 });
runAxeCoreTest({ path: '03/radio', density: 'functional' });
- runA11yCheckerTest({ path: '03/radio' });
});
diff --git a/showcases/e2e/radio/radio-snapshot.spec.ts b/showcases/e2e/radio/radio-visual-snapshot.spec.ts
similarity index 89%
rename from showcases/e2e/radio/radio-snapshot.spec.ts
rename to showcases/e2e/radio/radio-visual-snapshot.spec.ts
index c5fcc02f2358..078cfb10cca8 100644
--- a/showcases/e2e/radio/radio-snapshot.spec.ts
+++ b/showcases/e2e/radio/radio-visual-snapshot.spec.ts
@@ -7,5 +7,5 @@ test.describe('DBRadio', () => {
path
});
// TODO: There is an issue with playwright ariaSnapshot not working properly for react
- // runAriaSnapshotTest({ path });
+ //
});
diff --git a/showcases/e2e/section/section-a11y-checker.spec.ts b/showcases/e2e/section/section-a11y-checker.spec.ts
new file mode 100644
index 000000000000..73736b111b68
--- /dev/null
+++ b/showcases/e2e/section/section-a11y-checker.spec.ts
@@ -0,0 +1,6 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBSection', () => {
+ runA11yCheckerTest({ path: '01/section' });
+});
diff --git a/showcases/e2e/section/section-aria-snapshot.spec.ts b/showcases/e2e/section/section-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..908ae8c117ce
--- /dev/null
+++ b/showcases/e2e/section/section-aria-snapshot.spec.ts
@@ -0,0 +1,7 @@
+import { test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+
+const path = '01/section';
+test.describe('DBSection', () => {
+ runAriaSnapshotTest({ path });
+});
diff --git a/showcases/e2e/section/section-a11y.spec.ts b/showcases/e2e/section/section-axe-core.spec.ts
similarity index 71%
rename from showcases/e2e/section/section-a11y.spec.ts
rename to showcases/e2e/section/section-axe-core.spec.ts
index 14f921bf8ba7..d6a0b3cdff6c 100644
--- a/showcases/e2e/section/section-a11y.spec.ts
+++ b/showcases/e2e/section/section-axe-core.spec.ts
@@ -1,10 +1,9 @@
import { test } from '@playwright/test';
-import { runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
test.describe('DBSection', () => {
runAxeCoreTest({ path: '01/section' });
runAxeCoreTest({ path: '01/section', color: lvl3 });
runAxeCoreTest({ path: '01/section', density: 'functional' });
- runA11yCheckerTest({ path: '01/section' });
});
diff --git a/showcases/e2e/section/section-snapshot.spec.ts b/showcases/e2e/section/section-visual-snapshot.spec.ts
similarity index 56%
rename from showcases/e2e/section/section-snapshot.spec.ts
rename to showcases/e2e/section/section-visual-snapshot.spec.ts
index 1d816fa835ab..a840542c7bef 100644
--- a/showcases/e2e/section/section-snapshot.spec.ts
+++ b/showcases/e2e/section/section-visual-snapshot.spec.ts
@@ -1,8 +1,7 @@
import { test } from '@playwright/test';
-import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
+import { getDefaultScreenshotTest } from '../default.ts';
const path = '01/section';
test.describe('DBSection', () => {
getDefaultScreenshotTest({ path });
- runAriaSnapshotTest({ path });
});
diff --git a/showcases/e2e/select/select-a11y-checker.spec.ts b/showcases/e2e/select/select-a11y-checker.spec.ts
new file mode 100644
index 000000000000..6a632b0af15b
--- /dev/null
+++ b/showcases/e2e/select/select-a11y-checker.spec.ts
@@ -0,0 +1,6 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBSelect', () => {
+ runA11yCheckerTest({ path: '03/select' });
+});
diff --git a/showcases/e2e/select/select-aria-snapshot.spec.ts b/showcases/e2e/select/select-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..eafb709586b7
--- /dev/null
+++ b/showcases/e2e/select/select-aria-snapshot.spec.ts
@@ -0,0 +1,7 @@
+import { test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+
+const path = '03/select';
+test.describe('DBSelect', () => {
+ runAriaSnapshotTest({ path });
+});
diff --git a/showcases/e2e/select/select-a11y.spec.ts b/showcases/e2e/select/select-axe-core.spec.ts
similarity index 71%
rename from showcases/e2e/select/select-a11y.spec.ts
rename to showcases/e2e/select/select-axe-core.spec.ts
index 4394e43e019d..9bf4d316e2b8 100644
--- a/showcases/e2e/select/select-a11y.spec.ts
+++ b/showcases/e2e/select/select-axe-core.spec.ts
@@ -1,5 +1,5 @@
import { test } from '@playwright/test';
-import { runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
test.describe('DBSelect', () => {
@@ -9,5 +9,4 @@ test.describe('DBSelect', () => {
path: '03/select',
density: 'functional'
});
- runA11yCheckerTest({ path: '03/select' });
});
diff --git a/showcases/e2e/select/select-snapshot.spec.ts b/showcases/e2e/select/select-visual-snapshot.spec.ts
similarity index 56%
rename from showcases/e2e/select/select-snapshot.spec.ts
rename to showcases/e2e/select/select-visual-snapshot.spec.ts
index b0e702c8f669..5b964c162631 100644
--- a/showcases/e2e/select/select-snapshot.spec.ts
+++ b/showcases/e2e/select/select-visual-snapshot.spec.ts
@@ -1,10 +1,9 @@
import { test } from '@playwright/test';
-import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
+import { getDefaultScreenshotTest } from '../default.ts';
const path = '03/select';
test.describe('DBSelect', () => {
getDefaultScreenshotTest({
path
});
- runAriaSnapshotTest({ path });
});
diff --git a/showcases/e2e/stack/stack-a11y-checker.spec.ts b/showcases/e2e/stack/stack-a11y-checker.spec.ts
new file mode 100644
index 000000000000..b0e59f067fc8
--- /dev/null
+++ b/showcases/e2e/stack/stack-a11y-checker.spec.ts
@@ -0,0 +1,6 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBStack', () => {
+ runA11yCheckerTest({ path: '01/stack' });
+});
diff --git a/showcases/e2e/stack/stack-aria-snapshot.spec.ts b/showcases/e2e/stack/stack-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..29921705e267
--- /dev/null
+++ b/showcases/e2e/stack/stack-aria-snapshot.spec.ts
@@ -0,0 +1,8 @@
+import { test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+
+const path = '01/stack';
+
+test.describe('DBStack', () => {
+ runAriaSnapshotTest({ path });
+});
diff --git a/showcases/e2e/stack/stack-a11y.spec.ts b/showcases/e2e/stack/stack-axe-core.spec.ts
similarity index 71%
rename from showcases/e2e/stack/stack-a11y.spec.ts
rename to showcases/e2e/stack/stack-axe-core.spec.ts
index f82b43dac6d2..165f2b2239d7 100644
--- a/showcases/e2e/stack/stack-a11y.spec.ts
+++ b/showcases/e2e/stack/stack-axe-core.spec.ts
@@ -1,5 +1,5 @@
import { test } from '@playwright/test';
-import { runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
test.describe('DBStack', () => {
@@ -9,5 +9,4 @@ test.describe('DBStack', () => {
path: '01/stack',
density: 'functional'
});
- runA11yCheckerTest({ path: '01/stack' });
});
diff --git a/showcases/e2e/stack/stack-snapshot.spec.ts b/showcases/e2e/stack/stack-visual-snapshot.spec.ts
similarity index 100%
rename from showcases/e2e/stack/stack-snapshot.spec.ts
rename to showcases/e2e/stack/stack-visual-snapshot.spec.ts
diff --git a/showcases/e2e/switch/switch-a11y-checker.spec.ts b/showcases/e2e/switch/switch-a11y-checker.spec.ts
new file mode 100644
index 000000000000..4d3308da1b3c
--- /dev/null
+++ b/showcases/e2e/switch/switch-a11y-checker.spec.ts
@@ -0,0 +1,10 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBSwitch', () => {
+ runA11yCheckerTest({
+ path: '03/switch',
+ // It's an issue in the tool: https://github.com/IBMa/equal-access/issues/842
+ aCheckerDisableRules: ['aria_attribute_valid']
+ });
+});
diff --git a/showcases/e2e/switch/switch-aria-snapshot.spec.ts b/showcases/e2e/switch/switch-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..648da005b1ff
--- /dev/null
+++ b/showcases/e2e/switch/switch-aria-snapshot.spec.ts
@@ -0,0 +1,8 @@
+import { test } from '@playwright/test';
+
+const path = '03/switch';
+
+test.describe('DBSwitch', () => {
+ // TODO: There is an issue with playwright ariaSnapshot not working properly for react
+ // runAriaSnapshotTest({ path });
+});
diff --git a/showcases/e2e/switch/switch-a11y.spec.ts b/showcases/e2e/switch/switch-axe-core.spec.ts
similarity index 53%
rename from showcases/e2e/switch/switch-a11y.spec.ts
rename to showcases/e2e/switch/switch-axe-core.spec.ts
index d9eddc88ec44..46638f961913 100644
--- a/showcases/e2e/switch/switch-a11y.spec.ts
+++ b/showcases/e2e/switch/switch-axe-core.spec.ts
@@ -1,14 +1,9 @@
import { test } from '@playwright/test';
-import { runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
test.describe('DBSwitch', () => {
runAxeCoreTest({ path: '03/switch' });
runAxeCoreTest({ path: '03/switch', color: lvl3 });
runAxeCoreTest({ path: '03/switch', density: 'functional' });
- runA11yCheckerTest({
- path: '03/switch',
- // It's an issue in the tool: https://github.com/IBMa/equal-access/issues/842
- aCheckerDisableRules: ['aria_attribute_valid']
- });
});
diff --git a/showcases/e2e/switch/switch-snapshot.spec.ts b/showcases/e2e/switch/switch-visual-snapshot.spec.ts
similarity index 89%
rename from showcases/e2e/switch/switch-snapshot.spec.ts
rename to showcases/e2e/switch/switch-visual-snapshot.spec.ts
index 17786ae0da98..2824d285ddf5 100644
--- a/showcases/e2e/switch/switch-snapshot.spec.ts
+++ b/showcases/e2e/switch/switch-visual-snapshot.spec.ts
@@ -8,5 +8,5 @@ test.describe('DBSwitch', () => {
path
});
// TODO: There is an issue with playwright ariaSnapshot not working properly for react
- // runAriaSnapshotTest({ path });
+ //
});
diff --git a/showcases/e2e/tab-item/tab-item-a11y-checker.spec.ts b/showcases/e2e/tab-item/tab-item-a11y-checker.spec.ts
new file mode 100644
index 000000000000..8164dc7a56bd
--- /dev/null
+++ b/showcases/e2e/tab-item/tab-item-a11y-checker.spec.ts
@@ -0,0 +1,18 @@
+import { test } from '@playwright/test';
+import { isStencil, runA11yCheckerTest } from '../default.ts';
+
+const aCheckerDisableRules = [
+ 'aria_child_tabbable',
+ 'input_checkboxes_grouped',
+ 'aria_role_valid'
+];
+// TODO: We skip this for now until mitosis output is correct
+const skipChecker = isStencil(process.env.showcase);
+
+test.describe('DBTabItem', () => {
+ runA11yCheckerTest({
+ path: '04/tab-item',
+ aCheckerDisableRules,
+ skipChecker
+ });
+});
diff --git a/showcases/e2e/tab-item/tab-item-aria-snapshot.spec.ts b/showcases/e2e/tab-item/tab-item-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..5668e539b686
--- /dev/null
+++ b/showcases/e2e/tab-item/tab-item-aria-snapshot.spec.ts
@@ -0,0 +1,7 @@
+import { test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+
+const path = '04/tab-item';
+test.describe('DBTabItem', () => {
+ runAriaSnapshotTest({ path });
+});
diff --git a/showcases/e2e/tab-item/tab-item-a11y.spec.ts b/showcases/e2e/tab-item/tab-item-axe-core.spec.ts
similarity index 82%
rename from showcases/e2e/tab-item/tab-item-a11y.spec.ts
rename to showcases/e2e/tab-item/tab-item-axe-core.spec.ts
index f90c7f1176d2..f810056e4175 100644
--- a/showcases/e2e/tab-item/tab-item-a11y.spec.ts
+++ b/showcases/e2e/tab-item/tab-item-axe-core.spec.ts
@@ -1,5 +1,5 @@
import { test } from '@playwright/test';
-import { isStencil, runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { isStencil, runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
// We need to change tabs anyway, we disable the rules for now
@@ -22,9 +22,4 @@ test.describe('DBTabItem', () => {
density: 'functional',
axeDisableRules
});
- runA11yCheckerTest({
- path: '04/tab-item',
- aCheckerDisableRules,
- skipChecker
- });
});
diff --git a/showcases/e2e/tab-item/tab-item-snapshot.spec.ts b/showcases/e2e/tab-item/tab-item-visual-snapshot.spec.ts
similarity index 57%
rename from showcases/e2e/tab-item/tab-item-snapshot.spec.ts
rename to showcases/e2e/tab-item/tab-item-visual-snapshot.spec.ts
index ec4581eadf7c..25235b6180d4 100644
--- a/showcases/e2e/tab-item/tab-item-snapshot.spec.ts
+++ b/showcases/e2e/tab-item/tab-item-visual-snapshot.spec.ts
@@ -1,10 +1,9 @@
import { test } from '@playwright/test';
-import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
+import { getDefaultScreenshotTest } from '../default.ts';
const path = '04/tab-item';
test.describe('DBTabItem', () => {
getDefaultScreenshotTest({
path
});
- runAriaSnapshotTest({ path });
});
diff --git a/showcases/e2e/tabs/tabs-a11y-checker.spec.ts b/showcases/e2e/tabs/tabs-a11y-checker.spec.ts
new file mode 100644
index 000000000000..7c08e62a90b2
--- /dev/null
+++ b/showcases/e2e/tabs/tabs-a11y-checker.spec.ts
@@ -0,0 +1,14 @@
+import { test } from '@playwright/test';
+import { isStencil, runA11yCheckerTest } from '../default.ts';
+
+const aCheckerDisableRules = ['input_checkboxes_grouped', 'aria_role_valid'];
+// TODO: We skip this for now until mitosis output is correct
+const skipChecker = isStencil(process.env.showcase);
+
+test.describe('DBTabs', () => {
+ runA11yCheckerTest({
+ path: '04/tabs',
+ aCheckerDisableRules,
+ skipChecker
+ });
+});
diff --git a/showcases/e2e/tabs/tabs-aria-snapshot.spec.ts b/showcases/e2e/tabs/tabs-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..b91abc176e44
--- /dev/null
+++ b/showcases/e2e/tabs/tabs-aria-snapshot.spec.ts
@@ -0,0 +1,23 @@
+import { expect, test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+
+const path = '04/tabs';
+
+const preScreenShot = async (page, project) => {
+ if (project.name === 'webkit' || project.name === 'mobile_safari') {
+ // There is a bug in webkit where the scroll buttons are not visible 50% of the time
+ // Probably due to the scrollWidth or clientWidth not being calculated correctly
+ // TODO: Investigate further
+ test.skip();
+ }
+
+ const scrollRight = page.locator('[data-icon=chevron_right]');
+ await expect(scrollRight).toBeVisible();
+};
+
+test.describe('DBTabs', () => {
+ runAriaSnapshotTest({
+ path,
+ preScreenShot
+ });
+});
diff --git a/showcases/e2e/tabs/tabs-a11y.spec.ts b/showcases/e2e/tabs/tabs-axe-core.spec.ts
similarity index 82%
rename from showcases/e2e/tabs/tabs-a11y.spec.ts
rename to showcases/e2e/tabs/tabs-axe-core.spec.ts
index d994ef7455fe..b7c1335ab8fb 100644
--- a/showcases/e2e/tabs/tabs-a11y.spec.ts
+++ b/showcases/e2e/tabs/tabs-axe-core.spec.ts
@@ -1,5 +1,5 @@
import { test } from '@playwright/test';
-import { isStencil, runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { isStencil, runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
// We need to change tabs anyway, we disable the rules for now
@@ -18,9 +18,4 @@ test.describe('DBTabs', () => {
density: 'functional',
axeDisableRules
});
- runA11yCheckerTest({
- path: '04/tabs',
- aCheckerDisableRules,
- skipChecker
- });
});
diff --git a/showcases/e2e/tabs/tabs-snapshot.spec.ts b/showcases/e2e/tabs/tabs-visual-snapshot.spec.ts
similarity index 82%
rename from showcases/e2e/tabs/tabs-snapshot.spec.ts
rename to showcases/e2e/tabs/tabs-visual-snapshot.spec.ts
index 1f655d6014b0..005fee3f2128 100644
--- a/showcases/e2e/tabs/tabs-snapshot.spec.ts
+++ b/showcases/e2e/tabs/tabs-visual-snapshot.spec.ts
@@ -1,5 +1,5 @@
import { expect, test } from '@playwright/test';
-import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
+import { getDefaultScreenshotTest } from '../default.ts';
const path = '04/tabs';
@@ -20,8 +20,4 @@ test.describe('DBTabs', () => {
path,
preScreenShot
});
- runAriaSnapshotTest({
- path,
- preScreenShot
- });
});
diff --git a/showcases/e2e/tag/tag-a11y-checker.spec.ts b/showcases/e2e/tag/tag-a11y-checker.spec.ts
new file mode 100644
index 000000000000..20f83ca843a1
--- /dev/null
+++ b/showcases/e2e/tag/tag-a11y-checker.spec.ts
@@ -0,0 +1,6 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBTag', () => {
+ runA11yCheckerTest({ path: '04/tag' });
+});
diff --git a/showcases/e2e/tag/tag-aria-snapshot.spec.ts b/showcases/e2e/tag/tag-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..793388389c20
--- /dev/null
+++ b/showcases/e2e/tag/tag-aria-snapshot.spec.ts
@@ -0,0 +1,8 @@
+import { test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+
+const path = '04/tag';
+
+test.describe('DBTag', () => {
+ runAriaSnapshotTest({ path });
+});
diff --git a/showcases/e2e/tag/tag-a11y.spec.ts b/showcases/e2e/tag/tag-axe-core.spec.ts
similarity index 71%
rename from showcases/e2e/tag/tag-a11y.spec.ts
rename to showcases/e2e/tag/tag-axe-core.spec.ts
index 505ddef2a923..a4576a2c7741 100644
--- a/showcases/e2e/tag/tag-a11y.spec.ts
+++ b/showcases/e2e/tag/tag-axe-core.spec.ts
@@ -1,10 +1,9 @@
import { test } from '@playwright/test';
-import { runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
test.describe('DBTag', () => {
runAxeCoreTest({ path: '04/tag' });
runAxeCoreTest({ path: '04/tag', color: lvl3 });
runAxeCoreTest({ path: '04/tag', density: 'functional' });
- runA11yCheckerTest({ path: '04/tag' });
});
diff --git a/showcases/e2e/tag/tag-snapshot.spec.ts b/showcases/e2e/tag/tag-visual-snapshot.spec.ts
similarity index 55%
rename from showcases/e2e/tag/tag-snapshot.spec.ts
rename to showcases/e2e/tag/tag-visual-snapshot.spec.ts
index d3f41bc2e5cc..215e35166e84 100644
--- a/showcases/e2e/tag/tag-snapshot.spec.ts
+++ b/showcases/e2e/tag/tag-visual-snapshot.spec.ts
@@ -1,5 +1,5 @@
import { test } from '@playwright/test';
-import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
+import { getDefaultScreenshotTest } from '../default.ts';
const path = '04/tag';
@@ -7,5 +7,4 @@ test.describe('DBTag', () => {
getDefaultScreenshotTest({
path
});
- runAriaSnapshotTest({ path });
});
diff --git a/showcases/e2e/textarea/textarea-a11y-checker.spec.ts b/showcases/e2e/textarea/textarea-a11y-checker.spec.ts
new file mode 100644
index 000000000000..6fc46b4dfe68
--- /dev/null
+++ b/showcases/e2e/textarea/textarea-a11y-checker.spec.ts
@@ -0,0 +1,9 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+// TODO: disabled element_scrollable_tabbable it's a false-positive: https://github.com/IBMa/equal-access/issues/1911
+const aCheckerDisableRules = ['element_scrollable_tabbable'];
+
+test.describe('DBTextarea', () => {
+ runA11yCheckerTest({ path: '03/textarea', aCheckerDisableRules });
+});
diff --git a/showcases/e2e/textarea/textarea-aria-snapshot.spec.ts b/showcases/e2e/textarea/textarea-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..16cd0c81bd94
--- /dev/null
+++ b/showcases/e2e/textarea/textarea-aria-snapshot.spec.ts
@@ -0,0 +1,7 @@
+import { test } from '@playwright/test';
+
+const path = '03/textarea';
+test.describe('DBTextarea', () => {
+ // TODO: There is an issue with playwright ariaSnapshot not working properly for react
+ // runAriaSnapshotTest({ path });
+});
diff --git a/showcases/e2e/textarea/textarea-a11y.spec.ts b/showcases/e2e/textarea/textarea-axe-core.spec.ts
similarity index 77%
rename from showcases/e2e/textarea/textarea-a11y.spec.ts
rename to showcases/e2e/textarea/textarea-axe-core.spec.ts
index ff55d89a5e7a..e94d4750ceea 100644
--- a/showcases/e2e/textarea/textarea-a11y.spec.ts
+++ b/showcases/e2e/textarea/textarea-axe-core.spec.ts
@@ -1,5 +1,5 @@
import { test } from '@playwright/test';
-import { runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { runAxeCoreTest } from '../default.ts';
import { lvl3 } from '../fixtures/variants';
// TODO: disabled element_scrollable_tabbable it's a false-positive: https://github.com/IBMa/equal-access/issues/1911
@@ -12,5 +12,4 @@ test.describe('DBTextarea', () => {
path: '03/textarea',
density: 'functional'
});
- runA11yCheckerTest({ path: '03/textarea', aCheckerDisableRules });
});
diff --git a/showcases/e2e/textarea/textarea-snapshot.spec.ts b/showcases/e2e/textarea/textarea-visual-snapshot.spec.ts
similarity index 89%
rename from showcases/e2e/textarea/textarea-snapshot.spec.ts
rename to showcases/e2e/textarea/textarea-visual-snapshot.spec.ts
index 9eb393def2be..3d44515d78c8 100644
--- a/showcases/e2e/textarea/textarea-snapshot.spec.ts
+++ b/showcases/e2e/textarea/textarea-visual-snapshot.spec.ts
@@ -7,5 +7,5 @@ test.describe('DBTextarea', () => {
path
});
// TODO: There is an issue with playwright ariaSnapshot not working properly for react
- // runAriaSnapshotTest({ path });
+ //
});
diff --git a/showcases/e2e/tooltip/tooltip-a11y-checker.spec.ts b/showcases/e2e/tooltip/tooltip-a11y-checker.spec.ts
new file mode 100644
index 000000000000..d97e6a7cd473
--- /dev/null
+++ b/showcases/e2e/tooltip/tooltip-a11y-checker.spec.ts
@@ -0,0 +1,6 @@
+import { test } from '@playwright/test';
+import { runA11yCheckerTest } from '../default.ts';
+
+test.describe('DBTooltip', () => {
+ runA11yCheckerTest({ path: '04/tooltip' });
+});
diff --git a/showcases/e2e/tooltip/tooltip-aria-snapshot.spec.ts b/showcases/e2e/tooltip/tooltip-aria-snapshot.spec.ts
new file mode 100644
index 000000000000..d2dbb72d0a57
--- /dev/null
+++ b/showcases/e2e/tooltip/tooltip-aria-snapshot.spec.ts
@@ -0,0 +1,13 @@
+import { test } from '@playwright/test';
+import { runAriaSnapshotTest } from '../default.ts';
+import { hoverPre } from '../fixtures/hover';
+
+const selector = '.db-tooltip';
+const path = '04/tooltip';
+
+test.describe('DBTooltip', () => {
+ runAriaSnapshotTest({
+ path,
+ preScreenShot: async (page) => hoverPre(page, selector)
+ });
+});
diff --git a/showcases/e2e/tooltip/tooltip-a11y.spec.ts b/showcases/e2e/tooltip/tooltip-axe-core.spec.ts
similarity index 80%
rename from showcases/e2e/tooltip/tooltip-a11y.spec.ts
rename to showcases/e2e/tooltip/tooltip-axe-core.spec.ts
index bf4b6381ece7..54a4700e5747 100644
--- a/showcases/e2e/tooltip/tooltip-a11y.spec.ts
+++ b/showcases/e2e/tooltip/tooltip-axe-core.spec.ts
@@ -1,5 +1,5 @@
import { type Page, test } from '@playwright/test';
-import { runA11yCheckerTest, runAxeCoreTest } from '../default.ts';
+import { runAxeCoreTest } from '../default.ts';
import { hoverPre } from '../fixtures/hover';
import { lvl3 } from '../fixtures/variants';
@@ -11,5 +11,4 @@ test.describe('DBTooltip', () => {
runAxeCoreTest({ path: '04/tooltip', preAxe });
runAxeCoreTest({ path: '04/tooltip', color: lvl3, preAxe });
runAxeCoreTest({ path: '04/tooltip', density: 'functional', preAxe });
- runA11yCheckerTest({ path: '04/tooltip' });
});
diff --git a/showcases/e2e/tooltip/tooltip-snapshot.spec.ts b/showcases/e2e/tooltip/tooltip-visual-snapshot.spec.ts
similarity index 62%
rename from showcases/e2e/tooltip/tooltip-snapshot.spec.ts
rename to showcases/e2e/tooltip/tooltip-visual-snapshot.spec.ts
index ca5b6c976b68..805600c898b8 100644
--- a/showcases/e2e/tooltip/tooltip-snapshot.spec.ts
+++ b/showcases/e2e/tooltip/tooltip-visual-snapshot.spec.ts
@@ -1,5 +1,5 @@
import { test } from '@playwright/test';
-import { getDefaultScreenshotTest, runAriaSnapshotTest } from '../default.ts';
+import { getDefaultScreenshotTest } from '../default.ts';
import { hoverPre } from '../fixtures/hover';
const selector = '.db-tooltip';
@@ -10,8 +10,4 @@ test.describe('DBTooltip', () => {
path,
preScreenShot: async (page) => hoverPre(page, selector)
});
- runAriaSnapshotTest({
- path,
- preScreenShot: async (page) => hoverPre(page, selector)
- });
});
diff --git a/showcases/patternhub/package.json b/showcases/patternhub/package.json
index 0eaf0574f616..d95c516d4938 100644
--- a/showcases/patternhub/package.json
+++ b/showcases/patternhub/package.json
@@ -18,9 +18,9 @@
"next:dev": "next dev",
"open": "open-cli http://localhost:3000/core-web/sub",
"prebuild:app": "cpr ../../node_modules/iframe-resizer/js/ public/iframe-resizer -o",
- "regenerate:screenshots": "npx playwright test --config=../playwright.patternhub-config.ts --update-snapshots",
+ "regenerate:screenshots": "npx playwright test --config=./playwright.patternhub-config.ts --update-snapshots",
"start": "cross-env NEXT_PUBLIC_BASE_PATH=/core-web/sub npm-run-all compile next:dev",
- "test:e2e": "npx playwright test --config=../playwright.patternhub-config.ts"
+ "test:e2e": "npx playwright test --config=./playwright.patternhub-config.ts"
},
"dependencies": {
"dompurify": "3.2.6",
diff --git a/showcases/playwright.patternhub-config.ts b/showcases/patternhub/playwright.patternhub-config.ts
similarity index 80%
rename from showcases/playwright.patternhub-config.ts
rename to showcases/patternhub/playwright.patternhub-config.ts
index 5775aaad8a49..5a2be3d8cac2 100644
--- a/showcases/playwright.patternhub-config.ts
+++ b/showcases/patternhub/playwright.patternhub-config.ts
@@ -1,9 +1,10 @@
import { devices, type PlaywrightTestConfig } from '@playwright/test';
-import config from './playwright.config';
+import config from '../playwright.config';
const patternHubConfig: PlaywrightTestConfig = {
...config,
- testDir: './patternhub/tests',
+ snapshotDir: './../../__snapshots__',
+ testDir: './tests',
// Example: __snapshots__/notification/patternhub/chromium/DBNotification-should-match-screenshot.png
snapshotPathTemplate: '{snapshotDir}/{arg}/{testName}{ext}',
// We reduce amount of tests, just testing if site is reachable and content is available
@@ -16,7 +17,7 @@ const patternHubConfig: PlaywrightTestConfig = {
}
],
webServer: {
- command: `npx http-server ../build-showcases${process.env.NEXT_PUBLIC_BASE_PATH ? '' : '/patternhub'}`,
+ command: `npx http-server ../../build-showcases${process.env.NEXT_PUBLIC_BASE_PATH ? '' : '/patternhub'}`,
port: 8080,
reuseExistingServer: !process.env.CI
},
@@ -29,7 +30,7 @@ const patternHubConfig: PlaywrightTestConfig = {
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: process.env.CI ? 'on-first-retry' : 'on'
},
- outputDir: `./patternhub/test-results/`
+ outputDir: `./test-results/`
};
export default patternHubConfig;
diff --git a/showcases/playwright.a11y-checker.ts b/showcases/playwright.a11y-checker.ts
new file mode 100644
index 000000000000..6018a45704f6
--- /dev/null
+++ b/showcases/playwright.a11y-checker.ts
@@ -0,0 +1,9 @@
+import { type PlaywrightTestConfig } from '@playwright/test';
+import config from './playwright.config';
+
+const a11yCheckerConfig: PlaywrightTestConfig = {
+ ...config,
+ testMatch: '*-a11y-checker.spec.ts'
+};
+
+export default a11yCheckerConfig;
diff --git a/showcases/playwright.aria-snapshots.ts b/showcases/playwright.aria-snapshots.ts
new file mode 100644
index 000000000000..175f2c86f8b2
--- /dev/null
+++ b/showcases/playwright.aria-snapshots.ts
@@ -0,0 +1,9 @@
+import { type PlaywrightTestConfig } from '@playwright/test';
+import config from './playwright.config';
+
+const showcaseAriaSnapshotConfig: PlaywrightTestConfig = {
+ ...config,
+ testMatch: '*-aria-snapshot.spec.ts'
+};
+
+export default showcaseAriaSnapshotConfig;
diff --git a/showcases/playwright.axe-core.ts b/showcases/playwright.axe-core.ts
new file mode 100644
index 000000000000..87e829765b68
--- /dev/null
+++ b/showcases/playwright.axe-core.ts
@@ -0,0 +1,9 @@
+import { type PlaywrightTestConfig } from '@playwright/test';
+import config from './playwright.config';
+
+const axeCoreConfig: PlaywrightTestConfig = {
+ ...config,
+ testMatch: '*-axe-core.spec.ts'
+};
+
+export default axeCoreConfig;
diff --git a/showcases/playwright.config.ts b/showcases/playwright.config.ts
index d373b49c23d8..733e69db22c8 100644
--- a/showcases/playwright.config.ts
+++ b/showcases/playwright.config.ts
@@ -1,5 +1,8 @@
-import { devices, type PlaywrightTestConfig } from '@playwright/test';
-import { type Project } from 'playwright/types';
+import {
+ devices,
+ type PlaywrightTestConfig,
+ type Project
+} from '@playwright/test';
import showcaseConfig from './playwright.showcase';
const projects: Project[] = [
diff --git a/showcases/playwright.showcase-snapshots.ts b/showcases/playwright.visual-snapshots.ts
similarity index 84%
rename from showcases/playwright.showcase-snapshots.ts
rename to showcases/playwright.visual-snapshots.ts
index 6feb8ed0475a..b31f3861027d 100644
--- a/showcases/playwright.showcase-snapshots.ts
+++ b/showcases/playwright.visual-snapshots.ts
@@ -3,7 +3,7 @@ import config from './playwright.config';
const showcaseSnapshotConfig: PlaywrightTestConfig = {
...config,
- testMatch: '*-snapshot.spec.ts'
+ testMatch: '*-visual-snapshot.spec.ts'
};
export default showcaseSnapshotConfig;
diff --git a/showcases/react-showcase/package.json b/showcases/react-showcase/package.json
index 6ee00f87041e..2eb726d69a6d 100644
--- a/showcases/react-showcase/package.json
+++ b/showcases/react-showcase/package.json
@@ -9,12 +9,17 @@
"build:02_vite": "vite build",
"dev": "vite --open",
"preview": "npx http-server ../../build-showcases",
- "regenerate:screenshots": "cross-env showcase=react-showcase npx playwright test -c ../playwright.showcase-snapshots.ts --update-snapshots",
+ "regenerate:aria-snapshots": "cross-env showcase=react-showcase npx playwright test -c ../playwright.aria-snapshots.ts --update-snapshots",
+ "regenerate:visual-snapshots": "cross-env showcase=react-showcase npx playwright test -c ../playwright.visual-snapshots.ts --update-snapshots",
"start": "vite",
- "test-sr:macos": "cross-env showcase=react-showcase npx playwright test --config=../playwright.screen-reader.macos.ts",
- "test-sr:windows": "cross-env showcase=react-showcase npx playwright test --config=../playwright.screen-reader.windows.ts",
+ "test-sr:macos": "cross-env showcase=react-showcase npx playwright test --config=./playwright.screen-reader.macos.ts",
+ "test-sr:windows": "cross-env showcase=react-showcase npx playwright test --config=./playwright.screen-reader.windows.ts",
+ "test:a11y-checker": "cross-env showcase=react-showcase npx playwright test --config=../playwright.a11y-checker.ts",
+ "test:aria-snapshots": "cross-env showcase=react-showcase npx playwright test --config=../playwright.aria-snapshots.ts",
+ "test:axe-core": "cross-env showcase=react-showcase npx playwright test --config=../playwright.axe-core.ts",
"test:e2e": "cross-env showcase=react-showcase npx playwright test --config=../playwright.config.ts",
- "test:ui": "cross-env showcase=react-showcase npx playwright test --config=../playwright.config.ts --ui"
+ "test:ui": "cross-env showcase=react-showcase npx playwright test --config=../playwright.config.ts --ui",
+ "test:visual-snapshots": "cross-env showcase=react-showcase npx playwright test --config=../playwright.visual-snapshots.ts"
},
"dependencies": {
"react": "^18.3.1",
diff --git a/showcases/playwright.screen-reader.macos.ts b/showcases/react-showcase/playwright.screen-reader.macos.ts
similarity index 100%
rename from showcases/playwright.screen-reader.macos.ts
rename to showcases/react-showcase/playwright.screen-reader.macos.ts
diff --git a/showcases/playwright.screen-reader.ts b/showcases/react-showcase/playwright.screen-reader.ts
similarity index 55%
rename from showcases/playwright.screen-reader.ts
rename to showcases/react-showcase/playwright.screen-reader.ts
index 39b9415fb852..1a472e2e17b3 100644
--- a/showcases/playwright.screen-reader.ts
+++ b/showcases/react-showcase/playwright.screen-reader.ts
@@ -1,15 +1,20 @@
import { screenReaderConfig } from '@guidepup/playwright';
import { type PlaywrightTestConfig } from '@playwright/test';
-import showcaseConfig from './playwright.showcase';
+import showcaseConfig from '../playwright.showcase';
const defaultScreenReaderConfig: PlaywrightTestConfig = {
...screenReaderConfig,
...showcaseConfig,
retries: process.env.CI ? 2 : 0,
reportSlowTests: null,
- testDir: './screen-reader/tests',
- snapshotDir: './screen-reader/__snapshots__',
- timeout: 3 * 60 * 1000
+ testDir: '../screen-reader/tests',
+ snapshotDir: '../screen-reader/__snapshots__',
+ timeout: 3 * 60 * 1000,
+ webServer: {
+ command: `npm run preview`,
+ port: 8080,
+ reuseExistingServer: !process.env.CI
+ }
};
export default defaultScreenReaderConfig;
diff --git a/showcases/playwright.screen-reader.windows.ts b/showcases/react-showcase/playwright.screen-reader.windows.ts
similarity index 100%
rename from showcases/playwright.screen-reader.windows.ts
rename to showcases/react-showcase/playwright.screen-reader.windows.ts
diff --git a/showcases/stencil-showcase/package.json b/showcases/stencil-showcase/package.json
index ab1b8ce510c4..4e8ccb7d77e0 100644
--- a/showcases/stencil-showcase/package.json
+++ b/showcases/stencil-showcase/package.json
@@ -11,8 +11,12 @@
"prebuild": "npm run build --workspace @db-ux/wc-core-components",
"preview": "npx http-server ../../build-showcases",
"start": "ng serve --port 4202 --serve-path stencil-showcase",
+ "test:a11y-checker": "cross-env showcase=stencil-showcase npx playwright test --config=../playwright.a11y-checker.ts",
+ "test:aria-snapshots": "cross-env showcase=stencil-showcase npx playwright test --config=../playwright.aria-snapshots.ts",
+ "test:axe-core": "cross-env showcase=stencil-showcase npx playwright test --config=../playwright.axe-core.ts",
"test:e2e": "cross-env showcase=stencil-showcase npx playwright test --config=../playwright.config.ts",
"test:ui": "npm run test:e2e -- --ui",
+ "test:visual-snapshots": "cross-env showcase=stencil-showcase npx playwright test --config=../playwright.visual-snapshots.ts",
"watch": "ng build --watch --configuration development"
},
"dependencies": {
diff --git a/showcases/vue-showcase/package.json b/showcases/vue-showcase/package.json
index 7d2b697730b7..efa0fad850a6 100644
--- a/showcases/vue-showcase/package.json
+++ b/showcases/vue-showcase/package.json
@@ -9,7 +9,11 @@
"dev": "vite --open",
"preview": "npx http-server ../../build-showcases",
"start": "vite",
- "test:e2e": "cross-env showcase=vue-showcase npx playwright test --config=../playwright.config.ts"
+ "test:a11y-checker": "cross-env showcase=vue-showcase npx playwright test --config=../playwright.a11y-checker.ts",
+ "test:aria-snapshots": "cross-env showcase=vue-showcase npx playwright test --config=../playwright.aria-snapshots.ts",
+ "test:axe-core": "cross-env showcase=vue-showcase npx playwright test --config=../playwright.axe-core.ts",
+ "test:e2e": "cross-env showcase=vue-showcase npx playwright test --config=../playwright.config.ts",
+ "test:visual-snapshots": "cross-env showcase=vue-showcase npx playwright test --config=../playwright.visual-snapshots.ts"
},
"dependencies": {
"sa11y": "4.1.9",