@@ -27,6 +27,7 @@ test("matches snapshot", () => {
2727 badgeType = "default"
2828 onIconClick = { mockClickFn }
2929 darkMode = { false }
30+ hideBadge = { false }
3031 />
3132 ) ;
3233
@@ -41,6 +42,7 @@ test("should render notification icon only", () => {
4142 notificationIcon = { < div /> }
4243 badgeType = "none"
4344 darkMode = { true }
45+ hideBadge = { false }
4446 />
4547 ) ;
4648 const badge = component . queryByTestId ( "notification-default-badge" ) ;
@@ -56,6 +58,7 @@ test("should notification icon with a dot badge", () => {
5658 notificationIcon = { < div /> }
5759 badgeType = "dot"
5860 darkMode = { true }
61+ hideBadge = { false }
5962 />
6063 ) ;
6164 const badge = component . queryByTestId ( "notification-dot-badge" ) ;
@@ -70,6 +73,7 @@ test("should render the passed notification icon", () => {
7073 badgeType = "default"
7174 notificationIcon = { < div data-testid = "custom-notification-icon" /> }
7275 darkMode = { true }
76+ hideBadge = { false }
7377 />
7478 ) ;
7579 const button = component . getByTestId ( "custom-notification-icon" ) ; // Assuming count is displayed as button text
@@ -85,6 +89,7 @@ test("should call onClick handler on button click", () => {
8589 notificationIcon = { < div /> }
8690 badgeType = "dot"
8791 darkMode = { true }
92+ hideBadge = { false }
8893 />
8994 ) ;
9095 const button = component . getByTestId ( "notification-icon" ) ;
@@ -102,6 +107,7 @@ it("does not render badge with count if unviewed count is 0", () => {
102107 onIconClick = { mockClickFn }
103108 notificationIcon = { < div /> }
104109 darkMode = { true }
110+ hideBadge = { false }
105111 />
106112 ) ;
107113 const badge = queryByTestId ( "notification-default-badge" ) ;
@@ -117,6 +123,7 @@ it("renders badge without count for DOT badge type", () => {
117123 notificationIcon = { < div /> }
118124 badgeType = "dot"
119125 darkMode = { true }
126+ hideBadge = { false }
120127 />
121128 ) ;
122129 const badge = getByTestId ( "notification-dot-badge" ) ;
@@ -133,6 +140,7 @@ it("calls onClick handler when icon is clicked", () => {
133140 notificationIcon = { < div /> }
134141 badgeType = "dot"
135142 darkMode = { true }
143+ hideBadge = { false }
136144 />
137145 ) ;
138146 const icon = getByTestId ( "notification-icon" ) ;
@@ -149,6 +157,7 @@ test("should not render badge with count if unviewed count is 0", () => {
149157 onIconClick = { mockClickFn }
150158 notificationIcon = { < div /> }
151159 darkMode = { true }
160+ hideBadge = { false }
152161 />
153162 ) ;
154163 const badge = queryByTestId ( "notification-default-badge" ) ;
@@ -164,6 +173,7 @@ test("should hide badge if unviewed count is 0 and badge type is default", () =>
164173 badgeType = "default"
165174 notificationIcon = { < div /> }
166175 darkMode = { true }
176+ hideBadge = { false }
167177 />
168178 ) ;
169179 const badge = queryByTestId ( "notification-default-badge" ) ;
@@ -179,6 +189,7 @@ test("should hide badge if badge type is set to none", () => {
179189 badgeType = "none"
180190 notificationIcon = { < div /> }
181191 darkMode = { true }
192+ hideBadge = { false }
182193 />
183194 ) ;
184195 const badge = queryByTestId ( "notification-default-badge" ) ;
@@ -194,6 +205,7 @@ test("calls PubSub.subscribe with correct arguments", () => {
194205 badgeType = "default"
195206 onIconClick = { mockClickFn }
196207 darkMode = { true }
208+ hideBadge = { false }
197209 /> ,
198210 {
199211 wrapper : ( { children } ) => (
0 commit comments