This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/cypress
konrad fe6d975134
All checks were successful
continuous-integration/drone/push Build is passing
Replace vue-multiselect with a custom component (#366)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: #366
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-01-06 22:36:31 +00:00
..
factories Replace vue-multiselect with a custom component (#366) 2021-01-06 22:36:31 +00:00
fixtures Frontend Testing With Cypress (#313) 2020-12-10 13:52:35 +00:00
integration Replace vue-multiselect with a custom component (#366) 2021-01-06 22:36:31 +00:00
plugins Frontend Testing With Cypress (#313) 2020-12-10 13:52:35 +00:00
support Frontend Testing With Cypress (#313) 2020-12-10 13:52:35 +00:00
docker-compose.yml Frontend Testing With Cypress (#313) 2020-12-10 13:52:35 +00:00
README.md Frontend Testing With Cypress (#313) 2020-12-10 13:52:35 +00:00

Frontend Testing With Cypress

Setup

  • Enable the seeder api endpoint. You'll then need to add the testingtoken in cypress.json or set the CYPRESS_TEST_SECRET environment variable.
  • Basic configuration happens in the cypress.json file
  • Overridable with env
  • Override base url with CYPRESS_BASE_URL

Fixtures

We're using the test endpoint of the vikunja api to seed the database with test data before running the tests. This ensures better reproducability of tests.

Running The Tests Locally

Using Docker

The easiest way to run all frontend tests locally is by using the docker-compose file in this repository. It uses the same configuration as the CI.

To use it, run

docker-compose up -d

Then, once all containers are started, run

docker-composer run cypress bash

to get a shell inside the cypress container. In that shell you can then execute the tests with

yarn test:frontend

Using The Cypress Dashboard

To open the Cypress Dashboard and run tests from there, run

yarn cypress:open