@@ -16,8 +16,18 @@ describe('renderWindowsToast', () => {
1616 type : NotificationType . Message ,
1717 } ) ;
1818
19- const expected =
20- '<toast launch="sgnl://show-conversation?token=token" activationType="protocol"><visual><binding template="ToastImageAndText02"><image id="1" src="file:///C:/temp/ab/abcd" hint-crop="circle"></image><text id="1">Alice</text><text id="2">Hi there!</text></binding></visual></toast>' ;
19+ const expected = [
20+ '<toast launch="sgnl://show-conversation?token=token" activationType="protocol">' ,
21+ '<visual>' ,
22+ '<binding template="ToastImageAndText02">' ,
23+ '<image id="1" src="file:///C:/temp/ab/abcd" hint-crop="circle"></image>' ,
24+ '<text id="1">Alice</text>' ,
25+ '<text id="2">Hi there!</text>' ,
26+ '</binding>' ,
27+ '</visual>' ,
28+ '<audio src="ms-winsoundevent:Notification.IM"></audio>' ,
29+ '</toast>' ,
30+ ] . join ( '' ) ;
2131
2232 assert . strictEqual ( xml , expected ) ;
2333 } ) ;
@@ -30,8 +40,17 @@ describe('renderWindowsToast', () => {
3040 type : NotificationType . Message ,
3141 } ) ;
3242
33- const expected =
34- '<toast launch="sgnl://show-conversation?token=token" activationType="protocol"><visual><binding template="ToastText02"><text id="1">Alice</text><text id="2">Hi there!</text></binding></visual></toast>' ;
43+ const expected = [
44+ '<toast launch="sgnl://show-conversation?token=token" activationType="protocol">' ,
45+ '<visual>' ,
46+ '<binding template="ToastText02">' ,
47+ '<text id="1">Alice</text>' ,
48+ '<text id="2">Hi there!</text>' ,
49+ '</binding>' ,
50+ '</visual>' ,
51+ '<audio src="ms-winsoundevent:Notification.IM"></audio>' ,
52+ '</toast>' ,
53+ ] . join ( '' ) ;
3554
3655 assert . strictEqual ( xml , expected ) ;
3756 } ) ;
@@ -44,8 +63,17 @@ describe('renderWindowsToast', () => {
4463 type : NotificationType . Message ,
4564 } ) ;
4665
47- const expected =
48- '<toast launch="sgnl://show-conversation?token=token" activationType="protocol"><visual><binding template="ToastText02"><text id="1">Alice</text><text id="2">Hi there!</text></binding></visual></toast>' ;
66+ const expected = [
67+ '<toast launch="sgnl://show-conversation?token=token" activationType="protocol">' ,
68+ '<visual>' ,
69+ '<binding template="ToastText02">' ,
70+ '<text id="1">Alice</text>' ,
71+ '<text id="2">Hi there!</text>' ,
72+ '</binding>' ,
73+ '</visual>' ,
74+ '<audio src="ms-winsoundevent:Notification.IM"></audio>' ,
75+ '</toast>' ,
76+ ] . join ( '' ) ;
4977
5078 assert . strictEqual ( xml , expected ) ;
5179 } ) ;
@@ -58,8 +86,16 @@ describe('renderWindowsToast', () => {
5886 type : NotificationType . IncomingCall ,
5987 } ) ;
6088
61- const expected =
62- '<toast launch="sgnl://show-window" activationType="protocol"><visual><binding template="ToastText02"><text id="1">Alice</text><text id="2">Hi there!</text></binding></visual></toast>' ;
89+ const expected = [
90+ '<toast launch="sgnl://show-window" activationType="protocol">' ,
91+ '<visual>' ,
92+ '<binding template="ToastText02">' ,
93+ '<text id="1">Alice</text>' ,
94+ '<text id="2">Hi there!</text>' ,
95+ '</binding>' ,
96+ '</visual>' ,
97+ '</toast>' ,
98+ ] . join ( '' ) ;
6399
64100 assert . strictEqual ( xml , expected ) ;
65101 } ) ;
@@ -72,8 +108,16 @@ describe('renderWindowsToast', () => {
72108 type : NotificationType . IncomingGroupCall ,
73109 } ) ;
74110
75- const expected =
76- '<toast launch="sgnl://start-call-lobby?token=token" activationType="protocol"><visual><binding template="ToastText02"><text id="1">Alice</text><text id="2">Hi there!</text></binding></visual></toast>' ;
111+ const expected = [
112+ '<toast launch="sgnl://start-call-lobby?token=token" activationType="protocol">' ,
113+ '<visual>' ,
114+ '<binding template="ToastText02">' ,
115+ '<text id="1">Alice</text>' ,
116+ '<text id="2">Hi there!</text>' ,
117+ '</binding>' ,
118+ '</visual>' ,
119+ '</toast>' ,
120+ ] . join ( '' ) ;
77121
78122 assert . strictEqual ( xml , expected ) ;
79123 } ) ;
@@ -86,8 +130,16 @@ describe('renderWindowsToast', () => {
86130 type : NotificationType . IsPresenting ,
87131 } ) ;
88132
89- const expected =
90- '<toast launch="sgnl://cancel-presenting" activationType="protocol"><visual><binding template="ToastText02"><text id="1">Alice</text><text id="2">Hi there!</text></binding></visual></toast>' ;
133+ const expected = [
134+ '<toast launch="sgnl://cancel-presenting" activationType="protocol">' ,
135+ '<visual>' ,
136+ '<binding template="ToastText02">' ,
137+ '<text id="1">Alice</text>' ,
138+ '<text id="2">Hi there!</text>' ,
139+ '</binding>' ,
140+ '</visual>' ,
141+ '</toast>' ,
142+ ] . join ( '' ) ;
91143
92144 assert . strictEqual ( xml , expected ) ;
93145 } ) ;
0 commit comments