@@ -42,7 +42,7 @@ test.describe( 'Upsell', () => {
4242 expect ( await page . frameLocator ( 'iframe' ) . locator ( '#vz-chart-source .viz-group-title .dashicons-lock' ) . count ( ) ) . toBe ( 5 ) ;
4343
4444
45- const uploadFileUpsell = page . frameLocator ( 'iframe' ) . locator ( '#vz-chart-source .visualizer_source_csv .only-pro-inner a' ) ;
45+ const uploadFileUpsell = page . frameLocator ( 'iframe' ) . locator ( '#vz-chart-source .visualizer_source_csv .only-pro-inner a' ) . last ( ) ;
4646 let href = await uploadFileUpsell . getAttribute ( 'href' ) ;
4747 let searchParams = new URLSearchParams ( href ) ;
4848 expect ( searchParams . get ( 'utm_campaign' ) ) . toBe ( 'import-file' ) ;
@@ -52,7 +52,7 @@ test.describe( 'Upsell', () => {
5252 searchParams = new URLSearchParams ( href ) ;
5353 expect ( searchParams . get ( 'utm_campaign' ) ) . toBe ( 'import-url' ) ;
5454
55- const otherChartUpsell = page . frameLocator ( 'iframe' ) . locator ( '#vz-chart-source .viz-import-from-other .only-pro-inner a' ) ;
55+ const otherChartUpsell = page . frameLocator ( 'iframe' ) . locator ( '#vz-chart-source .viz-import-from-other .only-pro-inner a' ) . last ( ) ;
5656 href = await otherChartUpsell . getAttribute ( 'href' ) ;
5757 searchParams = new URLSearchParams ( href ) ;
5858 expect ( searchParams . get ( 'utm_campaign' ) ) . toBe ( 'import-chart' ) ;
@@ -75,17 +75,17 @@ test.describe( 'Upsell', () => {
7575
7676 await page . frameLocator ( 'iframe' ) . getByRole ( 'link' , { name : 'Settings' } ) . click ( ) ;
7777
78- const dataFilterConfigurationUpsell = page . frameLocator ( 'iframe' ) . locator ( '#vz-data-controls .only-pro-inner a' ) ;
78+ const dataFilterConfigurationUpsell = page . frameLocator ( 'iframe' ) . locator ( '#vz-data-controls .only-pro-inner a' ) . last ( ) ;
7979 href = await dataFilterConfigurationUpsell . getAttribute ( 'href' ) ;
8080 searchParams = new URLSearchParams ( href ) ;
8181 expect ( searchParams . get ( 'utm_campaign' ) ) . toBe ( 'data-filter-configuration' ) ;
8282
83- const frontendActionsUpsell = page . frameLocator ( 'iframe' ) . locator ( '#vz-frontend-actions .only-pro-inner a' ) ;
83+ const frontendActionsUpsell = page . frameLocator ( 'iframe' ) . locator ( '#vz-frontend-actions .only-pro-inner a' ) . last ( ) ;
8484 href = await frontendActionsUpsell . getAttribute ( 'href' ) ;
8585 searchParams = new URLSearchParams ( href ) ;
8686 expect ( searchParams . get ( 'utm_campaign' ) ) . toBe ( 'frontend-actions' ) ;
8787
88- const chartPermissionsUpsell = page . frameLocator ( 'iframe' ) . locator ( '#vz-permissions .only-pro-inner a' ) ;
88+ const chartPermissionsUpsell = page . frameLocator ( 'iframe' ) . locator ( '#vz-permissions .only-pro-inner a' ) . last ( ) ;
8989 href = await chartPermissionsUpsell . getAttribute ( 'href' ) ;
9090 searchParams = new URLSearchParams ( href ) ;
9191 expect ( searchParams . get ( 'utm_campaign' ) ) . toBe ( 'chart-permissions' ) ;
0 commit comments