From 8980539d3be3602b0556a72fc7c5c218d679a371 Mon Sep 17 00:00:00 2001 From: Dino-Kupinic Date: Thu, 28 Mar 2024 17:14:38 +0100 Subject: [PATCH 1/2] feat: add spa loading template --- frontend/app/spa-loading-template.html | 63 ++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 frontend/app/spa-loading-template.html diff --git a/frontend/app/spa-loading-template.html b/frontend/app/spa-loading-template.html new file mode 100644 index 0000000..277d130 --- /dev/null +++ b/frontend/app/spa-loading-template.html @@ -0,0 +1,63 @@ + +
+ + + + + + + + + + + + + + +
From 3b063408c99460220377a04f83f73c2c2d970aee Mon Sep 17 00:00:00 2001 From: Dino-Kupinic Date: Thu, 28 Mar 2024 17:30:59 +0100 Subject: [PATCH 2/2] feat: add e2e test and updated docs --- README.md | 11 +++++ docs/de/developers/setup.md | 12 ++++++ docs/developers/setup.md | 12 ++++++ frontend/README.md | 75 ----------------------------------- frontend/test/e2e/app.spec.ts | 6 +++ 5 files changed, 41 insertions(+), 75 deletions(-) delete mode 100644 frontend/README.md diff --git a/README.md b/README.md index 338f492..a65ebad 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,17 @@ pnpm run dev 4. Head to http://localhost:3000/ +If it works, great! + +> [!IMPORTANT] +> Following instruction is optional and may be skipped. If you have slow internet, it may take a while to +> install Chrome, Safari and Firefox (~150 MB) + +5. Install playwright browsers +``` +npx playwright install +``` + ### Backend 1. go into the backend directory diff --git a/docs/de/developers/setup.md b/docs/de/developers/setup.md index 48137c5..bd244bf 100644 --- a/docs/de/developers/setup.md +++ b/docs/de/developers/setup.md @@ -34,6 +34,18 @@ pnpm run dev 4. Gehe zu `http://localhost:3000/` +Wenn es funktioniert, toll! + +::: warning WARNUNG +Folgende Anweisung ist optional und kann übersprungen werden. Falls Sie langsames Internet haben, könnte es eine +Weile dauern bis Sie Chrome, Safari und Firefox installiert haben (~150 MB) +::: + +5. Installiere playwright browser +``` +npx playwright install +``` + ## Backend 1. Wechseln Sie in das Backend-Verzeichnis diff --git a/docs/developers/setup.md b/docs/developers/setup.md index 535a74b..ab5331d 100644 --- a/docs/developers/setup.md +++ b/docs/developers/setup.md @@ -34,6 +34,18 @@ pnpm run dev 4. Head to `http://localhost:3000/` +If it works, great! + +::: warning +Following instruction is optional and may be skipped. If you have slow internet, it may take a while to +install Chrome, Safari and Firefox (~150 MB) +::: + +5. Install playwright browsers +``` +npx playwright install +``` + ## Backend 1. go into the backend directory diff --git a/frontend/README.md b/frontend/README.md deleted file mode 100644 index f5db2a2..0000000 --- a/frontend/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# Nuxt 3 Minimal Starter - -Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. - -## Setup - -Make sure to install the dependencies: - -```bash -# npm -npm install - -# pnpm -pnpm install - -# yarn -yarn install - -# bun -bun install -``` - -## Development Server - -Start the development server on `http://localhost:3000`: - -```bash -# npm -npm run dev - -# pnpm -pnpm run dev - -# yarn -yarn dev - -# bun -bun run dev -``` - -## Production - -Build the application for production: - -```bash -# npm -npm run build - -# pnpm -pnpm run build - -# yarn -yarn build - -# bun -bun run build -``` - -Locally preview production build: - -```bash -# npm -npm run preview - -# pnpm -pnpm run preview - -# yarn -yarn preview - -# bun -bun run preview -``` - -Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. diff --git a/frontend/test/e2e/app.spec.ts b/frontend/test/e2e/app.spec.ts index ff795c9..e456ba6 100644 --- a/frontend/test/e2e/app.spec.ts +++ b/frontend/test/e2e/app.spec.ts @@ -5,3 +5,9 @@ test("has title", async ({page}) => { await expect(page).toHaveTitle(/Schulbuchaktion/) }) + +test("has spa loading template", async ({page}) => { + await page.goto("/") + + await page.locator(".loading").isVisible() +})