From a5b0a834bc01147a5cd4ed3c04e799c833ef6a62 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 30 Jan 2022 22:51:29 +0100 Subject: [PATCH] fix(tests): make sure the namespace exists before trying to run the history tests If there's no namespace, there is no lists in state to show in the view. The CI runs all tests from a blank state which isn't the case when running the tests locally. Therefore, if the test doesn't create a new namespace, there won't be any to test for. --- cypress/integration/list/list-history.spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cypress/integration/list/list-history.spec.js b/cypress/integration/list/list-history.spec.js index f6ff5b034..b7633cbda 100644 --- a/cypress/integration/list/list-history.spec.js +++ b/cypress/integration/list/list-history.spec.js @@ -1,11 +1,11 @@ import {ListFactory} from '../../factories/list' import '../../support/authenticateUser' +import {prepareLists} from './prepareLists' -// Skipped, because there is some kind of race condition which makes this test fail, but only in CI. -// We have tried to debug and fix it but with no luck. Since we have a unit test for this functionality -// anyway, it should be fine to mark this as skipped for now and fix it at some later point. -describe.skip('List History', () => { +describe('List History', () => { + prepareLists() + 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')