forked from evergreen-ci/spruce
-
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.
DEVPROD-977 Add stepback bisect to project settings page (evergreen-c…
- Loading branch information
1 parent
cc5b551
commit 6d24d2f
Showing
10 changed files
with
100 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { clickSave } from "../../utils"; | ||
import { getGeneralRoute, project, projectUseRepoEnabled } from "./constants"; | ||
|
||
describe("Stepback bisect setting", () => { | ||
describe("Repo project present", () => { | ||
const destination = getGeneralRoute(projectUseRepoEnabled); | ||
|
||
beforeEach(() => { | ||
cy.visit(destination); | ||
}); | ||
|
||
it("Starts as default to repo", () => { | ||
cy.dataCy("stepback-bisect-group") | ||
.contains("Default to repo") | ||
.find("input") | ||
.should("have.attr", "aria-checked", "true"); | ||
}); | ||
|
||
it("Clicking on enabled and then save shows a success toast", () => { | ||
cy.dataCy("stepback-bisect-group").contains("Enable").click(); | ||
clickSave(); | ||
cy.validateToast("success", "Successfully updated project"); | ||
|
||
cy.reload(); | ||
|
||
cy.dataCy("stepback-bisect-group") | ||
.contains("Enable") | ||
.find("input") | ||
.should("have.attr", "aria-checked", "true"); | ||
}); | ||
}); | ||
|
||
describe("Repo project not present", () => { | ||
const destination = getGeneralRoute(project); | ||
|
||
beforeEach(() => { | ||
cy.visit(destination); | ||
}); | ||
|
||
it("Starts as disabled", () => { | ||
cy.dataCy("stepback-bisect-group") | ||
.contains("Disable") | ||
.find("input") | ||
.should("have.attr", "aria-checked", "true"); | ||
}); | ||
|
||
it("Clicking on enabled and then save shows a success toast", () => { | ||
cy.dataCy("stepback-bisect-group").contains("Enable").click(); | ||
|
||
clickSave(); | ||
cy.validateToast("success", "Successfully updated project"); | ||
|
||
cy.reload(); | ||
|
||
cy.dataCy("stepback-bisect-group") | ||
.contains("Enable") | ||
.find("input") | ||
.should("have.attr", "aria-checked", "true"); | ||
}); | ||
}); | ||
}); |
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