Skip to content

Commit

Permalink
Update cypress/utils/dashboards/saved_objects_management/commands.js
Browse files Browse the repository at this point in the history
Co-authored-by: Zhongnan Su <[email protected]>
Signed-off-by: Yu Jin <[email protected]>
Signed-off-by: yujin-emma <[email protected]>
  • Loading branch information
yujin-emma and zhongnansu committed Jun 13, 2024
1 parent 1ad7e4e commit 0842294
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4,418 deletions.
1 change: 1 addition & 0 deletions .worktrees/backport-2.x
Submodule backport-2.x added at 23743f
28 changes: 16 additions & 12 deletions cypress/utils/dashboards/saved_objects_management/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,22 @@ Cypress.Commands.add('selectDataSourceForImport', (dataSourceTitle) => {
});

Cypress.Commands.add('deleteAllSavedObjects', () => {
cy.wait(1000);
cy.deleteSavedObjectByType('dashboard');
cy.wait(1000);
cy.deleteSavedObjectByType('index-pattern');
cy.wait(1000);
cy.deleteSavedObjectByType('search');
cy.wait(1000);
cy.deleteSavedObjectByType('visualization');
cy.wait(1000);
cy.deleteSavedObjectByType('metrics');
cy.wait(1000);
cy.deleteSavedObjectByType('vega');
const types = [
'index-pattern',
'visualization',
'dashboard',
'search',
'query',
'url',
'augment-vis',
'homepage',
'data-source',
'visualization-visbuilder',
'config',
];
types.forEach((type) => {
cy.deleteSavedObjectByType(type);
});
});

Cypress.Commands.add(
Expand Down
Loading

0 comments on commit 0842294

Please sign in to comment.