Replace the sample data with synthetic fixtures and regenerate goldens and thumbnails
The template harness, tests and thumbnails now use a neutral vendor, bank account and a generated sample wordmark (scripts/logo/make-sample-logo.mjs). Layout goldens and the 14 picker thumbnails are regenerated. Fixture strings keep their original lengths where layout tests depend on them.
This commit is contained in:
@@ -122,8 +122,8 @@ describe("page geometry", () => {
|
||||
|
||||
describe("helpers", () => {
|
||||
it("initialsOf takes the first and last word", () => {
|
||||
expect(initialsOf("Test Vendor")).toBe("AP");
|
||||
expect(initialsOf("Venkatachalam Longsurname Ramasubramanian Voice Studios Pvt")).toBe("AP");
|
||||
expect(initialsOf("Test Vendor")).toBe("TV");
|
||||
expect(initialsOf("Venkatachalam Longsurname Ramasubramanian Voice Studios Pvt")).toBe("VP");
|
||||
expect(initialsOf("Bongbetic")).toBe("B");
|
||||
expect(initialsOf(" ")).toBe("");
|
||||
expect(initialsOf("& Co")).toBe("C");
|
||||
@@ -151,7 +151,7 @@ describe("what the layout does with a logo", () => {
|
||||
const none = await renderFixture({ ...withLogo, logo: "none" }, prefsFor("A4", { templateId: t.id }));
|
||||
expect(imageCount(none), t.id).toBe(0);
|
||||
const text = none.pdf.pages[0].items.map((i) => i.str).join(" ");
|
||||
if (t.id === "monogram") expect(text).toContain("AP");
|
||||
if (t.id === "monogram") expect(text).toContain("TV");
|
||||
// No Canva ring or stamp is ever drawn.
|
||||
expect(nodes(none.result.core.layout[0].nodes).filter((n) => n.type === "svg" && !n.decor), t.id).toHaveLength(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user