Skip to content

Commit 699a448

Browse files
dev: add Playwright
1 parent 661f2a2 commit 699a448

File tree

14 files changed

+67019
-11330
lines changed

14 files changed

+67019
-11330
lines changed

.github/workflows/test-e2e.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
env: ["default","gutenberg", "gutenberg-datatable"]
18+
env: ["default", "gutenberg", "gutenberg-datatable"]
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@v2
2222
- uses: actions/setup-node@v2
2323
with:
24-
node-version: '14'
24+
node-version: "18"
2525
- uses: actions/cache@v2
2626
id: npm-and-build-cache
2727
with:
@@ -32,20 +32,22 @@ jobs:
3232
restore-keys: |
3333
${{ runner.os }}-node-
3434
- name: Install npm deps
35-
run: npm ci
35+
run: |
36+
npm ci
37+
npx playwright install --with-deps chromium
3638
- name: Install composer deps
3739
run: composer install --no-dev
3840
- name: Install environment
3941
run: |
4042
npm run up:ci
41-
bash ./bin/run-e2e-tests-${{matrix.env}}.sh
42-
- name: Run ${{ matrix.env }} Cypress tests
43+
- name: Run the tests
44+
run: |
45+
npm run test:e2e:playwright
4346
env:
4447
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
45-
uses: cypress-io/github-action@v2
48+
- name: Archive test results
49+
uses: actions/upload-artifact@v4
4650
with:
47-
env: host=localhost,port=8080
48-
browser: chrome
49-
install: ${{ ! steps.npm-and-build-cache.outputs.cache-hit }}
50-
headless: true
51-
spec: cypress/integration/${{ matrix.env }}/**/*
51+
name: code-coverage-report
52+
path: artifacts
53+
retention-days: 3

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ cypress.env.json
1111
.DS_Store
1212
/cypress/videos/
1313
/cypress/screenshots/
14+
artifacts

bin/cli-setup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
# install WP
3-
wp --allow-root core install --url="http://localhost:8080" --admin_user="wordpress" --admin_password="wordpress" --admin_email="[email protected]" --title="test" --skip-email
3+
wp --allow-root core install --url="http://localhost:8889" --admin_user="admin" --admin_password="password" --admin_email="[email protected]" --title="test" --skip-email
44
mkdir -p /var/www/html/wp-content/uploads
55
chmod -R 777 /var/www/html/wp-content/uploads/*
6-
wp --allow-root plugin install classic-editor --activate
6+
wp --allow-root plugin install classic-editor
77

88
# activate
99
wp --allow-root plugin activate visualizer

0 commit comments

Comments
 (0)