Skip to content

Commit

Permalink
Initial setup for Cypress test
Browse files Browse the repository at this point in the history
Add admin page tests
Add block editor tests
  • Loading branch information
thrijith committed Dec 23, 2021
1 parent 68e9700 commit 03991ca
Show file tree
Hide file tree
Showing 13 changed files with 14,364 additions and 79 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ assets
dist
node_modules
vendor
tests
32 changes: 31 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Test
name: Tests

on:
push:
branches:
- develop
- trunk
- feature/add-cypress-tests
pull_request:
branches:
- develop
Expand Down Expand Up @@ -60,3 +61,32 @@ jobs:
GITHUB_WORKSPACE: ${{ github.workspace }}
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }}

cypress:
runs-on: ubuntu-latest

strategy:
matrix:
core:
- { name: 'WP latest', version: 'latest' }
- { name: 'WP trunk', version: 'WordPress/WordPress#master' }
- { name: 'WP minimum', version: 'WordPress/WordPress#5.2.11' }

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install dependencies
run: npm i

- name: Build asset
run: npm run build

- name: Set the core version
run: ./tests/bin/set-core-version.js ${{ matrix.core.version }}

- name: Set up WP environment
run: npm run wp-env start

- name: Test
run: npm run cypress:run
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ node_modules
screenshots
tests/coverage
vendor

tests/cypress/downloads
tests/cypress/screenshots
tests/cypress/videos
Loading

0 comments on commit 03991ca

Please sign in to comment.