From f231de55f4c9707575d63bc70e7b2c1b454c3875 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Mon, 14 Oct 2024 18:03:51 -0400 Subject: [PATCH] test: update test cases Signed-off-by: Adam Setch --- .../notifications/AccountNotifications.tsx | 2 +- .../notifications/NotificationFooter.tsx | 46 ++- .../notifications/NotificationRow.tsx | 2 +- .../notifications/RepositoryNotifications.tsx | 4 +- .../AccountNotifications.test.tsx.snap | 158 +++++----- .../NotificationFooter.test.tsx.snap | 296 ++++++++---------- .../NotificationRow.test.tsx.snap | 180 +++++------ .../RepositoryNotifications.test.tsx.snap | 28 +- 8 files changed, 317 insertions(+), 399 deletions(-) diff --git a/src/renderer/components/notifications/AccountNotifications.tsx b/src/renderer/components/notifications/AccountNotifications.tsx index ffd61a902..14db4c0ea 100644 --- a/src/renderer/components/notifications/AccountNotifications.tsx +++ b/src/renderer/components/notifications/AccountNotifications.tsx @@ -77,7 +77,7 @@ export const AccountNotifications: FC = ( {showAccountHeader && (
= ({ return (
-
- {notification.subject.user ? ( - ) => { - // Don't trigger onClick of parent element. - event.stopPropagation(); - openUserProfile(notification.subject.user); - }} - data-testid="view-profile" - /> - ) : ( -
- {notification.subject.type === 'RepositoryDependabotAlertsThread' || - notification.subject.type === 'RepositoryVulnerabilityAlert' ? ( - - ) : ( - - )} -
- )} -
+ {notification.subject.user ? ( + ) => { + // Don't trigger onClick of parent element. + event.stopPropagation(); + openUserProfile(notification.subject.user); + }} + data-testid="view-profile" + /> + ) : ( + + {notification.subject.type === 'RepositoryDependabotAlertsThread' || + notification.subject.type === 'RepositoryVulnerabilityAlert' ? ( + + ) : ( + + )} + + )} = ({
= ({ return ( <>
= ({ 'flex flex-1 gap-3 items-center truncate text-sm font-medium', animateExit && 'translate-x-full opacity-0 transition duration-[350ms] ease-in-out', - showAsRead ? Opacity.READ : Opacity.MEDIUM, + showAsRead && Opacity.READ, )} > diff --git a/src/renderer/components/notifications/__snapshots__/AccountNotifications.test.tsx.snap b/src/renderer/components/notifications/__snapshots__/AccountNotifications.test.tsx.snap index 319b4518f..4f0638acf 100644 --- a/src/renderer/components/notifications/__snapshots__/AccountNotifications.test.tsx.snap +++ b/src/renderer/components/notifications/__snapshots__/AccountNotifications.test.tsx.snap @@ -6,7 +6,7 @@ exports[`renderer/components/notifications/AccountNotifications.tsx should rende "baseElement":
, "container":
-
- -
+
-
-
- -
-
+ + + , "container":
-
- -
+
-
-
- -
-
+ + +
, "container":
, "container":
, "container":
-
- -
+ -
- -
+ -
- -
+ -
- -
+ -
-
- -
-
+ + + -
-
- -
-
+ + + -
- -
+ -
- -
+ -
- -
+ -
- -
+
-
- -
+ , "container":
-
- -
+
-
- -
+ , "container":
-
- -
+
-
- -
+ , "container":
-
- -
+
, "container":
, "container":
, "container":