diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index b90a9861..a44b7fc6 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -15,9 +15,7 @@ jobs: runs-on: ubuntu-latest env: NODE_ENV: test - SQLITE: - db.db - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + SQLITE: db.db steps: - uses: actions/checkout@v6 - name: Use Node.js diff --git a/cypress/e2e/invite.cy.js b/cypress/e2e/invite.cy.js index a173ab96..b368ff17 100644 --- a/cypress/e2e/invite.cy.js +++ b/cypress/e2e/invite.cy.js @@ -59,11 +59,11 @@ describe("Invite User into league and change some league Settings and run throug // Signs into User 2 which will join the league through the invite cy.get("#logout").click(); // Checks invalid invite - cy.visit("http://localhost:3000/api/invite/invite2", { + cy.visit("/api/invite/invite2", { failOnStatusCode: false, }); cy.visit( - "http://localhost:3000/signup?callbackUrl=http%3A%2F%2Flocalhost%3A3000%2Fapi%2Finvite%2Finvite2", + "/signup?callbackUrl=http%3A%2F%2Flocalhost%3A3000%2Fapi%2Finvite%2Finvite2", ); // This line is because cypress is weird and removes the callbackUrl from the url cy.get("#username").type("Invite 2"); cy.get("#password").type("password"); @@ -74,7 +74,7 @@ describe("Invite User into league and change some league Settings and run throug (cookie) => (user2 = cookie.value), ); // Joins the league - cy.visit("http://localhost:3000/api/invite/invite1"); + cy.visit("/api/invite/invite1"); cy.contains("Admin Panel").should("not.exist"); // Checks if the annoucement exists cy.contains("Very great description for this announcement"); diff --git a/cypress/e2e/user.cy.js b/cypress/e2e/user.cy.js index 89839e33..89e2870a 100644 --- a/cypress/e2e/user.cy.js +++ b/cypress/e2e/user.cy.js @@ -7,7 +7,7 @@ describe("User", () => { // Used to signup change username and password and login again it("signup", () => { // Signs in - cy.visit("http://localhost:3000"); + cy.visit("/"); cy.get("#login").click(); cy.contains("Click here for creating an account").click(); cy.get("#username").type("Sample User");