From bab9c77c4d6a776e77ccc692110112ebb1f2d12c Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Tue, 29 Aug 2023 18:01:30 +0100 Subject: [PATCH] open dashboard instead --- .../dashboard-time-zone.spec.ts | 44 ++++++++++--------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/e2e/dashboards-suite/dashboard-time-zone.spec.ts b/e2e/dashboards-suite/dashboard-time-zone.spec.ts index 4a12e591db9..5d3f8d5539c 100644 --- a/e2e/dashboards-suite/dashboard-time-zone.spec.ts +++ b/e2e/dashboards-suite/dashboard-time-zone.spec.ts @@ -92,18 +92,16 @@ e2e.scenario({ addScenarioDashBoard: false, skipScenario: false, scenario: () => { - // Open dashboard - e2e.flows.openDashboard({ - uid: 'd41dbaa2-a39e-4536-ab2b-caca52f1a9c8', - }); - e2e().intercept('/api/ds/query*').as('dataQuery'); - // Switch to Browser timezone - e2e.flows.setTimeRange({ - from: 'now-6h', - to: 'now', - zone: 'Browser', + // Open dashboard in Browser timezone + e2e.flows.openDashboard({ + uid: 'd41dbaa2-a39e-4536-ab2b-caca52f1a9c8', + timeRange: { + from: 'now-6h', + to: 'now', + zone: 'Browser', + }, }); // Need to wait for 2 calls as there's 2 panels e2e().wait(['@dataQuery', '@dataQuery']); @@ -146,11 +144,14 @@ e2e.scenario({ }); }); - // Test Tokyo timezone - e2e.flows.setTimeRange({ - from: 'now-6h', - to: 'now', - zone: 'Asia/Tokyo', + // Open dashboard in Tokyo timezone + e2e.flows.openDashboard({ + uid: 'd41dbaa2-a39e-4536-ab2b-caca52f1a9c8', + timeRange: { + from: 'now-6h', + to: 'now', + zone: 'Asia/Tokyo', + }, }); // Need to wait for 2 calls as there's 2 panels e2e().wait(['@dataQuery', '@dataQuery']); @@ -193,11 +194,14 @@ e2e.scenario({ }); }); - // Test LA timezone - e2e.flows.setTimeRange({ - from: 'now-6h', - to: 'now', - zone: 'America/Los_Angeles', + // Open dashboard in LA timezone + e2e.flows.openDashboard({ + uid: 'd41dbaa2-a39e-4536-ab2b-caca52f1a9c8', + timeRange: { + from: 'now-6h', + to: 'now', + zone: 'America/Los_Angeles', + }, }); // Need to wait for 2 calls as there's 2 panels e2e().wait(['@dataQuery', '@dataQuery']);