Dashboards/E2E: Add tests for grouping and ungrouping into rows and tabs (#105315)
* add e2e for grouping into tabs and rows * enable kubernetesDashboards feature toggle for e2e tests * remove unnecessary kubernetesDashboard feature flag enablement
This commit is contained in:
@@ -1,6 +1,16 @@
|
||||
import { e2e } from '../..';
|
||||
|
||||
export const addPanel = () => {
|
||||
e2e.components.DashboardEditPaneSplitter.primaryBody().scrollTo('bottom');
|
||||
e2e.components.DashboardEditPaneSplitter.primaryBody().scrollTo('bottom', { ensureScrollable: false });
|
||||
e2e.components.CanvasGridAddActions.addPanel().should('be.visible').click();
|
||||
};
|
||||
|
||||
export const addFirstPanel = () => {
|
||||
// add visualization
|
||||
e2e.pages.AddDashboard.itemButton('Create new panel button').should('be.visible').click();
|
||||
|
||||
// close the data source picker modal
|
||||
cy.get('[aria-label="Close"]').click({ force: true });
|
||||
|
||||
e2e.components.NavToolbar.editDashboard.backToDashboardButton().click();
|
||||
};
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import { e2e } from '../..';
|
||||
|
||||
export const groupIntoRow = () => {
|
||||
e2e.components.CanvasGridAddActions.groupPanels().click({ scrollBehavior: 'nearest' });
|
||||
cy.contains('Group into row').click();
|
||||
};
|
||||
|
||||
export const groupIntoTab = () => {
|
||||
e2e.components.CanvasGridAddActions.groupPanels().click({ scrollBehavior: 'nearest' });
|
||||
cy.contains('Group into tab').click();
|
||||
};
|
||||
|
||||
export const ungroupPanels = () => {
|
||||
e2e.components.CanvasGridAddActions.ungroup().click({ scrollBehavior: 'nearest' });
|
||||
};
|
||||
@@ -2,3 +2,5 @@ export * from './addPanel';
|
||||
export * from './configurePanel';
|
||||
export * from './removePanel';
|
||||
export * from './toggleEditMode';
|
||||
export * from './groupPanels';
|
||||
export * from './saveDashboard';
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import { e2e } from '../../index';
|
||||
|
||||
export const saveDashboard = () => {
|
||||
e2e.components.NavToolbar.editDashboard.saveButton().click();
|
||||
|
||||
e2e.components.Drawer.DashboardSaveDrawer.saveButton().click();
|
||||
e2e.flows.assertSuccessNotification();
|
||||
};
|
||||
Reference in New Issue
Block a user