Skip to content

Commit

Permalink
Add minimal PWA setup for installability using the Vite PWA plugin #61
Browse files Browse the repository at this point in the history
  • Loading branch information
caebr authored and hupf committed Dec 4, 2023
1 parent 05c957e commit e6449e3
Show file tree
Hide file tree
Showing 18 changed files with 3,911 additions and 180 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Lint & Test ✨

on: [push, pull_request]

env:
DISABLE_SERVICE_WORKER: "true"

jobs:
test:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ lerna-debug.log*

node_modules
dist
dev-dist
dist-ssr
*.local
public/settings.js
Expand Down
14 changes: 7 additions & 7 deletions cypress/e2e/navigationRouting.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe("Navigation & Routing", () => {
cy.get("iframe").should(
"have.attr",
"src",
"apps/webapp-schulverwaltung/index.html#/dashboard",
"/apps/webapp-schulverwaltung/index.html#/dashboard",
);
});

Expand Down Expand Up @@ -106,7 +106,7 @@ describe("Navigation & Routing", () => {
cy.get("iframe").should(
"have.attr",
"src",
"apps/webapp-schulverwaltung/index.html#/presence-control",
"/apps/webapp-schulverwaltung/index.html#/presence-control",
);

// Does not redirect to home
Expand Down Expand Up @@ -163,7 +163,7 @@ describe("Navigation & Routing", () => {
cy.get("iframe").should(
"have.attr",
"src",
"apps/webapp-schulverwaltung/index.html#/dashboard",
"/apps/webapp-schulverwaltung/index.html#/dashboard",
);

// Does not redirect to home
Expand All @@ -187,7 +187,7 @@ describe("Navigation & Routing", () => {
cy.get("iframe").should(
"have.attr",
"src",
"apps/webapp-schulverwaltung/index.html#/dashboard",
"/apps/webapp-schulverwaltung/index.html#/dashboard",
);

// Updates URL to ?module=home
Expand Down Expand Up @@ -237,7 +237,7 @@ describe("Navigation & Routing", () => {
cy.get("iframe").should(
"have.attr",
"src",
"apps/webapp-schulverwaltung/index.html#/presence-control",
"/apps/webapp-schulverwaltung/index.html#/presence-control",
);
});

Expand All @@ -258,7 +258,7 @@ describe("Navigation & Routing", () => {
.should(
"have.attr",
"src",
"apps/webapp-schulverwaltung/index.html#/presence-control/student/5389/absences?returnparams=date%3D2023-07-03%26viewMode%3Dgrid%26lesson%3D291257",
"/apps/webapp-schulverwaltung/index.html#/presence-control/student/5389/absences?returnparams=date%3D2023-07-03%26viewMode%3Dgrid%26lesson%3D291257",
)
.its("0.contentDocument.body")
.should("contain", "Profil wurde nicht gefunden");
Expand All @@ -284,7 +284,7 @@ describe("Navigation & Routing", () => {
cy.get("iframe").should(
"have.attr",
"src",
"apps/webapp-schulverwaltung/index.html#/presence-control",
"/apps/webapp-schulverwaltung/index.html#/presence-control",
);
cy.get("button[aria-label='Menü']").as("toggle").should("be.visible");

Expand Down
18 changes: 17 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,25 @@
<html lang="de">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/icon.svg" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
<link
rel="apple-touch-icon"
href="/icons/apple-touch-icon-180x180.png"
sizes="180x180"
/>
<link
rel="mask-icon"
href="/icons/maskable-icon-512x512.png"
color="#FFFFFF"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#EA161F" />
<title>Evento</title>
<meta
name="description"
content="Schulverwaltungsapplikation des Kantons Bern"
/>
<link rel="stylesheet" href="./src/index.css" />
<script src="/settings.js"></script>
<script src="/apps/webapp-schulverwaltung/settings.js"></script>
Expand Down
Loading

0 comments on commit e6449e3

Please sign in to comment.