The generic host and user settings are in the cypress.env.json
file.
Note
|
The main configuration file is the |
{
"HOST": "http://localhost:3000",
"BASE_URL": "http://localhost:3000",
"ADMIN_URL": "http://localhost:8080",
"COMPOSE_URL": "http://localhost:8081",
"WORKFLOW_URL": "http://localhost:8082",
"REPORTER_URL": "http://localhost:8083",
"ONE_URL": "http://localhost:8084",
"PRIVACY_URL": "http://localhost:8085",
"USER_EMAIL": "[email protected]",
"USER_PASSWORD": "cypress123",
"USER_PASSWORD_NEW": "newcypress123",
"USER_EMAIL_NEW": "[email protected]",
"USER_DPO": "[email protected]",
"USER_DPO_USER_PASSWORD": "[email protected]",
"PROVISION_DB_DSN": "postgres://corteza:corteza@localhost:5432/corteza_cy_test?sslmode=disable",
"AUTH_CLIENT_ID": "374948212714242049",
"AUTH_CLIENT_SECRET": "hPK7hiO15mI3qwboi7oTOrhc1ntn68mRRpmgLkbV6seXLLRjZtieUHdJECvEEN8Y"
}
$ yarn cypress run --spec <path-to-spec-file>
$ cypress run --spec cypress/e2e/basic-functionalities/local-tests/server/Create_user.cy.js
The SMTP testing is done via mailhog.
$ docker-compose up -d mailhog
Note
|
The mailhog container is ephemeral, so all the emails will NOT be persisted in the container (you will lose emails when the mailhog is stopped). |
You can preview all the emails manually by visiting http://localhost:8025
Setting | Value |
---|---|
Server |
localhost |
Port |
1025 |
User |
<empty> |
Password |
<empty> |
Create an .env
file and specify the Corteza and Cypress versions.
The host configuration should be specified either via cypress.env.json
or by environment variables in the docker-compose.yaml
configuration.
Note
|
Refer to the |
$ docker-compose run --entrypoint='cypress run --spec cypress/e2e/basic-functionalities/local-tests/server/index.cy.js cypress' cypress
This project also adds several custom commands in cypress/support/
. They are useful to create one or more default todos from the tests.
Cypress.Commands.add('login', (params) => {
// custom login function
})