E2E Testing on AnzuSystems Admin-DAM by Petit Press a.s. (www.sme.sk)
Simple guide on how to run E2E tests on the project.
Follow the installation guide to install the project and run dev server.
-
Staging and devel config files are stored in
cypress/config
folder. -
For testing create
stg.ts
/dev.ts
/local.ts
file incypress/config
folder, then change environment parameter 'cfg' incypress.config.ts
-
Some are stored in LastPass under name
Cypress Config - DAM
or use following example:
function extendCypressConfigStg(config) {
config.baseUrl = ''
config.env.credentials = {
testUser: {
username: '',
password: '',
forceLoginLink: '', // admin forceLoginLink
},
}
config.env.cookie = {
name: '',
value: '',
}
config.env.url = {
domain: '',
proto: '',
}
return config
}
module.exports = extendCypressConfigStg
First script used to run tests inside the application docker container:
bin/test
-e, --env (Optional) Run tests in specific environment. (Default: local)
-b, --browser (Optional) Run tests in selected browser. (Allowed values: electron|chrome, Default: chrome)
-f --filter (Optional) Comma separated list of filters without space (Default: n/a - all tests)
bin/test --env=local --browser=chrome --filter=@assets,@navigation,@upload
bin/test -e stg -b chrome -f @licence,@assets
/* Do not use space before @ using --filter */
yarn cypress open -C cypress/config/cypress.config.ts