From 6ab7aac5ce832788f02d8ecac58814e0f31d55b4 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 30 Jan 2022 14:10:46 +0100 Subject: [PATCH] fix(tests): wait until lists are loaded --- cypress/integration/list/list-history.spec.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cypress/integration/list/list-history.spec.js b/cypress/integration/list/list-history.spec.js index 27a2a8c1..3a488e64 100644 --- a/cypress/integration/list/list-history.spec.js +++ b/cypress/integration/list/list-history.spec.js @@ -5,6 +5,7 @@ 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') + cy.intercept(Cypress.env('API_URL') + '/lists/*').as('loadList') const lists = ListFactory.create(6) @@ -15,16 +16,22 @@ describe('List History', () => { cy.visit(`/lists/${lists[0].id}`) cy.wait('@loadNamespaces') + cy.wait('@loadList') cy.visit(`/lists/${lists[1].id}`) cy.wait('@loadNamespaces') + cy.wait('@loadList') cy.visit(`/lists/${lists[2].id}`) cy.wait('@loadNamespaces') + cy.wait('@loadList') cy.visit(`/lists/${lists[3].id}`) cy.wait('@loadNamespaces') + cy.wait('@loadList') cy.visit(`/lists/${lists[4].id}`) cy.wait('@loadNamespaces') + cy.wait('@loadList') cy.visit(`/lists/${lists[5].id}`) cy.wait('@loadNamespaces') + cy.wait('@loadList') cy.visit('/') cy.wait('@loadNamespaces')