feat: release design system engine, studio and component contracts
This commit is contained in:
1 parent
ff1065fb27
commit
3943b946d6
693 files changed
+175546
-3894
No files matched your search
@@ -7,9 +7,28 @@ test("every designed preset renders natively without remote placeholder assets",
|
||||
for (const preset of emailPresets) {
|
||||
let id = 0;
|
||||
const section = createSectionPreset(preset.id, () => `preset-${++id}`);
|
||||
const document: BlockDocument = {schemaVersion:1,kind:"email",meta:{subject:"Preset QA"},theme:{tokens:{}},root:{id:"root",type:"layout.email-document",version:1,props:{width:"600"},styles:{},slots:{content:[section]}}};
|
||||
const document: BlockDocument = {
|
||||
schemaVersion: 1,
|
||||
kind: "email",
|
||||
meta: { subject: "Preset QA" },
|
||||
theme: { tokens: {} },
|
||||
root: {
|
||||
id: "root",
|
||||
type: "layout.email-document",
|
||||
version: 1,
|
||||
props: { width: "600" },
|
||||
styles: {},
|
||||
slots: { content: [section] },
|
||||
},
|
||||
};
|
||||
const before = JSON.stringify(document);
|
||||
const result = await renderEmailPreview(document, {variables:{recipientName:"Alex",organizationAddress:"Company address",unsubscribeUrl:"https://example.com/unsubscribe"}});
|
||||
const result = await renderEmailPreview(document, {
|
||||
variables: {
|
||||
recipientName: "Alex",
|
||||
organizationAddress: "Company address",
|
||||
unsubscribeUrl: "https://example.com/unsubscribe",
|
||||
},
|
||||
});
|
||||
expect(result.ok).toBe(true);
|
||||
if (result.ok) {
|
||||
expect(result.value.html).not.toContain("placehold.co");
|
||||
|
||||
Reference in new issue
Block a user