-
-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1322 from OWASP/cypress-docker
Add cypress testing to docker test and as a workflow for heroku
- Loading branch information
Showing
9 changed files
with
90 additions
and
3 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
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
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,33 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Test Heroku with cypress | ||
|
||
# Controls when the workflow will run | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: [master] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
test-heroku: | ||
name: run tests | ||
runs-on: ubuntu-latest | ||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run Tests | ||
run: | | ||
cd src/test/e2e | ||
npm install cypress | ||
npx cypress run --config-file cypress.config.heroku.js | ||
- uses: actions/upload-artifact@v4 | ||
if: success() || failure() | ||
with: | ||
name: e2e results | ||
path: src/test/e2e/cypress/reports/mochawesome/ |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// eslint-disable-next-line no-unused-vars | ||
function secret () { | ||
const password = 'JqJJ/Mg=' + 9 + 'n/OE' + 6 + 'knA=' + 2 + 'Tv8v' + 7 | ||
const password = 'TV5mQAM=' + 9 + 'Fcek' + 6 + 'atA=' + 2 + 'O7ad' + 7 | ||
return password | ||
} |
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,16 @@ | ||
const { defineConfig } = require('cypress') | ||
|
||
module.exports = defineConfig({ | ||
video: false, | ||
e2e: { | ||
baseUrl: 'https://arcane-scrubland-42646.herokuapp.com/', | ||
specPattern: 'cypress/integration/*.cy.js', | ||
reporter: 'cypress-multi-reporters', | ||
reporterOptions: { | ||
configFile: 'reporter-config.json' | ||
}, | ||
setupNodeEvents (on, config) { | ||
// implement node event listeners here | ||
} | ||
} | ||
}) |
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,16 @@ | ||
const { defineConfig } = require('cypress') | ||
|
||
module.exports = defineConfig({ | ||
video: false, | ||
e2e: { | ||
baseUrl: 'https://wrongsecrets.herokuapp.com/', | ||
specPattern: 'cypress/integration/*.cy.js', | ||
reporter: 'cypress-multi-reporters', | ||
reporterOptions: { | ||
configFile: 'reporter-config.json' | ||
}, | ||
setupNodeEvents (on, config) { | ||
// implement node event listeners here | ||
} | ||
} | ||
}) |
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