From ce3c5db315825e4bcddf7fd6d9aa3061234b8733 Mon Sep 17 00:00:00 2001 From: Stefan Hildebrandt <695494+hildebrandttk@users.noreply.github.com> Date: Mon, 10 Aug 2026 21:24:43 +0200 Subject: [PATCH] test(integration): multi-account calendar switch preserves selection Docker/Playwright regression for the cross-account id-namespacing fix: log in two accounts, enable the Pro shell, deselect a calendar, switch the active account, and assert the deselection survives (it reset before the fix because the previously-active account's ids flipped raw<->namespaced on the switch). Adds the minimal test hooks: data-testid on calendar sidebar rows (calendar-item + data-calendar-name/-visible), the settings tab buttons (settings-tab-), and a testId passthrough on ToggleSwitch used for the Pro interface toggle. New app helpers: openCalendar (in-app nav, since a hard goto to a deep link bounces to login), calendarRows, enableProInterface (toggles via the settings UI - the app doesn't survive a hard reload and seeding proInterface before login destabilises the add-account popover). Verified green in the dockerized Stalwart harness. --- .../calendar/calendar-sidebar-panel.tsx | 4 + components/settings/layout-settings.tsx | 1 + components/settings/settings-app.tsx | 2 + components/settings/settings-section.tsx | 5 +- .../tests/11-multi-account-calendar.spec.ts | 89 +++++++++++++++++++ integration/tests/helpers/app.ts | 50 +++++++++++ 6 files changed, 150 insertions(+), 1 deletion(-) create mode 100644 integration/tests/11-multi-account-calendar.spec.ts diff --git a/components/calendar/calendar-sidebar-panel.tsx b/components/calendar/calendar-sidebar-panel.tsx index 38dc2dccd..7dd844510 100644 --- a/components/calendar/calendar-sidebar-panel.tsx +++ b/components/calendar/calendar-sidebar-panel.tsx @@ -242,6 +242,10 @@ export function CalendarSidebarPanel({