Skip to content

Commit e26b5e3

Browse files
committed
update cypress test utils to fix wp 5.9 issues / add wp 5.9 tests
1 parent 7f538ba commit e26b5e3

4 files changed

Lines changed: 129 additions & 32 deletions

File tree

.github/workflows/lint-test-deploy.yml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,40 @@ jobs:
6161
npm run wp-env start
6262
6363
- name: Running JavaScript E2E tests
64-
run: npm run test:e2e -- --config '{"env":{"cypress-wp-test-utils":{"wpVersion":${{ matrix.wp }}}}}'
64+
run: npm run test:e2e'
65+
66+
- name: Running PHP unit tests
67+
run: npm run test:unit:php:ci
68+
69+
tests-wp-59:
70+
name: Tests WordPress 5.9
71+
72+
runs-on: ubuntu-latest
73+
74+
steps:
75+
- uses: actions/checkout@v2
76+
77+
- name: Use Node.js 16
78+
uses: actions/setup-node@v1
79+
with:
80+
node-version: 16
81+
82+
- name: Install dependencies
83+
run: |
84+
npm ci
85+
composer install
86+
87+
- name: "Configure environment with WP 5.9"
88+
run: |
89+
echo -e '{\n\t"core": "https://wordpress.org/wordpress-5.9-beta2.zip"\n}' > ./.wp-env.override.json
90+
91+
- name: Install WordPress
92+
run: |
93+
chmod -R 767 ./ # TODO: Possibly integrate in wp-env
94+
npm run wp-env start
95+
96+
- name: Running JavaScript E2E tests
97+
run: npm run test:e2e'
6598

6699
- name: Running PHP unit tests
67100
run: npm run test:unit:php:ci
@@ -72,7 +105,7 @@ jobs:
72105
# only run on master but not tags
73106
if: ${{ github.ref == 'refs/heads/master' && !startsWith(github.ref, 'refs/tags/') }}
74107

75-
needs: [ lint, tests ]
108+
needs: [ lint, tests, 'tests-wp-59' ]
76109

77110
runs-on: ubuntu-latest
78111

@@ -91,7 +124,7 @@ jobs:
91124
# only run on tags
92125
if: startsWith(github.ref, 'refs/tags/')
93126

94-
needs: [ lint, tests ]
127+
needs: [ lint, tests, 'tests-wp-59' ]
95128

96129
runs-on: ubuntu-latest
97130

package-lock.json

Lines changed: 90 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
"@wordpress/base-styles": "^4.0.0",
3636
"@wordpress/env": "^4.1.1",
3737
"@wordpress/scripts": "^18.0.1",
38-
"cypress": "^9.1.0",
39-
"cypress-wp-test-utils": "^0.5.0",
38+
"cypress": "^9.1.1",
39+
"cypress-wp-test-utils": "^0.7.1",
4040
"cypress-xpath": "^1.6.2",
4141
"eslint-plugin-cypress": "^2.12.1",
4242
"lodash": "^4.17.21",

snapshots.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
"__version": "8.5.0",
2+
"__version": "9.1.1",
33
"Row Block": {
44
"Row block should be available": {
55
"1": "<!-- wp:wp-bootstrap-blocks/row -->\n<!-- wp:wp-bootstrap-blocks/column {\"sizeMd\":6} /-->\n\n<!-- wp:wp-bootstrap-blocks/column {\"sizeMd\":6} /-->\n<!-- /wp:wp-bootstrap-blocks/row -->"

0 commit comments

Comments
 (0)