A suite of Cypress tests that runs against Hosted DoltDB (hosted.doltdb.com)
$ yarn && yarn compile
Note: If you're running the Cypress tests on the Apple M1 ARM Architecture, you may need to install Rosetta before running the tests:
$ softwareupdate --install-rosetta --agree-to-license
You can either run our Cypress suite against our deployed production (hosted.doltdb.com
), deployed development (hosteddoltdb.hosteddev.ld-corp.com
) or against the local webserver (localhost:3001
).
To run the tests against production, you can simply run these commands:
# runs tests using the full UI in Chrome against prod (recommended)
$ yarn cy-open
# runs tests against prod (default browser is Electron)
$ yarn cy-run
# runs tests headless against prod (using Chrome)
$ yarn cy-chrome
To run the tests against the local webserver, make sure you have the server running. (Please note: this option is only currently available for our DoltHub devs. If you want to add a test to our suite, please file an issue or pull request so we can add the appropriate data-cy
tag.)
Then, to run the Cypress tests against the local server:
# runs tests in Chrome against local server
$ yarn cy-open-local
# runs tests against local server
$ yarn cy-run-local
# runs specific tests against local server
$ yarn cy-run-local --spec 'cypress/e2e/publicPaths/render/homepage/*'
To run the tests in the privatePaths
folder you need to put the test username and password in a Cypress env file. Only DoltHub devs have access to this information and can run these tests locally. This file should not be checked in. The file should look like this:
// cypress.env.json
{
"TEST_USERNAME": "xxx",
"TEST_PASSWORD": "xxx"
}
See the dolthub-cypress README for more information about writing tests.