From 25efd7641e39769f37ce6fb1b6518af13ea5a0d0 Mon Sep 17 00:00:00 2001 From: Ashish Gupta Date: Wed, 19 Jun 2024 19:45:56 +0530 Subject: [PATCH] fix cypress for dataModelVersionPage (#16715) --- .../src/main/resources/ui/cypress/common/Utils/Owner.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openmetadata-ui/src/main/resources/ui/cypress/common/Utils/Owner.ts b/openmetadata-ui/src/main/resources/ui/cypress/common/Utils/Owner.ts index 4969d3022b5..81d09ba91fa 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/common/Utils/Owner.ts +++ b/openmetadata-ui/src/main/resources/ui/cypress/common/Utils/Owner.ts @@ -69,12 +69,20 @@ export const addOwner = ( dataTestId?: string, verifyPatchResponse = true ) => { + interceptURL( + 'GET', + '/api/v1/search/query?q=*&index=team_search_index*', + 'getTeams' + ); interceptURL('GET', '/api/v1/users?*isBot=false*', 'getUsers'); cy.get('[data-testid="edit-owner"]') .scrollIntoView() .click({ waitForAnimations: false }); cy.get("[data-testid='select-owner-tabs']").should('be.visible'); + + verifyResponseStatusCode('@getTeams', 200); // wait for teams to load before switching the tab + cy.get('.ant-tabs [id*=tab-users]') .scrollIntoView() .click({ waitForAnimations: false });