-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Adds E2E testing, using Cypress, to deployment pipeline
- Loading branch information
1 parent
1ade24d
commit aea1c5f
Showing
3 changed files
with
52 additions
and
15 deletions.
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,36 @@ | ||
name: Run Cypress E2E tests | ||
description: Run E2E tests using Cypress | ||
|
||
inputs: | ||
url: | ||
required: true | ||
type: string | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Create Cypress config | ||
shell: bash | ||
run: echo "{ \"URL\" :\"${{ inputs.url }}\" }" > cypress.env.json | ||
working-directory: ./tests/Dfe.PlanTech.Web.E2ETests/ | ||
|
||
- name: Build and test project | ||
uses: cypress-io/github-action@v5 | ||
with: | ||
working-directory: ./tests/Dfe.PlanTech.Web.E2ETests/ | ||
browser: chrome | ||
|
||
- name: Store screenshots on test failure | ||
uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: cypress-screenshots | ||
path: ./tests/Dfe.PlanTech.Web.E2ETests/cypress/screenshots | ||
|
||
- name: Store videos | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: cypress-videos | ||
path: ./tests/Dfe.PlanTech.Web.E2ETests/cypress/videos |
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