This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linting + pass current tests hopefully
- Loading branch information
Showing
3 changed files
with
31 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
// e2e needs to check that you can actually go from certain page to other pages using navbar/header | ||
// also logout and maybe changing language? (how to test language stuff?) | ||
// component tests that everything is present that has to be present | ||
describe('Header functionality', () => { | ||
it('Header Login', () => { | ||
cy.visit('http://localhost:5173') | ||
cy.contains('Login').should('be.visible').should('have.attr', 'href').and('include', 'login.microsoftonline.com') | ||
// good enough test, will need to test validity of url some other way because can't really login if we can't make our own account for testing | ||
}) | ||
|
||
}) | ||
describe("Header functionality", () => { | ||
it("Header Login", () => { | ||
cy.visit("http://localhost:5173"); | ||
cy.contains("Login") | ||
.should("be.visible") | ||
.should("have.attr", "href") | ||
.and("include", "login.microsoftonline.com"); | ||
// good enough test, will need to test validity of url some other way because can't really login if we can't make our own account for testing | ||
}); | ||
}); |
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,15 +1,20 @@ | ||
describe('Homepage not logged in functionality', () => { | ||
it('Header Visible', () => { | ||
cy.visit('http://localhost:5173') | ||
cy.contains('Peristerónas') | ||
cy.get('header').should('be.visible') | ||
}) | ||
|
||
it('Center button Login', () => { | ||
cy.visit('http://localhost:5173') | ||
cy.contains('Peristerónas') | ||
cy.get('a.MuiButtonBase-root.MuiButton-root.MuiButton-contained.MuiButton-containedPrimary.MuiButton-sizeMedium.MuiButton-containedSizeMedium.MuiButton-colorPrimary.MuiButton-root.MuiButton-contained.MuiButton-containedPrimary.MuiButton-sizeMedium.MuiButton-containedSizeMedium.MuiButton-colorPrimary.css-sghohy-MuiButtonBase-root-MuiButton-root') | ||
.eq(1).contains('Login').should('be.visible').should('have.attr', 'href').and('include', 'login.microsoftonline.com') | ||
}) | ||
}) | ||
describe("Homepage not logged in functionality", () => { | ||
it("Header Visible", () => { | ||
cy.visit("http://localhost:5173"); | ||
cy.contains("Peristerónas"); | ||
cy.get("header").should("be.visible"); | ||
}); | ||
|
||
it("Center button Login", () => { | ||
cy.visit("http://localhost:5173"); | ||
cy.contains("Peristerónas"); | ||
cy.get( | ||
"a.MuiButtonBase-root.MuiButton-root.MuiButton-contained.MuiButton-containedPrimary.MuiButton-sizeMedium.MuiButton-containedSizeMedium.MuiButton-colorPrimary.MuiButton-root.MuiButton-contained.MuiButton-containedPrimary.MuiButton-sizeMedium.MuiButton-containedSizeMedium.MuiButton-colorPrimary.css-sghohy-MuiButtonBase-root-MuiButton-root" | ||
) | ||
.eq(1) | ||
.contains("Login") | ||
.should("be.visible") | ||
.should("have.attr", "href") | ||
.and("include", "login.microsoftonline.com"); | ||
}); | ||
}); |
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