@@ -16,13 +16,24 @@ describe("UserId", function () {
1616 expect ( await page . screenshotSelector ( '#widgetUserIdgetUsers' ) ) . to . matchImage ( 'report' ) ;
1717 } ) ;
1818
19- it ( 'should switch to table with engagement metrics' , async function ( ) {
20- await page . click ( '.activateVisualizationSelection > span' ) ;
21- await page . click ( '.tableIcon[data-footer-icon-id=tableAllColumns]' ) ;
22- await page . mouse . move ( - 10 , - 10 ) ;
23- await page . waitForNetworkIdle ( ) ;
24- expect ( await page . screenshotSelector ( '#widgetUserIdgetUsers' ) ) . to . matchImage ( 'report_engagement' ) ;
19+ it ( 'should switch to table with engagement metrics' , async function ( ) {
20+ await page . click ( '.activateVisualizationSelection > span' ) ;
21+ await page . click ( '.tableIcon[data-footer-icon-id=tableAllColumns]' ) ;
22+ await page . mouse . move ( - 10 , - 10 ) ;
23+ await page . waitForNetworkIdle ( ) ;
24+ expect ( await page . screenshotSelector ( '#widgetUserIdgetUsers' ) ) . to . matchImage ( 'report_engagement' ) ;
2525 } ) ;
2626
27-
27+ it ( 'should correctly open the visitor profile' , async function ( ) {
28+ var rowToMatch = 'td.label:contains(user1):first' ;
29+ await ( await page . jQuery ( 'table.dataTable tbody ' + rowToMatch ) ) . hover ( ) ;
30+ await page . waitForTimeout ( 100 ) ;
31+ await ( await page . jQuery ( rowToMatch + ' a.actionvisitorDetails:visible' ) ) . hover ( ) ;
32+ await ( await page . jQuery ( rowToMatch + ' a.actionvisitorDetails:visible' ) ) . click ( ) ;
33+ await page . mouse . move ( - 10 , - 10 ) ;
34+ await page . waitForTimeout ( 250 ) ;
35+ await page . waitForNetworkIdle ( ) ;
36+ expect ( await page . getWholeCurrentUrl ( ) ) . to . match ( / & p o p o v e r = R o w A c t i o n % 2 4 3 A v i s i t o r D e t a i l s % 2 4 3 A [ a - f 0 - 9 ] { 16 } $ / ) ;
37+ expect ( await page . screenshotSelector ( '#Piwik_Popover' ) ) . to . matchImage ( 'visitor_profile_popup' ) ;
38+ } ) ;
2839} ) ;
0 commit comments