vikunja/frontend/cypress
kolaente 021d71b90e fix: remove date-fns (#3039)
This removes date-fns and replaces it with the already used dayjs library. It does not make sense to have two libraries for the same purpose, and dayjs seems to be smaller and its translations are already integrated. Since we have to use dayjs because it is used by the gantt chart, this was the obvious way to go (instead of replacing dayjs with date-fns).

Resolves https://github.com/go-vikunja/vikunja/issues/391

Reviewed-on: https://kolaente.dev/vikunja/vikunja/pulls/3039
Co-authored-by: kolaente <k@knt.li>
Co-committed-by: kolaente <k@knt.li>
2025-02-21 15:42:58 +00:00
..
e2e fix: remove date-fns (#3039) 2025-02-21 15:42:58 +00:00
factories fix(tests): faker usage 2024-10-29 09:57:53 +00:00
fixtures chore: move frontend files 2024-02-07 14:56:56 +01:00
support chore: move frontend files 2024-02-07 14:56:56 +01:00
README.md chore: move frontend files 2024-02-07 14:56:56 +01:00
docker-compose.yml chore: move frontend files 2024-02-07 14:56:56 +01:00

README.md

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-compose run cypress bash

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

pnpm run test:e2e

Using The Cypress Dashboard

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

pnpm run test:e2e:dev