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