Template recommendation implemented

This commit is contained in:
adilallo
2026-04-29 19:24:50 -06:00
parent c4c74ecdb4
commit a4f0c4bf27
20 changed files with 899 additions and 82 deletions
+10
View File
@@ -8,6 +8,10 @@ import {
getStepIndex,
parseReviewReturnSearchParam,
resolveCreateFlowBackTarget,
TEMPLATES_FACET_RECOMMEND_QUERY,
TEMPLATES_FACET_RECOMMEND_VALUE,
TEMPLATE_REVIEW_FROM_CREATE_FLOW_QUERY,
TEMPLATE_REVIEW_FROM_CREATE_FLOW_VALUE,
} from "../../app/(app)/create/utils/flowSteps";
describe("flowSteps", () => {
@@ -106,6 +110,12 @@ describe("flowSteps", () => {
);
});
it("review Create from template uses fromFlow and recommendTemplates together", () => {
expect(
`/templates?${TEMPLATE_REVIEW_FROM_CREATE_FLOW_QUERY}=${TEMPLATE_REVIEW_FROM_CREATE_FLOW_VALUE}&${TEMPLATES_FACET_RECOMMEND_QUERY}=${TEMPLATES_FACET_RECOMMEND_VALUE}`,
).toBe("/templates?fromFlow=1&recommendTemplates=1");
});
it("parseReviewReturnSearchParam accepts only final-review and edit-rule", () => {
expect(
parseReviewReturnSearchParam(