-
-
Notifications
You must be signed in to change notification settings - Fork 417
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "feat: changes made to authentication (#1047)"
This reverts commit f362d61.
- Loading branch information
1 parent
f362d61
commit ce5aa1d
Showing
26 changed files
with
1,135 additions
and
912 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,42 @@ | ||
/// <reference types="cypress" /> | ||
|
||
// change cypress viewport size to 1 | ||
// https://on.cypress.io/viewport | ||
Cypress.config("viewportWidth", 1280); | ||
Cypress.config("viewportHeight", 720); | ||
|
||
// set a new env for cypress | ||
// https://on.cypress.io/environment-variables | ||
Cypress.env("CI", false); | ||
|
||
describe("Checking if the backend is working properly or not", () => { | ||
it("GET request for users", () => { | ||
cy.request("https://api.milanhub.org/display/users").then((response) => { | ||
expect(response.status).to.eq(200); | ||
}); | ||
}); | ||
}); | ||
|
||
describe("Auth checks", () => { | ||
it("Checking Login", () => { | ||
cy.visit("/auth/login"); | ||
cy.get('[ data-cy="email"]').type("gyansujan69@gmail.com", { | ||
describe("All auth checks", () => { | ||
it("Checking Club logins", () => { | ||
cy.visit("/clubs/login"); | ||
cy.get('[ data-cy="desktop-club-email"]').type("rotary@gmail.com", { | ||
force: true, | ||
}); | ||
cy.get('[ data-cy="password"]').type("tamaldas69", { | ||
cy.get('[ data-cy="desktop-club-password"]').type("rotary", { | ||
force: true, | ||
}); | ||
cy.get('[data-cy="loginbutton"]').scrollIntoView(); | ||
cy.get('[data-cy="loginbutton"]').click({ force: true }); | ||
cy.getCookie("isLoggedIn"); | ||
cy.visit("/"); | ||
cy.get(".login-btn").scrollIntoView(); | ||
cy.get(".login-btn").click({ force: true }); | ||
cy.getCookie("clubToken"); | ||
}); | ||
}); | ||
|
||
describe("Navigation to other pages", () => { | ||
it("Checking Navigation to Home", () => { | ||
cy.visit("/"); | ||
cy.get("nav").contains("Home").click(); | ||
cy.url().should("include", "/"); | ||
}); | ||
|
||
it("Checking Navigation to Clubs", () => { | ||
cy.visit("/"); | ||
cy.get("nav").contains("Clubs").click(); | ||
cy.url().should("include", "/clubs"); | ||
}); | ||
|
||
it("Checking Navigation to Events", () => { | ||
cy.visit("/"); | ||
cy.get("nav").contains("Events").click(); | ||
cy.url().should("include", "/events"); | ||
it("Checking User logins", () => { | ||
cy.visit("/user/login"); | ||
cy.get("#desktopUserEmail").type("gyansujan69@gmail.com", { force: true }); | ||
cy.get("#desktopUserPassword").type("tamaldas69", { force: true }); | ||
cy.get(".login-btn").scrollIntoView(); | ||
cy.get(".login-btn").click({ force: true }); | ||
cy.getCookie("token "); | ||
}); | ||
}); | ||
|
||
it("Checking Navigation to Shop", () => { | ||
cy.visit("/"); | ||
cy.get("nav").contains("Shop").click(); | ||
cy.url().should("include", "/shop"); | ||
describe("Checking if the backend is working properly or not", () => { | ||
it("Check if the backend is working", () => { | ||
cy.request("https://api.milanhub.org/display/users").then((response) => { | ||
expect(response.status).to.eq(200); | ||
}); | ||
}); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.