This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into DEVPROD-3283
- Loading branch information
Showing
40 changed files
with
489 additions
and
152 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,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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Navigate } from "react-router-dom"; | ||
import { | ||
getDistroSettingsRoute, | ||
DistroSettingsTabRoutes, | ||
} from "constants/routes"; | ||
import { useFirstDistro } from "hooks"; | ||
|
||
export const DistroSettingsRedirect: React.FC = () => { | ||
const { distro, loading } = useFirstDistro(); | ||
|
||
if (loading) { | ||
return null; | ||
} | ||
return ( | ||
<Navigate | ||
to={getDistroSettingsRoute(distro, DistroSettingsTabRoutes.General)} | ||
/> | ||
); | ||
}; |
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
Oops, something went wrong.