-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ cypress routeParams/suspense tests
- Loading branch information
1 parent
be06087
commit 8296517
Showing
5 changed files
with
31 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/// <reference types="cypress" /> | ||
|
||
describe("route-params", () => { | ||
beforeEach(() => { | ||
const port = Cypress.env("port") | ||
cy.visit(`http://localhost:${port}/nested-routing/test123`) | ||
}) | ||
|
||
it("should display the route parameter value, 'test123'", () => { | ||
cy.get("main h1").should("have.text", "test123") | ||
}) | ||
}) |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/// <reference types="cypress" /> | ||
|
||
describe("suspense", () => { | ||
beforeEach(() => { | ||
const port = Cypress.env("port") | ||
cy.visit(`http://localhost:${port}/suspense`) | ||
}) | ||
|
||
it("when the component renders, it should initially display a loading indicator", () => { | ||
cy.get("main p").should("exist").should("have.text", "loading...") | ||
}) | ||
it("when the component has loaded, it should display a list", () => { | ||
cy.get("main ul").should("exist") | ||
}) | ||
}) |
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