From bea9984a6b30cd29972c1f07a00f977b769fe3ce Mon Sep 17 00:00:00 2001 From: jelenjelinek Date: Tue, 1 Dec 2026 18:32:54 +0100 Subject: [PATCH] Organisers' Exit goes to the house like the brand link, without the fade Exit in the manager menu is now a router Link to "/" (as the brand in the top bar), styled as before (btn-sm btn-secondary, full width, same place). The attendees' Exits and the fade after submitting are unchanged, so m.exitFade stays in use. Co-Authored-By: Claude Opus 5.5 --- src/pages/manager/ManagerLayout.tsx | 11 +++++------ test/managerExit.test.ts | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 test/managerExit.test.ts diff --git a/src/pages/manager/ManagerLayout.tsx b/src/pages/manager/ManagerLayout.tsx index 4049e7b..c4f74ab 100644 --- a/src/pages/manager/ManagerLayout.tsx +++ b/src/pages/manager/ManagerLayout.tsx @@ -1,7 +1,6 @@ -import { Button, Nav } from 'react-bootstrap'; +import { Nav } from 'react-bootstrap'; import { useTranslation } from 'react-i18next'; -import { NavLink, Outlet } from 'react-router'; -import { useSubmitFade } from '../../components/SubmitFade'; +import { Link, NavLink, Outlet } from 'react-router'; import { ExcelButton } from './ExcelButton'; const PAGES = [ @@ -11,7 +10,6 @@ const PAGES = [ export function ManagerLayout() { const { t } = useTranslation(); - const fade = useSubmitFade(); return (
diff --git a/test/managerExit.test.ts b/test/managerExit.test.ts new file mode 100644 index 0000000..4c16eea --- /dev/null +++ b/test/managerExit.test.ts @@ -0,0 +1,19 @@ +import { describe, expect, it } from 'vitest'; +import appShell from '../src/components/AppShell.tsx?raw'; +import managerLayout from '../src/pages/manager/ManagerLayout.tsx?raw'; +import myTrip from '../src/pages/MyTrip.tsx?raw'; +import questionnaire from '../src/pages/Questionnaire.tsx?raw'; + +// The tests type-check without JSX (tsconfig.worker.json), so the wiring is checked in the source. +describe('the organisers\' Exit', () => { + it('goes to the house like the brand in the top bar: a plain link to "/", no dark fade', () => { + expect(appShell).toMatch(/{t(\'m.nav.exit\')}'); + expect(managerLayout).not.toMatch(/useSubmitFade|exitFade/); + }); + + it('leaves the attendees\' Exits with their fade', () => { + expect(questionnaire).toContain("startFade(t('m.exitFade'))"); + expect(myTrip).toContain("fade(t('m.exitFade'))"); + }); +});