From 74466be9ae39ed85f1f46185fb875ab4ada4d5b8 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Sun, 25 Oct 2026 09:32:37 -0400 Subject: [PATCH] test: replace route snapshots with structure assertions Drop the full-tree Settings and Filters route snapshots. Assert the complete settings heading outline and every visible setting label grouped by section, plus every filter option, account, search control, and footer action. Scope filter checkbox names and ids to their section so repeated labels such as Other resolve to the right control. --- .../components/filters/FilterSection.tsx | 2 +- .../__snapshots__/FilterSection.test.tsx.snap | 116 +- .../__snapshots__/ReasonFilter.test.tsx.snap | 238 +- .../ReviewRequestTypeFilter.test.tsx.snap | 42 +- .../__snapshots__/StateFilter.test.tsx.snap | 58 +- .../SubjectTypeFilter.test.tsx.snap | 126 +- .../UserTypeFilter.test.tsx.snap | 44 +- src/renderer/routes/Filters.test.tsx | 81 +- src/renderer/routes/Settings.test.tsx | 91 +- .../__snapshots__/Filters.test.tsx.snap | 3497 ----------- .../__snapshots__/Settings.test.tsx.snap | 5291 ----------------- 11 files changed, 480 insertions(+), 9106 deletions(-) delete mode 100644 src/renderer/routes/__snapshots__/Filters.test.tsx.snap delete mode 100644 src/renderer/routes/__snapshots__/Settings.test.tsx.snap diff --git a/src/renderer/components/filters/FilterSection.tsx b/src/renderer/components/filters/FilterSection.tsx index 5e2075b4b..8fa4e745b 100644 --- a/src/renderer/components/filters/FilterSection.tsx +++ b/src/renderer/components/filters/FilterSection.tsx @@ -94,7 +94,7 @@ function FilterSectionComponent({ disabled={filter.requiresDetailsNotifications && !detailedNotifications} key={type as string} label={typeTitle} - name={typeTitle} + name={`${filterSetting}-${String(type)}`} onChange={() => updateFilter(filterSetting, type, !isChecked)} tooltip={typeDescription ? {typeDescription} : null} /> diff --git a/src/renderer/components/filters/__snapshots__/FilterSection.test.tsx.snap b/src/renderer/components/filters/__snapshots__/FilterSection.test.tsx.snap index b5c55aa1f..af572c2fb 100644 --- a/src/renderer/components/filters/__snapshots__/FilterSection.test.tsx.snap +++ b/src/renderer/components/filters/__snapshots__/FilterSection.test.tsx.snap @@ -68,29 +68,29 @@ exports[`renderer/components/filters/FilterSection.tsx > should render itself & aria-required="false" class="prc-Checkbox-Input-lWIkv prc-Checkbox-Checkbox-jjOgT" data-component="Checkbox" - data-testid="checkbox-Closed" - id="filter-Closed" - name="Closed" + data-testid="checkbox-states-closed" + id="filter-states-closed" + name="states-closed" type="checkbox" /> -
-
- -

- Filters -

-
-
- - -
-
-
- - Account - -
-
- -

- Account -

- -
-
-
-
- - - - -  ( - 0 - ) - -
-
- - - - -  ( - 0 - ) - -
-
-
-
- - Search - -
- -
-
-
-
-
- - - Include - : - -
-
-
- -
-
- -
-
-
-
-
-
-
-
- - - Exclude - : - -
-
-
- -
-
- -
-
-
-
-
-
-
-
- - User Type - -
-
- -

- User Type -

- -
-
-
-
- - - - - -  ( - 0 - ) - -
-
- - - - -  ( - 0 - ) - -
-
- - - - -  ( - 0 - ) - -
-
- - - - - -  ( - 0 - ) - -
-
-
-
- - Type - -
-
- -

- Type -

- -
-
-
-
- - - - -  ( - 0 - ) - -
-
- - - - -  ( - 0 - ) - -
-
- - - - -  ( - 0 - ) - -
-
- - - - -  ( - 0 - ) - -
-
- - - - -  ( - 0 - ) - -
-
- - - - -  ( - 0 - ) - -
-
- - - - -  ( - 0 - ) - -
-
- - - - -  ( - 0 - ) - -
-
- - - - -  ( - 0 - ) - -
-
- - - - -  ( - 0 - ) - -
-
- - - - -  ( - 0 - ) - -
-
- - - - -  ( - 0 - ) - -
-
- - - - -  ( - 0 - ) - -
-
- - - - -  ( - 0 - ) - -
-
- - - - - -  ( - 0 - ) - -
-
-
-
- - State - -
-
- -

- State -

- -
-
-
-
- - - - - -  ( - 0 - ) - -
-
- - - - -  ( - 0 - ) - -
-
- - - - -  ( - 0 - ) - -
-
- - - - - -  ( - 0 - ) - -
-
- - - - - -  ( - 0 - ) - -
-
-
-
- - Review Request Type - -
-
- -

- Review Request Type -

- -
-
-
-
- - - - - -  ( - 0 - ) - -
-
- - - - - -  ( - 0 - ) - -
-
- - - - - -  ( - 0 - ) - -
-
-
-
- - Reason - -
-
- -

- Reason -

- -
-
-
-
- - - - - -  ( - 0 - ) - -
-
- - - - - -  ( - 0 - ) - -
-
- - - - - -  ( - 0 - ) - -
-
- - - - - -  ( - 0 - ) - -
-
- - - - - -  ( - 0 - ) - -
-
- - - - - -  ( - 0 - ) - -
-
- - - - - -  ( - 0 - ) - -
-
- - - - - -  ( - 0 - ) - -
-
- - - - - -  ( - 0 - ) - -
-
- - - - - -  ( - 0 - ) - -
-
- - - - - -  ( - 0 - ) - -
-
- - - - - -  ( - 0 - ) - -
-
- - - - - -  ( - 0 - ) - -
-
- - - - - -  ( - 0 - ) - -
-
- - - - - -  ( - 0 - ) - -
-
- - - - - -  ( - 0 - ) - -
-
- - - - - -  ( - 0 - ) - -
-
-
-
-
- - -`; diff --git a/src/renderer/routes/__snapshots__/Settings.test.tsx.snap b/src/renderer/routes/__snapshots__/Settings.test.tsx.snap deleted file mode 100644 index 6cdc47f08..000000000 --- a/src/renderer/routes/__snapshots__/Settings.test.tsx.snap +++ /dev/null @@ -1,5291 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`renderer/routes/Settings.tsx > should render itself & its children 1`] = ` -
-
-
- -
-
- -

- Settings -

-
-
-
-
-
-
-
- - Appearance - -
-
- -

- Appearance -

-
-
-
-
-
-
- - Design - - - -
-
-
    -
  • - -
  • -
  • - -
  • -
-
-
-
-
-
-
- - Theme - - - -
-
- - - - -
-
-
-
-
-
- - Increase contrast - - - -
-
-
- -
- - - -
-
-
-
-
- - Zoom - - -
-
-
-
- -
-
- -
-
- -
-
- -
-
-
-
-
-
-
-
- - Inbox - -
-
- -

- Inbox -

-
-
-
-
- -
- Fetch -
-
-
-
-
-
- - Fetch interval - - -
-
-
-
- -
-
- -
-
- -
-
- -
-
-
-
-
-
-
-
- - Fetch all notifications - - - -
-
-
- -
- - - -
-
-
-
-
- - Fetch read and done notifications - - - -
-
-
- -
- - - -
-
-
-
- -
- List -
-
-
-
-
-
- - Group by - - - -
-
-
    -
  • - -
  • -
  • - -
  • -
-
-
-
-
-
-
- - Show account header - - - -
-
-
- -
- - - -
-
-
-
-
- - Show full notification title - - - -
-
-
- -
- - - -
-
-
-
-
- - Show reference - - - -
-
-
- -
- - - -
-
-
-
-
- - Delay notification removal - - - -
-
-
- -
- - - -
-
-
-
- -
- GitHub -
-
-
-
-
-
- - Fetch only participating - - - -
-
-
- -
- - - -
-
-
-
-
- - Fetch detailed notifications - - - -
-
-
- -
- - - -
-
-
-
- -
-
-
-

- Missing notification scopes -

-
-
- - One or more accounts are missing scopes required for notification enrichment. Notification details may be incomplete. - - -
-
-
-
-
-
-
-
-
-
-
- - Show notification metrics - - - -
-
-
- -
- - - -
-
-
-
-
-
-
-
- - Mark as done on open - - - -
-
-
- -
- - - -
-
-
-
-
- - Mark as done on unsubscribe - - - -
-
-
- -
- - - -
-
-
-
-
-
- - Alerts - -
-
- -

- Alerts -

-
-
-
-
-
-
- - Show desktop notifications - - - -
-
-
- -
- - - -
-
-
-
-
- - Play notification sound - - - -
-
-
- -
- - - -
-
-
-
-
-
-
- - Notification volume - - -
-
-
-
- -
-
- -
-
- -
-
- -
-
-
-
-
-
-
-
-
-
- - Show app update notifications - - - -
-
-
- -
- - - -
-
-
-
-
- - Tray - -
-
- -

- Tray -

-
-
-
-
-
-
- - Show notification count - - - -
-
-
- -
- - - -
-
-
-
-
- - Highlight unread notifications - - - -
-
-
- -
- - - -
-
-
-
-
- - Idle icon - - - -
-
-
    -
  • - -
  • -
  • - -
  • -
  • - -
  • -
-
-
-
-
-
-
- - System - -
-
- -

- System -

-
-
-
-
-
-
- - Link focus - - - -
-
-
    -
  • - -
  • -
  • - -
  • -
-
-
-
-
-
-
- - Enable global shortcut - - - -
-
-
- -
- - - -
-
-
-
-
-
-
-
- - Global shortcut - - -
-
-
-
- -
-
- -
-
- -
-
-
-
-
-
-
-
-
-
-
- - Keep window open when unfocused - - - -
-
-
- -
- - - -
-
-
-
-
- - Launch at startup - - - -
-
-
- -
- - - -
-
-
-
-
- -
-
-
- -
-`;