Skip to content

Commit

Permalink
[#1392] Cypress testing for filtering is false positive (#1402)
Browse files Browse the repository at this point in the history
Resolves #1392
  • Loading branch information
Kazeem Adetunji authored Mar 30, 2021
1 parent 9e31110 commit 5155f1e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions integration/ui/filter_conversation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ describe('Filters conversation', () => {
})
.submit();

cy.wait(500);

cy.visit('/channels');
cy.wait(500);

Expand All @@ -42,9 +40,15 @@ describe('Filters conversation', () => {

cy.get(`[data-cy=${cyConversationList}]`).children().children().its('length').should('gte', 1);
cy.wait(500);
cy.get(`[data-cy=${cySearchButton}]`).click();
cy.wait(500);
cy.get(`[data-cy=${cySearchField}]`).get('input').type(Cypress.env('searchQuery'));
cy.get(`[data-cy=${cyConversationList}]`).children().children().its('length').should('eq', 1);

cy.get(`[data-cy=${cyConversationList}]`)
.first()
.contains(/^Chatplugin \w*$/)
.invoke('text')
.then(text => {
cy.get(`[data-cy=${cySearchButton}]`).click();
cy.get(`[data-cy=${cySearchField}]`).get('input').type(text.replace('Chatplugin ', ''));
cy.get(`[data-cy=${cyConversationList}]`).children().children().children().its('length').should('eq', 1);
});
});
});

0 comments on commit 5155f1e

Please sign in to comment.