2023-09-08 10:51:59 -05:00
|
|
|
import { e2e } from '../utils';
|
2021-10-25 06:55:06 -05:00
|
|
|
|
2023-09-13 07:24:20 -05:00
|
|
|
describe('Visualization suggestions', () => {
|
|
|
|
beforeEach(() => {
|
2023-09-27 05:33:00 -05:00
|
|
|
e2e.flows.login(Cypress.env('USERNAME'), Cypress.env('PASSWORD'));
|
2023-09-13 07:24:20 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
it('Should be shown and clickable', () => {
|
2021-10-28 02:56:21 -05:00
|
|
|
e2e.flows.openDashboard({ uid: 'aBXrJ0R7z', queryParams: { editPanel: 9 } });
|
2021-10-25 06:55:06 -05:00
|
|
|
|
|
|
|
// Try visualization suggestions
|
|
|
|
e2e.components.PanelEditor.toggleVizPicker().click();
|
2023-11-27 06:54:07 -06:00
|
|
|
e2e.components.RadioButton.container().filter(':contains("Suggestions")').click();
|
2021-10-25 06:55:06 -05:00
|
|
|
|
|
|
|
// Verify we see suggestions
|
|
|
|
e2e.components.VisualizationPreview.card('Line chart').should('be.visible');
|
|
|
|
|
|
|
|
// Verify search works
|
2023-09-11 05:20:54 -05:00
|
|
|
cy.get('[placeholder="Search for..."]').type('Table');
|
2021-10-25 06:55:06 -05:00
|
|
|
// Should no longer see line chart
|
|
|
|
e2e.components.VisualizationPreview.card('Line chart').should('not.exist');
|
|
|
|
|
|
|
|
// Select a visualisation
|
|
|
|
e2e.components.VisualizationPreview.card('Table').click();
|
|
|
|
e2e.components.Panels.Visualization.Table.header().should('be.visible');
|
2023-09-13 07:24:20 -05:00
|
|
|
});
|
2021-10-25 06:55:06 -05:00
|
|
|
});
|