Skip to content

Commit

Permalink
wait for dashboard to be searchable
Browse files Browse the repository at this point in the history
Signed-off-by: Hailong Cui <ihailong@amazon.com>
  • Loading branch information
Hailong-am committed Feb 1, 2024
1 parent 10443bd commit 6535e28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions cypress/utils/dashboards/vis-augmenter/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Cypress.Commands.add('getMenuItems', { prevSubject: 'optional' }, (menu) =>
Cypress.Commands.add('visitDashboard', (dashboardName) => {
cy.visit(`${BASE_PATH}/app/dashboards`);
cy.wait(2000);
cy.waitForLoader();
cy.get('.euiFieldSearch').type(dashboardName);
cy.wait(2000);
cy.get('[data-test-subj="itemsInMemTable"]').contains(dashboardName).click({
Expand Down
6 changes: 6 additions & 0 deletions cypress/utils/dashboards/vis-augmenter/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,12 @@ export const bootstrapDashboard = (
cy.getElementByTestId('confirmSaveSavedObjectButton').click({
force: true,
});

// wait for dashbaord to be saved
cy.wait(5000);

// make newly created dashboards searchable
devToolsRequest('.kibana/_refresh', 'POST');
};

export const filterByObjectType = (type) => {
Expand Down

0 comments on commit 6535e28

Please sign in to comment.