-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* first copy of tests * oppdaterte deps * eslint og prettier * do not log passowrd and pin fixed config loading in plugin * added xml2js and updated cypress template correspondence and updated test * sample env file * new test
- Loading branch information
1 parent
c174540
commit ea98440
Showing
32 changed files
with
3,649 additions
and
2 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,48 @@ | ||
{ | ||
"env": { | ||
"cypress/globals": true | ||
}, | ||
"plugins": [ | ||
"cypress" | ||
], | ||
"extends": [ | ||
"plugin:cypress/recommended", | ||
"plugin:prettier/recommended" | ||
], | ||
"ignorePatterns": [ | ||
"src/data", | ||
"src/reports", | ||
"src/fixtures", | ||
"src/config" | ||
], | ||
"rules": { | ||
"eol-last": "error", | ||
"max-len": [ | ||
"error", | ||
{ | ||
"code": 120, | ||
"tabWidth": 2, | ||
"ignoreUrls": true | ||
} | ||
], | ||
"indent": [ | ||
"warn", | ||
2, | ||
{ | ||
"SwitchCase": 1 | ||
} | ||
], | ||
"quotes": [ | ||
"warn", | ||
"single", | ||
{ | ||
"avoidEscape": true, | ||
"allowTemplateLiterals": true | ||
} | ||
], | ||
"semi": [ | ||
"warn", | ||
"never" | ||
] | ||
} | ||
} |
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,27 @@ | ||
#vscode settings | ||
.vscode/ | ||
|
||
# Dependency directories | ||
node_modules/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# Screenshots and video | ||
screenshots/ | ||
videos/ | ||
|
||
# Junit xml reports | ||
reports/ | ||
|
||
# Downloads | ||
downloads/ | ||
|
||
#Test data | ||
data/ |
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,8 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/prettierrc", | ||
"trailingComma": "all", | ||
"tabWidth": 2, | ||
"semi": false, | ||
"singleQuote": true, | ||
"printWidth": 120 | ||
} |
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,3 +1,28 @@ | ||
# Altinn 2 Cypress tests | ||
# Introduction | ||
|
||
... | ||
This project is for End to end testing of Altinn solution using [cypress](https://www.cypress.io/). | ||
|
||
## Getting Started | ||
|
||
These instructions will get you run the end to end tests on test environments. | ||
|
||
### Install dependencies | ||
|
||
```cmd | ||
npm install # only needed first time, or when dependencies are updated | ||
``` | ||
|
||
### Open cypress and run tests | ||
|
||
Run the below command to open cypress with the environment | ||
|
||
```cmd | ||
npm run cy:open --env=at22 | ||
``` | ||
|
||
### Format files with prettier | ||
|
||
```cmd | ||
npm run check # For checking the files deviating standards | ||
npm run format # format and save the files based on config | ||
``` |
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,23 @@ | ||
{ | ||
"$schema": "https://on.cypress.io/cypress.schema.json", | ||
"env": {}, | ||
"video": false, | ||
"fixturesFolder": "src/fixtures", | ||
"integrationFolder": "src/integration", | ||
"supportFile": "src/support/index.js", | ||
"pluginsFile": "src/plugins/index.js", | ||
"downloadsFolder": "downloads", | ||
"screenshotOnRunFailure": true, | ||
"screenshotsFolder": "screenshots", | ||
"trashAssetsBeforeRuns": true, | ||
"videosFolder": "videos", | ||
"viewportHeight": 768, | ||
"viewportWidth": 1536, | ||
"requestTimeout": 10000, | ||
"defaultCommandTimeout": 8000, | ||
"chromeWebSecurity": false, | ||
"reporter": "junit", | ||
"reporterOptions": { | ||
"mochaFile": "reports/result-[hash].xml" | ||
} | ||
} |
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,29 @@ | ||
version: '3.2' | ||
|
||
# run Cypress tests and exit with command | ||
# docker-compose up --exit-code-from cypress | ||
services: | ||
cypress: | ||
image: 'cypress/included:6.6.0' | ||
environment: | ||
- CYPRESS_environment=at23 | ||
working_dir: /AutomatedportalTest | ||
volumes: | ||
- ./:/AutomatedportalTest | ||
command: '--spec /AutomatedportalTest/src/integration/pdf/pdf.js -b chrome' | ||
cypress2: | ||
image: 'cypress/included:6.6.0' | ||
environment: | ||
- CYPRESS_environment=at23 | ||
working_dir: /AutomatedportalTest | ||
volumes: | ||
- ./:/AutomatedportalTest | ||
command: '--spec /AutomatedportalTest/src/integration/login/*.js -b chrome' | ||
cypress3: | ||
image: 'cypress/included:6.6.0' | ||
environment: | ||
- CYPRESS_environment=at23 | ||
working_dir: /AutomatedportalTest | ||
volumes: | ||
- ./:/AutomatedportalTest | ||
command: '--spec "/AutomatedportalTest/src/integration/profile/*.js,/AutomatedportalTest/src/integration/services/*.js" -b chrome' |
Oops, something went wrong.