Skip to content

Commit 36f4f64

Browse files
authored
Merge pull request #875 from Codeinwp/fix/e2e
Fixes E2E tests and moves them to playwright
2 parents 287d7f3 + 9a07b25 commit 36f4f64

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+625
-40717
lines changed

.distignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ composer.lock
2424
npm-debug.log
2525
bin
2626
key.enc
27-
cypress
28-
cypress.json
2927
node_modules
3028
logs
3129
grunt
@@ -36,9 +34,10 @@ assets/src
3634
.wporg
3735
.nvmrc
3836
.github
39-
cypress.config.js
4037
.eslintrc
4138
postcss.config.js
4239
tailwind.config.js
4340
phpstan.neon
4441
development.php
42+
playwright.config.ts
43+
test-results

.github/workflows/test-e2e.yml

Lines changed: 12 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,23 @@ on:
66
concurrency:
77
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
88
cancel-in-progress: true
9-
env:
10-
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
119

1210
jobs:
1311
e2e:
1412
if: ( github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name ) && ( github.actor != 'dependabot[bot]' )
1513
runs-on: ubuntu-latest
1614
steps:
17-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
1816
- name: Setup Node
19-
uses: actions/setup-node@v1
17+
uses: actions/setup-node@v4
2018
with:
2119
node-version: 16
22-
- name: Get Composer Cache Directory
23-
id: composer-cache
24-
run: |
25-
echo "::set-output name=dir::$(composer config cache-files-dir)"
26-
- name: Configure Composer cache
27-
uses: actions/cache@v1
28-
with:
29-
path: ${{ steps.composer-cache.outputs.dir }}
30-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
31-
restore-keys: |
32-
${{ runner.os }}-composer-
20+
cache: 'npm'
3321
- name: Install dependencies
3422
run: |
3523
npm ci
3624
composer install --no-dev --prefer-dist --no-progress --no-suggest
25+
npx playwright install
3726
- name: Make build
3827
run: |
3928
npm run build
@@ -48,23 +37,11 @@ jobs:
4837
SSH_HOST: ${{ secrets.SSH_HOST }}
4938
SSH_PATH: ${{ secrets.SSH_PATH }}
5039
run: ./bin/run-e2e-tests.sh
51-
- name: E2E tests chrome
52-
uses: cypress-io/github-action@v6
53-
with:
54-
env: host=testing.optimole.com
55-
config-file: cypress.config.js
56-
browser: chrome
57-
e2eFirefox:
58-
needs: e2e
59-
runs-on: ubuntu-latest
60-
steps:
61-
- uses: actions/checkout@v2
62-
- name: Setup Node
63-
uses: actions/setup-node@v1
64-
with:
65-
node-version: 16
66-
- uses: cypress-io/github-action@v6
67-
with:
68-
env: host=testing.optimole.com
69-
config-file: cypress.config.js
70-
browser: firefox
40+
- name: Run E2E tests
41+
id: run_tests
42+
run: |
43+
npm run e2e:run
44+
continue-on-error: false
45+
- name: Check test results
46+
if: steps.run_tests.outcome != 'success'
47+
run: exit 1

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ node_modules
44
logs
55
dist
66
artifact
7-
cypress/videos
8-
cypress/fixtures
97
vendor
108
code_quality
119
build
1210
.DS_Store
1311
cc-test-reporter
14-
assets/build
12+
assets/build
13+
test-results

cypress.config.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

cypress/.eslintrc.json

Lines changed: 0 additions & 34 deletions
This file was deleted.

cypress/.prettierrc.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

cypress/e2e/test_amp.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

cypress/e2e/test_beaver_builder_background_lazyload.js

Lines changed: 0 additions & 61 deletions
This file was deleted.

cypress/e2e/test_divi_background_lazyload.js

Lines changed: 0 additions & 106 deletions
This file was deleted.

0 commit comments

Comments
 (0)