Skip to content

Latest commit

 

History

History

frontend

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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 typecheck runs type checking through TypeScript
  • 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
  • npm run preview previews the app (requires a build first)

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"