-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add E2E Tests #37
Draft
sksaju
wants to merge
42
commits into
develop
Choose a base branch
from
feature/19=e2e-tests
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Add E2E Tests #37
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
c3e71ac
Add E2E Tests
sksaju 97128c8
fix js lint issue
sksaju 3847856
fix js lint issue
sksaju cff6aa5
rename files
sksaju d8ddc86
update cypress.yml
sksaju 7d5e192
move cypress-mochawesome-reporter into dev dependancy
sksaju 24eb11b
update tests/cypress/e2e/admin.cy.js
sksaju fa93074
added Install node command in the cypress.yml
sksaju 3adf941
added cypress/plugins/index.js
sksaju 9b5f636
Merge branch 'develop' into feature/19=e2e-tests
sksaju 9037b1a
downgrade mochawesome-json-to-md package version
sksaju 8d42736
update cypress config
sksaju 3458fff
update cypress config
sksaju b66e390
update set-wp-config.js
sksaju 9340a5c
update set-wp-config.js
sksaju 7949c35
update set-wp-config.js
sksaju b081cd4
update set-wp-config.js
sksaju 10bdff7
update cypress.yml workflow
sksaju 0c604dc
update package-lock.json
sksaju 47271e2
update .wp-env.json and tests/bin/set-wp-config.js
sksaju 7816da7
update .github/workflows/cypress.yml
sksaju 50ee0ea
update .wp-env.json and tests/bin/initialize.sh
sksaju f9146b7
update tests/bin/initialize.sh
sksaju 0167063
update e2e test file names
sksaju fdbe724
update embed-block-figma.test
sksaju a628d43
fix js lint issue
sksaju 24c6377
update embed-block-figma.test
sksaju e071f6a
update embed-block-figma.test
sksaju fa5087d
update embed-block-figma.test
sksaju ff454a4
update embed-block-figma.test
sksaju 80c3615
update embed-block-figma.test
sksaju c70de4c
addes support command and update embed-block-figma.test.js
sksaju 49ddb06
fix eslint issue
sksaju b577ada
update embed-block-figma.test.js
sksaju f5ccb78
update embed-block-figma.test.js
sksaju f181387
update embed-block-figma.test.js
sksaju 1c42e99
update embed-block-figma.test.js
sksaju dbfa7d8
added setLocalStorage support command
sksaju c4f166f
update commands.js
sksaju a721bde
update support command functions
sksaju 1b03f70
update createPost support command
sksaju ca52fc2
update e2e test case with support commands
sksaju File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: E2E test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
build: | ||
uses: 10up/embed-block-figma/.github/workflows/build-release-zip.yml@develop | ||
|
||
cypress: | ||
needs: build | ||
name: ${{ matrix.core.name }} | ||
runs-on: ubuntu-latest | ||
if: always() | ||
|
||
strategy: | ||
matrix: | ||
core: | ||
- {name: 'WP latest', version: 'latest'} | ||
- {name: 'WP minimum', version: 'WordPress/WordPress#6.5'} | ||
- {name: 'WP trunk', version: 'WordPress/WordPress#master'} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download built zip | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ github.event.repository.name }} | ||
path: ${{ github.event.repository.name }} | ||
|
||
- name: Display structure of downloaded files | ||
run: ls -R | ||
working-directory: ${{ github.event.repository.name }} | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
|
||
- uses: actions/cache@v4 | ||
id: cache-node | ||
with: | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
path: | | ||
node_modules | ||
~/.cache | ||
~/.npm | ||
|
||
- run: npm ci | ||
if: ${{ steps.cache-node.outputs.cache-hit != 'true' }} | ||
|
||
- name: Set the core version and plugins config | ||
run: ./tests/bin/set-wp-config.js --core=${{ matrix.core.version }} --plugins=./${{ github.event.repository.name }},https://downloads.wordpress.org/plugin/classic-editor.zip | ||
|
||
- name: Set up WP environment | ||
run: npm run env:start | ||
|
||
- name: Test | ||
run: npm run cypress:run | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: cypress-artifact-embed-block-figma | ||
retention-days: 2 | ||
path: | | ||
${{ github.workspace }}/tests/cypress/screenshots/ | ||
${{ github.workspace }}/tests/cypress/videos/ | ||
${{ github.workspace }}/tests/cypress/logs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"plugins": ["."], | ||
"env": { | ||
"tests": { | ||
"mappings": { | ||
"wp-cli.yml": "./tests/bin/wp-cli.yml" | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can probably just ignore the entire
tests
directory