File tree 2 files changed +14
-4
lines changed
2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -168,11 +168,11 @@ describe('Integration Tests', () => {
168
168
. invoke ( 'toast.pop' , 0 )
169
169
} )
170
170
171
- it ( 'Uses component' , ( ) => {
171
+ it ( 'Renders custom component and is reactive ' , ( ) => {
172
172
cy . get ( '[data-btn=sendComponentAsAMessage]' )
173
173
. click ( )
174
- . get ( '._toastItem' )
175
- . contains ( 'A Dummy Cookie Component ')
174
+ . get ( '._toastItem h1 ' )
175
+ . should ( 'have.text' , 'Test Reactivity ')
176
176
. get ( '[data-btn=default]' )
177
177
. click ( )
178
178
. get ( '[data-btn=dummyAccept' )
Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ toast.pop(0)`,
264
264
}
265
265
})` ,
266
266
run : () => {
267
- toast .push ({
267
+ const id = toast .push ({
268
268
component: {
269
269
src: DummyComponent,
270
270
props: { title: ' A Dummy Cookie Component' },
@@ -281,6 +281,16 @@ toast.pop(0)`,
281
281
' --toastBorderRadius' : ' 1rem'
282
282
}
283
283
})
284
+ // @ts-ignore
285
+ if (window .Cypress ) {
286
+ toast .set (id, {
287
+ component: {
288
+ src: DummyComponent,
289
+ props: { title: ' Test Reactivity' },
290
+ sendIdTo: ' toastId'
291
+ }
292
+ })
293
+ }
284
294
}
285
295
},
286
296
{
You can’t perform that action at this time.
0 commit comments