Skip to content

Commit

Permalink
wait for page load complete
Browse files Browse the repository at this point in the history
Signed-off-by: Hailong Cui <[email protected]>
  • Loading branch information
Hailong-am committed Nov 15, 2024
1 parent 0ad1a0c commit dd891f1
Showing 1 changed file with 19 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,16 @@ if (Cypress.env('WORKSPACE_ENABLED')) {
miscUtils.visitPage(`w/${workspaceId}/app/workspace_detail`);
// wait for page load
cy.contains('h1', 'Workspace details');
cy.getElementByTestId('recentItemsSectionButton')
.should('exist')
.click({ force: true });
// waiting for page load completely
cy.getElementByTestId('recentItemsSectionButton').should(
'not.have.class',
'headerRecentItemsButton--loadingIndicator',
{
timeout: 10000,
}
);

cy.getElementByTestId('recentItemsSectionButton').click({ force: true });

cy.get('.euiPopover__panel').within(() => {
cy.getElementByTestId('breadcrumbs').within(() => {
Expand Down Expand Up @@ -121,9 +128,15 @@ if (Cypress.env('WORKSPACE_ENABLED')) {
});

// check breadcrumbs in recent popover
cy.getElementByTestId('recentItemsSectionButton')
.should('exist')
.click({ force: true });
cy.getElementByTestId('recentItemsSectionButton').should(
'not.have.class',
'headerRecentItemsButton--loadingIndicator',
{
timeout: 10000,
}
);

cy.getElementByTestId('recentItemsSectionButton').click({ force: true });

cy.get('.euiPopover__panel').within(() => {
cy.getElementByTestId('breadcrumbs').within(() => {
Expand Down

0 comments on commit dd891f1

Please sign in to comment.