diff --git a/src/components/GroupsTable/GroupsTable.cy.js b/src/components/GroupsTable/GroupsTable.cy.js index 1c2dc1278..9d415b24c 100644 --- a/src/components/GroupsTable/GroupsTable.cy.js +++ b/src/components/GroupsTable/GroupsTable.cy.js @@ -181,6 +181,8 @@ describe('filtering', () => { beforeEach(() => { interceptors['successful with some items'](); mountTable(); + + cy.wait('@getGroups'); // first initial request }); const applyNameFilter = () => @@ -190,17 +192,15 @@ describe('filtering', () => { it('renders filter chip', () => { applyNameFilter(); hasChip('Name', 'lorem'); + cy.wait('@getGroups'); }); it('sends correct request', () => { - applyNameFilter().then(() => { - cy.wait('@getGroups') - .its('request.url') - .should('include', 'hostname_or_id=lorem'); - }); + applyNameFilter(); + cy.wait('@getGroups').its('request.url').should('include', 'hostname_or_id=lorem'); }); - it.only('can remove the chip or reset filters', () => { + it('can remove the chip or reset filters', () => { applyNameFilter(); cy.wait('@getGroups').its('request.url').should('contain', 'hostname_or_id=lorem'); cy.get(CHIP_GROUP)