Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions .github/workflows/actions/test-core-screenshot/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ inputs:
description: 'Playwright total number of test shards (ex: 4)'
update:
description: 'Whether or not to update the reference snapshots'
commandModifier:
description: 'Command modifier to run. This is should only be used to temporarily run legacy E2E tests as we migrate to the generator infrastructure.'

runs:
using: 'composite'
Expand All @@ -27,7 +25,7 @@ runs:
working-directory: ./core
- name: Test
if: inputs.update != 'true'
run: npm run test.e2e${{ inputs.commandModifier }} -- --shard=${{ inputs.shard }}/${{ inputs.totalShards }}
run: npm run test.e2e -- --shard=${{ inputs.shard }}/${{ inputs.totalShards }}
shell: bash
working-directory: ./core
- name: Test and Update
Expand All @@ -49,23 +47,23 @@ runs:
# which is why we not using the upload-archive
# composite step here.
run: |
npm run test.e2e${{ inputs.commandModifier }} -- --shard=${{ inputs.shard }}/${{ inputs.totalShards }} --update-snapshots
npm run test.e2e -- --shard=${{ inputs.shard }}/${{ inputs.totalShards }} --update-snapshots
git add src/\*.png --force
mkdir updated-screenshots
cd ../ && rsync -R --progress $(git diff --name-only --cached) core/updated-screenshots
if [ -d core/updated-screenshots/core ]; then
echo "hasUpdatedScreenshots=$(echo 'true')" >> $GITHUB_OUTPUT
cd core/updated-screenshots
zip -q -r ../../UpdatedScreenshots${{ inputs.commandModifier }}-${{ inputs.shard }}-${{ inputs.totalShards }}.zip core
zip -q -r ../../UpdatedScreenshots-${{ inputs.shard }}-${{ inputs.totalShards }}.zip core
fi
shell: bash
working-directory: ./core
- name: Archive Updated Screenshots
if: inputs.update == 'true' && steps.test-and-update.outputs.hasUpdatedScreenshots == 'true'
uses: actions/upload-artifact@v3
with:
name: updated-screenshots${{ inputs.commandModifier }}-${{ inputs.shard }}-${{ inputs.totalShards }}
path: UpdatedScreenshots${{ inputs.commandModifier }}-${{ inputs.shard }}-${{ inputs.totalShards }}.zip
name: updated-screenshots-${{ inputs.shard }}-${{ inputs.totalShards }}
path: UpdatedScreenshots-${{ inputs.shard }}-${{ inputs.totalShards }}.zip
- name: Archive Test Results
# The always() ensures that this step
# runs even if the previous step fails.
Expand All @@ -76,6 +74,6 @@ runs:
if: always()
uses: ./.github/workflows/actions/upload-archive
with:
name: test-results${{ inputs.commandModifier }}-${{ inputs.shard }}-${{ inputs.totalShards }}
output: core/TestResults${{ inputs.commandModifier }}-${{ inputs.shard }}-${{ inputs.totalShards }}.zip
name: test-results-${{ inputs.shard }}-${{ inputs.totalShards }}
output: core/TestResults-${{ inputs.shard }}-${{ inputs.totalShards }}.zip
paths: core/playwright-report
39 changes: 0 additions & 39 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,45 +81,6 @@ jobs:
if: ${{ needs.test-core-screenshot.result != 'success' }}
run: exit 1

test-core-screenshot-legacy:
strategy:
matrix:
# Divide the tests into n buckets
# and run those buckets in parallel.
# To increase the number of shards,
# add new items to the shard array
# and change the value of totalShards
# to be the length of the shard array.
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
totalShards: [20]
needs: [build-core]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/test-core-screenshot
with:
shard: ${{ matrix.shard }}
totalShards: ${{ matrix.totalShards }}
commandModifier: '.legacy'

# Screenshots are required to pass
# in order for the branch to be merge
# eligible. However, the screenshot tests
# are run on n runners where n can change
# over time. The verify-screenshots step allows
# us to have a required status check for screenshot
# results without having to manually add each
# matrix run in the branch protection rules
# Source: https://github.community/t/status-check-for-a-matrix-jobs/127354
verify-screenshots-legacy:
if: ${{ always() }}
needs: test-core-screenshot-legacy
runs-on: ubuntu-latest
steps:
- name: Check build matrix status
if: ${{ needs.test-core-screenshot-legacy.result != 'success' }}
run: exit 1

build-vue:
needs: [build-core]
runs-on: ubuntu-latest
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/stencil-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,45 +87,6 @@ jobs:
if: ${{ needs.test-core-screenshot.result != 'success' }}
run: exit 1

test-core-screenshot-legacy:
strategy:
matrix:
# Divide the tests into n buckets
# and run those buckets in parallel.
# To increase the number of shards,
# add new items to the shard array
# and change the value of totalShards
# to be the length of the shard array.
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
totalShards: [20]
needs: [build-core-with-stencil-nightly]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/test-core-screenshot
with:
shard: ${{ matrix.shard }}
totalShards: ${{ matrix.totalShards }}
commandModifier: '.legacy'

# Screenshots are required to pass
# in order for the branch to be merge
# eligible. However, the screenshot tests
# are run on n runners where n can change
# over time. The verify-screenshots step allows
# us to have a required status check for screenshot
# results without having to manually add each
# matrix run in the branch protection rules
# Source: https://github.community/t/status-check-for-a-matrix-jobs/127354
verify-screenshots-legacy:
if: ${{ always() }}
needs: test-core-screenshot-legacy
runs-on: ubuntu-latest
steps:
- name: Check build matrix status
if: ${{ needs.test-core-screenshot-legacy.result != 'success' }}
run: exit 1

build-vue:
needs: [build-core-with-stencil-nightly]
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
"test.spec": "stencil test --spec --max-workers=2",
"test.spec.debug": "npx --node-arg=\"--inspect-brk\" stencil test --spec",
"test.e2e": "npx playwright test --config playwright.config.ts",
"test.e2e.legacy": "npx playwright test --config playwright.config-legacy.ts",
"test.watch": "jest --watch --no-cache",
"test.treeshake": "node scripts/treeshaking.js dist/index.js",
"validate": "npm run lint && npm run test && npm run build && npm run test.treeshake"
Expand Down
119 changes: 0 additions & 119 deletions core/playwright.config-legacy.ts

This file was deleted.

3 changes: 1 addition & 2 deletions core/src/utils/test/playwright/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ This directory contains information on how to get the most out of Ionic's E2E te
| Directory | Description |
| - | - |
| [Best Practices](./best-practices.md) | Contains information on conventions to follow as well as pitfalls to avoid when writing tests |
| [API](./api.md) | Documents the custom functionality that has been built on top of Playwright |
| [Migrating to Generators](./migrating-to-generators.md) | A step-by-step guide for migrating existing E2E tests to use the generator architecture |
| [API](./api.md) | Documents the custom functionality that has been built on top of Playwright |
115 changes: 0 additions & 115 deletions core/src/utils/test/playwright/docs/migrating-to-generators.md

This file was deleted.