forked from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* setup * update * update * update * update * update * update * update * update * update * ignore lint on cypress * exclude from edge delivery deployment * update * update * update * update * update * update * update * save screenshots on fail * test failure * update * update * run on local * update * update * update * update * update feedback * remove possible static waits * debug first run failures * update * fix flakyness * retry moode reset
- Loading branch information
1 parent
94ad90b
commit 9413f8b
Showing
20 changed files
with
13,120 additions
and
0 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 |
---|---|---|
|
@@ -9,3 +9,4 @@ scripts/commerce-events-collector.js | |
scripts/commerce-events-sdk.js | ||
scripts/widgets | ||
plugins/ | ||
cypress/ |
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,25 @@ | ||
name: Cypress E2E Tests | ||
on: push | ||
jobs: | ||
cypress-run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install root dependencies | ||
run: npm ci | ||
- name: Start server in the background | ||
run: npm start & | ||
|
||
- name: Install Cypress and run tests | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
working-directory: cypress | ||
browser: chrome | ||
wait-on: 'http://localhost:3000' | ||
config: baseUrl=http://localhost:3000 | ||
- uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: cypress-screenshots | ||
path: cypress/screenshots | ||
if-no-files-found: ignore |
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 |
---|---|---|
|
@@ -7,3 +7,4 @@ package-lock.json | |
test/* | ||
postinstall.js | ||
tools/picker/src/* | ||
cypress/ |
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 @@ | ||
node_modules | ||
.DS_Store | ||
.idea | ||
reports/* | ||
cypress-test-results.json | ||
cypress-test-results.html | ||
src/snapshots/*/** | ||
screenshots/* | ||
yarn-error.log | ||
downloads |
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,11 @@ | ||
# Running E2E tests | ||
|
||
Note - Following commands expects local server is running at http://127.0.0.1:3000/. | ||
|
||
1. Clone the repo and change directory to `cypress` | ||
2. Run `npm install` | ||
3. Run `npm run cypress:open` | ||
4. Click on E2E Testing in cypress UI window. | ||
5. Click on Start E2E Testing on Chrome button. | ||
5. Now select respective test to Run from Cypress UI. | ||
6. To run all tests use `npm run cypress:run` |
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,32 @@ | ||
const { defineConfig } = require('cypress') | ||
|
||
|
||
module.exports = defineConfig({ | ||
defaultCommandTimeout: 60000, | ||
screenshotsFolder: 'screenshots', | ||
downloadsFolder: 'downloads', | ||
fixturesFolder: 'src/fixtures', | ||
video: false, | ||
pageLoadTimeout: 60000, | ||
requestTimeout: 60000, | ||
viewportHeight: 900, | ||
viewportWidth: 1440, | ||
scrollBehavior: 'nearest', | ||
trashAssetsBeforeRuns: false, | ||
chromeWebSecurity: false, | ||
retries: { | ||
runMode: 2, | ||
}, | ||
e2e: { | ||
baseUrl: 'http://localhost:3000/', | ||
supportFile: 'src/support/index.js', | ||
specPattern: 'src/tests/**/*.spec.js', | ||
}, | ||
env: { | ||
graphqlEndPoint: 'https://integration-5ojmyuq-7yvbzwvtkgerq.us-4.magentosite.cloud/graphql', | ||
}, | ||
reporter: 'cypress-multi-reporters', | ||
reporterOptions: { | ||
configFile: 'reporter-config.json', | ||
}, | ||
}); |
Oops, something went wrong.