From 1a834d7a4aecc9415e26aa20e259ec22ccb46f91 Mon Sep 17 00:00:00 2001 From: ShootingStar91 Date: Wed, 10 Jul 2024 18:59:27 +0300 Subject: [PATCH] Rename spec and move baseUrl to config --- cypress.config.js | 1 + cypress/e2e/{overview.cy.js => asAdmin.cy.js} | 5 ++--- cypress/e2e/userRights.cy.js | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename cypress/e2e/{overview.cy.js => asAdmin.cy.js} (96%) create mode 100644 cypress/e2e/userRights.cy.js diff --git a/cypress.config.js b/cypress.config.js index b086c7d1..3b395c96 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -5,6 +5,7 @@ module.exports = defineConfig({ setupNodeEvents(on, config) { // implement node event listeners here }, + baseUrl: 'http://localhost:5173/', defaultCommandTimeout: 52000, execTimeout: 90000, pageLoadTimeout: 140000, diff --git a/cypress/e2e/overview.cy.js b/cypress/e2e/asAdmin.cy.js similarity index 96% rename from cypress/e2e/overview.cy.js rename to cypress/e2e/asAdmin.cy.js index d1bef338..7adcb8e9 100644 --- a/cypress/e2e/overview.cy.js +++ b/cypress/e2e/asAdmin.cy.js @@ -1,9 +1,8 @@ -const baseUrl = 'http://localhost:5173/' describe('Open each page, table view and detail view, and check at least some correct text appears', () => { before('Login as admin, directs to front page', () => { cy.session("logged-as-admin", () => {}) - cy.visit(baseUrl) + cy.visit('') cy.contains('construction') cy.contains('Login').click() cy.get('[data-cy="username-basic"]').type("testSu") @@ -12,7 +11,7 @@ describe('Open each page, table view and detail view, and check at least some co cy.contains('construction') }) beforeEach(() => { - cy.visit(baseUrl) + cy.visit('') }) it('Locality works', () => { cy.contains('Locality').click() diff --git a/cypress/e2e/userRights.cy.js b/cypress/e2e/userRights.cy.js new file mode 100644 index 00000000..e69de29b