Skip to content

Commit

Permalink
fix: removing cy.wait
Browse files Browse the repository at this point in the history
  • Loading branch information
Silver-IT committed Jul 23, 2024
1 parent 7b189d9 commit a1aa3ec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/cypress/integration/group-chat.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ describe('Group Chat Basic Features (Create & Join & Leave & Close)', () => {
}

if (byProposal) {
cy.wait(2000) // eslint-disable-line cypress/no-unnecessary-waiting
// NOTE: when the member is kicked from the from by proposal
// two messages will be created in general chatroom; INTERACTIVE, and NOTIFICATION
// INTERACTIVE message should be created before the NOTIFICATION message
Expand Down Expand Up @@ -416,6 +415,10 @@ describe('Group Chat Basic Features (Create & Join & Leave & Close)', () => {

cy.getByDT('groupMembers').find('ul>li').should('have.length', 2) // user1 & user2

// NOTE: this check is to wait until the 2 INTERACTIVE mesages are all created
// one for creating proposal and another is for proposal approval
cy.getByDT('groupChatLink').get('.c-badge.is-compact[aria-label="2 new notifications"]').contains('2')

cy.giRedirectToGroupChat()

cy.giSwitchChannel(CHATROOM_GENERAL_NAME)
Expand Down

0 comments on commit a1aa3ec

Please sign in to comment.