-
Notifications
You must be signed in to change notification settings - Fork 0
/
spec.cy.js
27 lines (27 loc) · 859 Bytes
/
spec.cy.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
describe("Test Hashrouter", () => {
beforeEach(() => {
// https://github.com/bahmutov/cy-api/issues/210#issuecomment-1597288221
// see cypress\support\e2e.ts:20 first
// cy.api({ method: "GET", url: "/", failOnStatusCode: false });
});
it("OK on #/about", () => {
cy.visit("#/about");
cy.get("main h1").should("contain.text", "About");
});
it("Page is blank on #/about", () => {
cy.visit("#/about");
cy.get(".about > h1").should("contain.text", "About");
});
it("OK on /", () => {
cy.visit("");
cy.get("main h1").should("contain.text", "You're home!");
});
it("Page is blank on #/about", () => {
cy.visit("#/about");
cy.get(".about > h1").should("contain.text", "About");
});
it("Working on /", () => {
cy.visit("");
cy.get("main h1").should("contain.text", "You're home!");
});
});