Keep the photo a community already uploaded when they pick a template from the wizard.
This commit is contained in:
1 parent
6bf890fa78
commit
5dc936834c
6 files changed
+58
-17
No files matched your search
@@ -248,6 +248,28 @@ describe("buildAppliedTemplateCreateFlowState", () => {
|
||||
mode: "useWithoutChanges",
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps an in-flow photo when identity includes it", () => {
|
||||
const seeded = buildAppliedTemplateCreateFlowState({
|
||||
slug: "mutual-aid-mondays",
|
||||
body: {
|
||||
sections: [
|
||||
{
|
||||
categoryName: "Communication",
|
||||
entries: [{ title: "Signal" }],
|
||||
},
|
||||
],
|
||||
},
|
||||
mode: "useWithoutChanges",
|
||||
identity: {
|
||||
title: "Neighborhood",
|
||||
communityAvatarUrl: " /api/uploads/logo ",
|
||||
},
|
||||
});
|
||||
expect(seeded.title).toBe("Neighborhood");
|
||||
expect(seeded.communityAvatarUrl).toBe("/api/uploads/logo");
|
||||
expect(seeded.templateReviewEntryFromCreateFlow).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe("templatePresetDetailsFromPrefill", () => {
|
||||
|
||||
Reference in new issue
Block a user