From 8d8921a0dd0e56c01260351287b5e346f32fc442 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Wed, 31 May 2023 21:44:27 +1000 Subject: [PATCH] Clean up users before each test, as we don't know which order they run --- test/cypress/e2e/api/Certificates.cy.js | 1 + test/cypress/e2e/api/FullCertProvision.cy.js | 1 + test/cypress/e2e/api/Settings.cy.js | 1 + test/cypress/e2e/api/Upstreams.cy.js | 1 + test/cypress/e2e/api/Users.cy.js | 1 + 5 files changed, 5 insertions(+) diff --git a/test/cypress/e2e/api/Certificates.cy.js b/test/cypress/e2e/api/Certificates.cy.js index 0f5b5dfd..4dfba362 100644 --- a/test/cypress/e2e/api/Certificates.cy.js +++ b/test/cypress/e2e/api/Certificates.cy.js @@ -5,6 +5,7 @@ describe('Certificates endpoints', () => { let certID; before(() => { + cy.resetUsers(); cy.getToken().then((tok) => { token = tok; }); diff --git a/test/cypress/e2e/api/FullCertProvision.cy.js b/test/cypress/e2e/api/FullCertProvision.cy.js index b1e0ad56..fcbb998a 100644 --- a/test/cypress/e2e/api/FullCertProvision.cy.js +++ b/test/cypress/e2e/api/FullCertProvision.cy.js @@ -6,6 +6,7 @@ describe('Full Certificate Provisions', () => { let dnsID; before(() => { + cy.resetUsers(); cy.getToken().then((tok) => { token = tok; diff --git a/test/cypress/e2e/api/Settings.cy.js b/test/cypress/e2e/api/Settings.cy.js index 62edcbd1..07a5f3ae 100644 --- a/test/cypress/e2e/api/Settings.cy.js +++ b/test/cypress/e2e/api/Settings.cy.js @@ -7,6 +7,7 @@ describe('Settings endpoints', () => { let settingName; before(() => { + cy.resetUsers(); cy.getToken().then((tok) => { token = tok; }); diff --git a/test/cypress/e2e/api/Upstreams.cy.js b/test/cypress/e2e/api/Upstreams.cy.js index 236d76e4..7bad4f55 100644 --- a/test/cypress/e2e/api/Upstreams.cy.js +++ b/test/cypress/e2e/api/Upstreams.cy.js @@ -5,6 +5,7 @@ describe('Upstream endpoints', () => { let upstreamId; before(() => { + cy.resetUsers(); cy.getToken().then((tok) => { token = tok; }); diff --git a/test/cypress/e2e/api/Users.cy.js b/test/cypress/e2e/api/Users.cy.js index b28ebe48..cb326765 100644 --- a/test/cypress/e2e/api/Users.cy.js +++ b/test/cypress/e2e/api/Users.cy.js @@ -6,6 +6,7 @@ describe('Users endpoints', () => { let myUserID = 0; before(() => { + cy.resetUsers(); cy.getToken().then((tok) => { token = tok; });