diff --git a/cypress/integration/list/list-history.spec.js b/cypress/integration/list/list-history.spec.js index 39166842..975de17d 100644 --- a/cypress/integration/list/list-history.spec.js +++ b/cypress/integration/list/list-history.spec.js @@ -4,6 +4,8 @@ import '../../support/authenticateUser' describe('List History', () => { it('should show a list history on the home page', () => { + cy.intercept(Cypress.env('API_URL') + '/namespaces*').as('loadNamespaces') + const lists = ListFactory.create(6) cy.visit('/') @@ -12,13 +14,21 @@ describe('List History', () => { .should('not.exist') cy.visit(`/lists/${lists[0].id}`) + cy.wait('@loadNamespaces') cy.visit(`/lists/${lists[1].id}`) + cy.wait('@loadNamespaces') cy.visit(`/lists/${lists[2].id}`) + cy.wait('@loadNamespaces') cy.visit(`/lists/${lists[3].id}`) + cy.wait('@loadNamespaces') cy.visit(`/lists/${lists[4].id}`) + cy.wait('@loadNamespaces') cy.visit(`/lists/${lists[5].id}`) + cy.wait('@loadNamespaces') cy.visit('/') + cy.wait('@loadNamespaces') + cy.get('h3') .contains('Last viewed') .should('exist')