From 3215575afb38e055019baa33f90a648d0d094ff8 Mon Sep 17 00:00:00 2001 From: Andreas Christou Date: Thu, 7 Sep 2023 18:12:29 +0100 Subject: [PATCH] Add missing timerange on addDashboard call --- .../integration/02_variable_editor.spec.ts | 56 +++++++++++-------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/cypress/integration/02_variable_editor.spec.ts b/cypress/integration/02_variable_editor.spec.ts index fecd5e9..144c505 100644 --- a/cypress/integration/02_variable_editor.spec.ts +++ b/cypress/integration/02_variable_editor.spec.ts @@ -27,30 +27,38 @@ e2e.scenario({ form: () => fillSentryConfigurationForm(SENTRY_AUTH_TOKEN, 'https://sentry.io', SENTRY_ORG_SLUG), }) .then((ds) => { - e2e.flows.addDashboard().then(() => { - e2e.components.PageToolbar.item('Dashboard settings').click(); - e2e.components.Tab.title('Variables').click(); - e2e.pages.Dashboard.Settings.Variables.List.addVariableCTAV2().click(); - e2e.pages.Dashboard.Settings.Variables.Edit.General.generalNameInputV2().clear().type('variable1'); - e2e.components.DataSourcePicker.inputV2().type(`${ds.config.name}{enter}`); - // Get list of projects - selectDropdown(e2eSelectors.VariablesEditor.QueryType.container.ariaLabel(), 'Projects'); - cy.wait(2 * 1000); - variableEditorPreviewValuesCheck([`${SENTRY_E2E_PROJECT_NAME} (${SENTRY_E2E_PROJECT_ID})`]); - // Get list of environments - selectDropdown(e2eSelectors.VariablesEditor.QueryType.container.ariaLabel(), 'Environments'); - cy.wait(2 * 1000); - variableEditorPreviewValuesCheck([SENTRY_E2E_ENVIRONMENT_NAME, SENTRY_E2E_NODE_ONLY_ENVIRONMENT_NAME]); - selectDropdown(e2eSelectors.VariablesEditor.Project.container.ariaLabel(), SENTRY_E2E_PROJECT_NAME); - cy.wait(2 * 1000); - variableEditorPreviewValuesCheck([SENTRY_E2E_ENVIRONMENT_NAME], [SENTRY_E2E_NODE_ONLY_ENVIRONMENT_NAME]); - selectDropdown( - e2eSelectors.VariablesEditor.Project.container.ariaLabel(), - SENTRY_E2E_PRODUCTION_PROJECT_NAME - ); - cy.wait(2 * 1000); - variableEditorPreviewValuesCheck([SENTRY_E2E_ENVIRONMENT_NAME, SENTRY_E2E_NODE_ONLY_ENVIRONMENT_NAME]); - }); + e2e.flows + .addDashboard({ + timeRange: { + from: 'now-6h', + to: 'now', + zone: 'Coordinated Universal Time', + }, + }) + .then(() => { + e2e.components.PageToolbar.item('Dashboard settings').click(); + e2e.components.Tab.title('Variables').click(); + e2e.pages.Dashboard.Settings.Variables.List.addVariableCTAV2().click(); + e2e.pages.Dashboard.Settings.Variables.Edit.General.generalNameInputV2().clear().type('variable1'); + e2e.components.DataSourcePicker.inputV2().type(`${ds.config.name}{enter}`); + // Get list of projects + selectDropdown(e2eSelectors.VariablesEditor.QueryType.container.ariaLabel(), 'Projects'); + cy.wait(2 * 1000); + variableEditorPreviewValuesCheck([`${SENTRY_E2E_PROJECT_NAME} (${SENTRY_E2E_PROJECT_ID})`]); + // Get list of environments + selectDropdown(e2eSelectors.VariablesEditor.QueryType.container.ariaLabel(), 'Environments'); + cy.wait(2 * 1000); + variableEditorPreviewValuesCheck([SENTRY_E2E_ENVIRONMENT_NAME, SENTRY_E2E_NODE_ONLY_ENVIRONMENT_NAME]); + selectDropdown(e2eSelectors.VariablesEditor.Project.container.ariaLabel(), SENTRY_E2E_PROJECT_NAME); + cy.wait(2 * 1000); + variableEditorPreviewValuesCheck([SENTRY_E2E_ENVIRONMENT_NAME], [SENTRY_E2E_NODE_ONLY_ENVIRONMENT_NAME]); + selectDropdown( + e2eSelectors.VariablesEditor.Project.container.ariaLabel(), + SENTRY_E2E_PRODUCTION_PROJECT_NAME + ); + cy.wait(2 * 1000); + variableEditorPreviewValuesCheck([SENTRY_E2E_ENVIRONMENT_NAME, SENTRY_E2E_NODE_ONLY_ENVIRONMENT_NAME]); + }); }); }, });