2023-09-08 10:51:59 -05:00
|
|
|
import { e2e } from '../utils';
|
2020-04-24 01:48:04 -05:00
|
|
|
|
2023-09-13 07:24:20 -05:00
|
|
|
describe('Explore', () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
e2e.flows.login(e2e.env('USERNAME'), e2e.env('PASSWORD'));
|
|
|
|
});
|
|
|
|
|
|
|
|
it('Basic path through Explore.', () => {
|
2020-04-24 01:48:04 -05:00
|
|
|
e2e.pages.Explore.visit();
|
|
|
|
e2e.pages.Explore.General.container().should('have.length', 1);
|
2021-11-10 04:01:06 -06:00
|
|
|
e2e.components.RefreshPicker.runButtonV2().should('have.length', 1);
|
2020-04-24 01:48:04 -05:00
|
|
|
|
2023-04-05 09:08:03 -05:00
|
|
|
// delete query history queries that would be unrelated
|
|
|
|
e2e.components.QueryTab.queryHistoryButton().should('be.visible').click();
|
|
|
|
cy.get('button[title="Delete query"]').each((button) => {
|
|
|
|
button.trigger('click');
|
|
|
|
});
|
2023-06-06 09:31:39 -05:00
|
|
|
cy.get('button[title="Delete query"]').should('not.exist');
|
2023-04-05 09:08:03 -05:00
|
|
|
e2e.components.QueryTab.queryHistoryButton().should('be.visible').click();
|
|
|
|
|
2020-10-20 11:18:14 -05:00
|
|
|
e2e.components.DataSource.TestData.QueryTab.scenarioSelectContainer()
|
2023-04-05 09:08:03 -05:00
|
|
|
.scrollIntoView()
|
2020-10-20 11:18:14 -05:00
|
|
|
.should('be.visible')
|
|
|
|
.within(() => {
|
2023-09-11 05:20:54 -05:00
|
|
|
cy.get('input[id*="test-data-scenario-select-"]').should('be.visible').click();
|
2020-10-20 11:18:14 -05:00
|
|
|
});
|
|
|
|
|
2021-07-14 08:04:23 -05:00
|
|
|
cy.contains('CSV Metric Values').scrollIntoView().should('be.visible').click();
|
|
|
|
|
2023-09-11 05:20:54 -05:00
|
|
|
const canvases = cy.get('canvas');
|
2021-01-15 09:20:20 -06:00
|
|
|
canvases.should('have.length', 1);
|
2022-05-17 05:59:16 -05:00
|
|
|
|
|
|
|
// Both queries above should have been run and be shown in the query history
|
|
|
|
e2e.components.QueryTab.queryHistoryButton().should('be.visible').click();
|
2023-06-21 04:06:28 -05:00
|
|
|
e2e.components.QueryHistory.queryText().should('have.length', 1).should('contain', 'csv_metric_values');
|
2022-12-19 08:21:00 -06:00
|
|
|
|
|
|
|
// delete all queries
|
|
|
|
cy.get('button[title="Delete query"]').each((button) => {
|
|
|
|
button.trigger('click');
|
|
|
|
});
|
2023-09-13 07:24:20 -05:00
|
|
|
});
|
2020-04-24 01:48:04 -05:00
|
|
|
});
|