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'); ).should('be.visible');
cy.get( cy.get(
`[data-testid="team-user-select-dropdown-${destinationNumber}"] [data-testid="search-input"]` `[data-testid="team-user-select-dropdown-${destinationNumber}"] [data-testid="search-input"]`
) ).type(searchText);
.click()
.type(searchText);
// Added wait for debounce functionality // Added wait for debounce functionality
cy.wait(600); cy.wait(600);
verifyResponseStatusCode('@getSearchResult', 200); verifyResponseStatusCode('@getSearchResult', 200);

View File

@ -237,9 +237,9 @@ export const searchForField = (
.type(searchCriteria); .type(searchCriteria);
// checking filter is working // checking filter is working
cy.get( cy.get(`.ant-select-dropdown [title="${searchCriteria}"]`).should(
`.ant-select-item-option-active[title="${searchCriteria}"]` 'be.visible'
).should('be.visible'); );
// select value from dropdown // select value from dropdown
if (!isLocalSearch) { 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"]').should('be.visible');
cy.get( cy.get('[data-testid="select-owner-tabs"] [data-testid="remove-owner"]')
'[data-testid="select-owner-tabs"] [data-testid="remove-owner"]' .scrollIntoView()
).click(); .click();
verifyResponseStatusCode('@patchOwner', 200); verifyResponseStatusCode('@patchOwner', 200);
cy.get(`[data-testid=${dataTestId ?? 'owner-link'}]`).should( cy.get(`[data-testid=${dataTestId ?? 'owner-link'}]`).should(