improve SingleFiledSearch, GlossaryVersion and NotificationAlert cypress tests to avoid flakiness (#15603)

This commit is contained in:
Aniket Katkar 2024-03-21 11:13:08 +05:30 committed by GitHub
parent a6deffdd7c
commit e6cdd6e9a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 9 deletions

View File

@ -227,9 +227,7 @@ export const addInternalDestination = (
).should('be.visible');
cy.get(
`[data-testid="team-user-select-dropdown-${destinationNumber}"] [data-testid="search-input"]`
)
.click()
.type(searchText);
).type(searchText);
// Added wait for debounce functionality
cy.wait(600);
verifyResponseStatusCode('@getSearchResult', 200);

View File

@ -237,9 +237,9 @@ export const searchForField = (
.type(searchCriteria);
// checking filter is working
cy.get(
`.ant-select-item-option-active[title="${searchCriteria}"]`
).should('be.visible');
cy.get(`.ant-select-dropdown [title="${searchCriteria}"]`).should(
'be.visible'
);
// select value from dropdown
if (!isLocalSearch) {

View File

@ -131,9 +131,9 @@ export const removeOwner = (ownerName: string, dataTestId?: string) => {
cy.get('[data-testid="select-owner-tabs"]').should('be.visible');
cy.get(
'[data-testid="select-owner-tabs"] [data-testid="remove-owner"]'
).click();
cy.get('[data-testid="select-owner-tabs"] [data-testid="remove-owner"]')
.scrollIntoView()
.click();
verifyResponseStatusCode('@patchOwner', 200);
cy.get(`[data-testid=${dataTestId ?? 'owner-link'}]`).should(