mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-06-01 00:13:20 -05:00
38 lines
934 B
TypeScript
38 lines
934 B
TypeScript
describe("Desktop navigation", () => {
|
|
beforeEach(() => {
|
|
cy.visit("/");
|
|
});
|
|
|
|
it("Links lead to new pages", () => {
|
|
cy.getCy("nav-link-links").click();
|
|
cy.contains("links page");
|
|
});
|
|
|
|
it("Directs log in to backend", () => {
|
|
cy.getCy("log-in-button").should("not.be.disabled");
|
|
cy.getCy("log-in-form")
|
|
.should("have.attr", "action")
|
|
.and("include", "/auth/discord");
|
|
});
|
|
});
|
|
|
|
describe("Mobile navigation", () => {
|
|
beforeEach(() => {
|
|
cy.visit("/");
|
|
cy.viewport(320, 568);
|
|
});
|
|
|
|
it("Opens mobile nav and links lead to a new page", () => {
|
|
cy.getCy("hamburger-button").click();
|
|
cy.getCy("mobile-nav-link-links").click();
|
|
cy.contains("links page");
|
|
});
|
|
|
|
it("Directs log in to backend", () => {
|
|
cy.getCy("log-in-button").should("not.be.disabled");
|
|
cy.getCy("log-in-form")
|
|
.should("have.attr", "action")
|
|
.and("include", "/auth/discord");
|
|
});
|
|
});
|