Skip to content

Commit d03c273

Browse files
committed
fix: use cy.intercept to wait for user search
Signed-off-by: Cleopatra Enjeck M. <patrathewhiz@gmail.com>
1 parent b968098 commit d03c273

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cypress/e2e/tables-share.cy.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ describe('Share a table', () => {
2929
cy.loadTable(tableTitle)
3030
cy.get('[data-cy="customTableAction"] button').click()
3131
cy.get('[data-cy="dataTableShareBtn"]').click()
32+
33+
cy.intercept({ method: 'GET', url: `**/autocomplete/get?search=${localUser2.userId}&**` }).as('userSearch')
3234
cy.get('[data-cy="shareFormSelect"] input').type(localUser2.userId)
33-
cy.wait(1000)
35+
cy.wait('@userSearch')
3436
cy.get(`.vs__dropdown-menu [user="${localUser2.userId}"]`).click()
3537
cy.wait(1000)
3638
cy.get('[data-cy="sharedWithList"]').contains(localUser2.userId).should('exist')

0 commit comments

Comments
 (0)