From 9a6ec3e9ef8184832d5f8aa0a58cc35fcdbeae10 Mon Sep 17 00:00:00 2001 From: alan-wu Date: Wed, 8 Nov 2023 15:18:59 +1300 Subject: [PATCH] testIsolation for cypress is now set at describe level. --- .gitignore | 1 + cypress.config.js | 2 +- cypress/e2e/datasets.cy.js | 2 +- cypress/e2e/homepage.cy.js | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index fed1d90d..2277ae7a 100644 --- a/.gitignore +++ b/.gitignore @@ -111,3 +111,4 @@ sw.* .certs/ cypress/videos +cypress/downloads \ No newline at end of file diff --git a/cypress.config.js b/cypress.config.js index 8fab4a47..e8f8d6b5 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -12,7 +12,7 @@ module.exports = defineConfig({ viewportWidth: 1600, viewportHeight: 900, //Prevent huge amount of time on reloading page - testIsolation: false, + testIsolation: true, // pageLoadTimeout: 1024*1024*1024, setupNodeEvents(on, config) { // implement node event listeners here diff --git a/cypress/e2e/datasets.cy.js b/cypress/e2e/datasets.cy.js index 76781808..db8575f8 100644 --- a/cypress/e2e/datasets.cy.js +++ b/cypress/e2e/datasets.cy.js @@ -3,7 +3,7 @@ const datasetIds = [127]; datasetIds.forEach(datasetId => { - describe(`Dataset ${datasetId}`, function () { + describe(`Dataset ${datasetId}`, {testIsolation: false }, function () { before(function () { cy.visit(`/datasets/${datasetId}?type=dataset`) }); diff --git a/cypress/e2e/homepage.cy.js b/cypress/e2e/homepage.cy.js index 4f1416b1..c4c1c4c3 100644 --- a/cypress/e2e/homepage.cy.js +++ b/cypress/e2e/homepage.cy.js @@ -3,7 +3,7 @@ describe('Homepage', () => { cy.visit('') }); it('Banner', () => { - cy.get('h1').should('contain', 'Welcome to the SPARC Portal') + cy.get('h1').should('contain', 'SPARC') }) it('Navigation Bar', () => { cy.get('.mobile-navigation > :nth-child(1) > :nth-child(1) > a').should('contain', 'Data')