-
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.
Various improvements regarding cypress tests #132
- Loading branch information
Showing
11 changed files
with
63 additions
and
83 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 |
---|---|---|
@@ -1,25 +1,22 @@ | ||
import { interceptApiCalls } from "../testHelpers"; | ||
import { login } from "../testHelpers"; | ||
import license from "../../fixtures/license.json"; | ||
|
||
describe("Admin about page tests", () => { | ||
beforeEach(() => { | ||
interceptApiCalls(); | ||
cy.visit("/setting/about"); | ||
cy.contains("button", "Login").click(); | ||
}); | ||
|
||
it("shows version information linking the corresponding release on GitHub.", () => { | ||
login("/setting/about"); | ||
|
||
cy.get('[data-cy="version"]') | ||
.should("contain", "0.1.99+cypress") | ||
.should("contain", "0.0.99+dev") | ||
.should( | ||
"have.attr", | ||
"href", | ||
"https://github.com/geoadmin/suite-bdms/releases/tag/v0.1.99", | ||
"https://github.com/geoadmin/suite-bdms/releases/tag/v0.0.99", | ||
); | ||
}); | ||
|
||
it("shows license information (with fixtures)", () => { | ||
cy.intercept("/license.json", license); | ||
login("/setting/about"); | ||
|
||
cy.get('[data-cy^="credits-"]').should("have.length", 2); | ||
cy.get('[data-cy="[email protected]"]').should( | ||
|
@@ -33,6 +30,7 @@ describe("Admin about page tests", () => { | |
}); | ||
|
||
it("shows license information (without fixtures)", () => { | ||
login("/setting/about"); | ||
cy.get('[data-cy^="credits-"]').should("have.length.above", 0); | ||
}); | ||
}); |
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
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
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