Skip to content

Commit

Permalink
Add missing timerange on addDashboard call
Browse files Browse the repository at this point in the history
  • Loading branch information
aangelisc committed Sep 7, 2023
1 parent 85935b6 commit 3215575
Showing 1 changed file with 32 additions and 24 deletions.
56 changes: 32 additions & 24 deletions cypress/integration/02_variable_editor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
});
});
},
});

0 comments on commit 3215575

Please sign in to comment.