Skip to content

Latest commit

 

History

History
77 lines (52 loc) · 2.04 KB

README.md

File metadata and controls

77 lines (52 loc) · 2.04 KB

Frontend

The frontend is the main entry point for users of RIS norms.

Development

Prerequisites

  • Node.js (with a .node-version file) for simplified setup using nodenv

Quick-Start

  • npm i fetches all dependencies
  • npm run dev starts the application. By default on local port 5173. You will also need a running backend.
  • npm run test runs the tests once
  • npm run test:watch runs the tests and automatically re-runs if something changes
  • npm run test:e2e runs the E2E tests (requires a running frontend and backend)
  • npm run coverage compiles a coverage report via v8
  • npm run style:check does linting and formatting
  • npm run style:fix will try to fix linting and formatting issues
  • npm run build builds the app

E2E Tests

Make sure the backend and frontend run here.

Install Browsers

npx --yes playwright install --with-deps chromium firefox msedge

Let Playwright know where to connect to by using the .env file:

cp .env.local.example .env.local

Run the E2E Test

npm run test:e2e

Run just 1 specific test:

npm run test:e2e -- [testfile]

Debug an e2e test:

npm run test:e2e -- [testfile] --debug

Run a specific browser e2e test:

npm run test:e2e -- --project chromium --repeat-each 1
npm run test:e2e -- --project firefox --repeat-each 1
npm run test:e2e -- --project msedge --repeat-each 1

Alternatively the DEVELOPING.md also explains how to run the e2e-tests inside a docker container.

Icons

All icons in the Google Material sets can be used.

To make the icon available in your code:

  • Find and select the icon
  • Copy the name (e.g. ic/baseline-upload-file)
  • Use the copied icon name in your import statement using the ~icons/ic prefix followed by the name. Example: import UploadFileOutlineRounded from "~icons/ic/baseline-upload-file"