fix: 修复模板画布点选与保存切页回归
This commit is contained in:
1 parent
e6d843b4a7
commit
cd2992c00a
15 files changed
+98
-40
No files matched your search
@@ -860,6 +860,9 @@ test("real template declarations persist brand offering and trust bindings throu
|
||||
};
|
||||
let checked = 0;
|
||||
for (const slug of ["default-brand", "linjing-doors"]) {
|
||||
const originalPublicWorkspace = JSON.parse(
|
||||
(await request("/public/workspace?brandSlug=" + slug)).body,
|
||||
);
|
||||
const original = await prisma.brandProfile.findUniqueOrThrow({ where: { slug } });
|
||||
const originalOffering = await prisma.offering.findFirstOrThrow({
|
||||
where: { brandId: original.id, isEnabled: true },
|
||||
@@ -1030,6 +1033,15 @@ test("real template declarations persist brand offering and trust bindings throu
|
||||
);
|
||||
checked += 1;
|
||||
}
|
||||
const unpublishedWorkspace = JSON.parse(
|
||||
(await request("/public/workspace?brandSlug=" + slug)).body,
|
||||
);
|
||||
for (const key of ["brand", "templateData", "offerings", "trustItems", "trustPresentation"])
|
||||
assert.deepEqual(
|
||||
unpublishedWorkspace[key],
|
||||
originalPublicWorkspace[key],
|
||||
slug + " unpublished edits must preserve public " + key,
|
||||
);
|
||||
const publish = await request("/admin/releases/publish", {
|
||||
method: "POST",
|
||||
headers,
|
||||
|
||||
Reference in new issue
Block a user