Keep a reopened template draft off the setup questions.
This commit is contained in:
1 parent
6498d52541
commit
c7f88e5515
3 files changed
+55
-3
No files matched your search
@@ -10,6 +10,7 @@ import {
|
||||
parseCreateFlowScreenFromPathname,
|
||||
resolveCreateFlowBackTarget,
|
||||
shouldOfferCreateFlowSaveAndExit,
|
||||
templatePathSkippedCommunityRedirect,
|
||||
isDirectTemplateReviewEntry,
|
||||
isCreateFlowTemplatesPickerPath,
|
||||
createFlowStepUsesSelectSplitScroll,
|
||||
@@ -113,6 +114,30 @@ describe("flowSteps", () => {
|
||||
expect(getPreviousStep("final-review", opts)).toBeNull();
|
||||
});
|
||||
|
||||
it("templatePathSkippedCommunityRedirect resumes setup steps and leaves decks", () => {
|
||||
expect(
|
||||
templatePathSkippedCommunityRedirect("setup-questions", "customize"),
|
||||
).toBe("core-values");
|
||||
expect(templatePathSkippedCommunityRedirect("review", "customize")).toBe(
|
||||
"core-values",
|
||||
);
|
||||
expect(
|
||||
templatePathSkippedCommunityRedirect(
|
||||
"community-name",
|
||||
"useWithoutChanges",
|
||||
),
|
||||
).toBe("final-review");
|
||||
expect(
|
||||
templatePathSkippedCommunityRedirect("core-values", "useWithoutChanges"),
|
||||
).toBeNull();
|
||||
expect(
|
||||
templatePathSkippedCommunityRedirect("final-review", "customize"),
|
||||
).toBeNull();
|
||||
expect(
|
||||
templatePathSkippedCommunityRedirect("setup-questions", undefined),
|
||||
).toBeNull();
|
||||
});
|
||||
|
||||
it("templatePathMode composes with skipCommunitySave", () => {
|
||||
const opts = {
|
||||
skipCommunitySave: true,
|
||||
|
||||
Reference in new issue
Block a user