Turn a saved draft into the finished Rule, and greet with congratulations.
This commit is contained in:
1 parent
a2815ae05f
commit
851133e56d
11 files changed
+150
-23
No files matched your search
@@ -5,6 +5,7 @@ import {
|
||||
getNextStep,
|
||||
getPreviousStep,
|
||||
isValidStep,
|
||||
resumeCreateFlowStep,
|
||||
getStepIndex,
|
||||
parseReviewReturnSearchParam,
|
||||
parseCreateFlowScreenFromPathname,
|
||||
@@ -46,6 +47,14 @@ describe("flowSteps", () => {
|
||||
expect(getPreviousStep(null)).toBeNull();
|
||||
});
|
||||
|
||||
it("resumeCreateFlowStep opens the screen the draft was left on", () => {
|
||||
expect(resumeCreateFlowStep({ currentStep: "core-values" })).toBe(
|
||||
"core-values",
|
||||
);
|
||||
expect(resumeCreateFlowStep({})).toBe("informational");
|
||||
expect(resumeCreateFlowStep(null)).toBe("informational");
|
||||
});
|
||||
|
||||
it("isValidStep allows branch-only edit-rule URL segment", () => {
|
||||
expect(isValidStep("edit-rule")).toBe(true);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user