tree: 9c2ace5bdeb47c781450ef3ec4b516386a92edde [path history] [tgz]
  1. cypress/
  2. public/
  3. src/
  4. .env.development
  5. .eslintrc.json
  6. .gitignore
  7. cypress.config.ts
  8. i18next-parser.config.js
  9. index.html
  10. package.json
  11. README.md
  12. sentry.js
  13. tsconfig.json
  14. tsconfig.node.json
  15. vite.config.ts
client/README.md

Client

Setup

npm install

Usage

Run with hot-reload for development

npm start

Open http://localhost:3000 in your browser to view the app.

Build for production

npm run build

Preview the production build

npm run start:prod

Run tests

Run Cypress tests headlessly:

npm run cy

Run Cypress tests with the browser:

npm run cy:open

To overide configurations without modifying the existing config file:

npx cypress run --config <config>

Reference

Alternatively, you can create your own local config file and use the following command:

npx cypress run --config-file <config-file>

Remember do not push this file to the source control if not needed.

Test variables

You must provide the following variables in either cypress.config.ts or cypress.env.json

SERVER_URL
CLIENT_URL
TEST_USERNAME
TEST_USER_PASSWORD
USED_USERNAME

Check here to see how to set the environment variables. For local testing, modify the variables in cypress.env.json since it is not tracked and variables defined here take precedence over the ones in the config file.

Lint files

npm run lint

Lint and fix files:

npm run lint:fix

Format files

npm run format

Clean build output

npm run clean

Update the translation files

npm run extract-translations

The translations are handled by i18next.

Sentry

  • Uncomment the line // import config from "./sentry-server.config.json" assert { type: "json" }; in sentry.js
  • Uncomment the line // import config from "../sentry-client.config.json" and the init config Sentry.init(... in index.ts
  • Add sentry-client.config.json file in client and sentry-server.config.json (ask them to an admin)