We have separate test suits for admin-ui and csc-ui platform.
- ngcp-admin-ui tests are in the folder
cypress/e2e/ngcp-aui - ncgp-csc-ui tests are in the folder
cypress/e2e/ngcp-csc
AUI and CSC tests can be run in different ways:
- Using Cypress UI interface
- Using the tdd headless mode
- Using Docker
Create the config files by running the below command.
This command will copy the current cypress.csc.template.js and cypress.aui.template.js content and save it as
cypress.csc.config.js and cypress.aui.config.js in your root folder
$ yarn run setup$ yarn run start:csc
$ yarn run start:auiCreate the tdd config files by running the below command.
This command will copy the current cypress.tdd.csc.template.js and cypress.tdd.aui.template.js content and save it as
cypress.tdd.csc.config.js and cypress.tdd.aui.config.js in your root folder
$ yarn run tdd:setup$ yarn run tdd:csc
$ yarn run tdd:auiCreate the config files by running the below command.
This command will copy the current cypress.ci.csc.template.js and cypress.ci.aui.template.js content and save it as
cypress.ci.csc.config.js and cypress.ci.aui.config.js in your root folder
$ yarn run ci:setupTo run tests in already prepared docker image you just need to execute next command:
$ yarn run docker:run <tests parameters>Where tests parameter are 4 in the following order:
- application to test: aui or csc (mandatory)
- app URL (mandatory, e.g. https://{ip})
- api URL (mandatory, https://{ip}:1443)
- group (optional, if no group is specified all test will be executed)
For example our parameters might be:
- "csc https://{ip} https://{ip}:1443 group2" -> execute tests in ngcp-csc/group2
- "aui https://{ip}:1443 https://{ip}:1443 group1" -> execute tests in ngcp-aui/group1
- "aui https://{ip}:1443 https://{ip}:1443" -> execute all tests in ngcp-aui
# CSC
$ yarn run docker:run csc https://{ip}/v2 https://{ip} group2
# OR AUI
$ yarn run docker:run aui https://{ip}:1443/v2 https://{ip}:1443 group2In case you would like have you own local Docker image to apply custom version of Cypress you need to build a local Docker image. For that please follow next steps:
- Prepare desired version of "package.json"
- Build your local Docker image with
$ yarn run docker:rebuild:local - Run tests in Docker container with
$ yarn run docker:run:local <tests parameters>
For example CSC:
$ yarn run docker:rebuild:local
$ yarn run docker:run:local csc https://host.docker.internal:8080/v2 https://dev-web-trunk.mgm.sipwise.com group2Note: if you would like to test CSC or AUI applications started locally you should pass https://host.docker.internal:8080 instead of https://localhost:8080 to the tests running script!
Important: if you test locally started application (CSC UI URL: https://host.docker.internal:8080 or https://localhost:8080) you should change CSC user logins in your test's config template cypress.ci.csc.template.js to be with domain name, like so: username@domain. Otherwise, some tests might fail.