@@ -26,19 +26,60 @@ describe('renderer/components/notifications/NotificationHeader.tsx', () => {
2626 expect ( tree ) . toMatchSnapshot ( ) ;
2727 } ) ;
2828
29- it ( 'should render itself & its children - group by date' , async ( ) => {
30- const props = {
31- notification : mockSingleNotification ,
32- } ;
29+ describe ( 'should render itself & its children - group by date' , ( ) => {
30+ it ( 'with notification number' , async ( ) => {
31+ const props = {
32+ notification : mockSingleNotification ,
33+ } ;
3334
34- const tree = render (
35- < AppContext . Provider
36- value = { { settings : { ...mockSettings , groupBy : GroupBy . DATE } } }
37- >
38- < NotificationHeader { ...props } />
39- </ AppContext . Provider > ,
40- ) ;
41- expect ( tree ) . toMatchSnapshot ( ) ;
35+ const tree = render (
36+ < AppContext . Provider
37+ value = { { settings : { ...mockSettings , groupBy : GroupBy . DATE } } }
38+ >
39+ < NotificationHeader { ...props } />
40+ </ AppContext . Provider > ,
41+ ) ;
42+ expect ( tree ) . toMatchSnapshot ( ) ;
43+ } ) ;
44+
45+ it ( 'with showNumber setting disabled' , async ( ) => {
46+ const props = {
47+ notification : mockSingleNotification ,
48+ } ;
49+
50+ const tree = render (
51+ < AppContext . Provider
52+ value = { {
53+ settings : {
54+ ...mockSettings ,
55+ showNumber : false ,
56+ groupBy : GroupBy . DATE ,
57+ } ,
58+ } }
59+ >
60+ < NotificationHeader { ...props } />
61+ </ AppContext . Provider > ,
62+ ) ;
63+ expect ( tree ) . toMatchSnapshot ( ) ;
64+ } ) ;
65+
66+ it ( 'without notification number' , async ( ) => {
67+ const props = {
68+ notification : {
69+ ...mockSingleNotification ,
70+ subject : { ...mockSingleNotification . subject , number : null } ,
71+ } ,
72+ } ;
73+
74+ const tree = render (
75+ < AppContext . Provider
76+ value = { { settings : { ...mockSettings , groupBy : GroupBy . DATE } } }
77+ >
78+ < NotificationHeader { ...props } />
79+ </ AppContext . Provider > ,
80+ ) ;
81+ expect ( tree ) . toMatchSnapshot ( ) ;
82+ } ) ;
4283 } ) ;
4384
4485 it ( 'should open notification user profile - group by date' , ( ) => {
0 commit comments