File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- <!DOCTYPE html>
1+ <!doctype html>
22< html lang ="en-US ">
33 < head >
44 < link href ="/assets/index.css " rel ="stylesheet " type ="text/css " />
3535 await pageConditions . minNumActivitiesShown ( 3 ) ;
3636
3737 // THEN: There should be 3 activities in total: 1 from user, followed by 2 from the bot.
38+ expect (
39+ pageElements . activityStatuses ( ) . map ( element => element . querySelector ( '[aria-hidden="true"]' ) ?. textContent )
40+ ) . toEqual ( [ 'Just now' , undefined , 'Just now' ] ) ;
41+
3842 await host . snapshot ( ) ;
3943
4044 // WHEN: `styleOptions.groupTimestamp` is set to 0, which means, every activity is on its own group.
4145 renderWebChat ( { styleOptions : { groupTimestamp : 0 } } ) ;
4246
4347 // THEN: Every messages should have timestamp on its own.
48+ expect (
49+ pageElements . activityStatuses ( ) . map ( element => element . querySelector ( '[aria-hidden="true"]' ) ?. textContent )
50+ ) . toEqual ( [ 'Just now' , 'Just now' , 'Just now' ] ) ;
51+
4452 await host . snapshot ( ) ;
4553
4654 // WHEN: `styleOptions.groupTimestamp` is set to false, which means, timestamp is disabled.
4755 renderWebChat ( { styleOptions : { groupTimestamp : false } } ) ;
4856
4957 // THEN: No messages should have timestamp on it.
58+ expect (
59+ pageElements . activityStatuses ( ) . map ( element => element . querySelector ( '[aria-hidden="true"]' ) ?. textContent )
60+ ) . toEqual ( [ undefined , undefined , undefined ] ) ;
61+
5062 await host . snapshot ( ) ;
5163 } ) ;
5264 </ script >
You can’t perform that action at this time.
0 commit comments