DashboardE2E: Add more cases to grouping E2E (#105598)
* add more row grouping e2e * refactor dashboard create with dashboard import to speed up tests * add more tests for tabs layout * adjust flaky test
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { e2e } from '../..';
|
||||
|
||||
export const clickGroupLayoutButton = (buttonLabel: string) => {
|
||||
cy.get(`[aria-label='layout-selection-option-${buttonLabel}']`).click();
|
||||
};
|
||||
|
||||
export const selectTabsLayout = () => {
|
||||
clickGroupLayoutButton('Tabs');
|
||||
};
|
||||
|
||||
export const selectRowsLayout = () => {
|
||||
clickGroupLayoutButton('Rows');
|
||||
};
|
||||
|
||||
const editPaneCopyOrDuplicate = (buttonLabel: string) => {
|
||||
e2e.components.EditPaneHeader.copyDropdown().click();
|
||||
cy.get('[role="menu"]').within(() => {
|
||||
cy.contains(buttonLabel).click();
|
||||
});
|
||||
};
|
||||
|
||||
export const editPaneCopy = () => editPaneCopyOrDuplicate('Copy');
|
||||
export const editPaneDuplicate = () => editPaneCopyOrDuplicate('Duplicate');
|
||||
Reference in New Issue
Block a user