Skip to content

Commit a309168

Browse files
Merge branch 'dev' into update-dashboard-components
2 parents 6f7553a + 11b6b42 commit a309168

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

apps/e2e/tests/backend/endpoints/api/v1/unsubscribe-link.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ it("unsubscribe link should not be sent for emails with transactional notificati
130130
const messages = await backendContext.value.mailbox.waitForMessagesWithSubject("Custom Test Email Subject");
131131
const sentEmail = messages[0];
132132
expect(sentEmail).toBeDefined();
133-
expect(sentEmail!.body?.html).toMatchInlineSnapshot(`"<!DOCTYPE html PUBLIC \\"-//W3C//DTD XHTML 1.0 Transitional//EN\\" \\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\"><html dir=\\"ltr\\" lang=\\"en\\"><head><meta content=\\"text/html; charset=UTF-8\\" http-equiv=\\"Content-Type\\"/><meta name=\\"x-apple-disable-message-reformatting\\"/></head><body style=\\"background-color:rgb(250,251,251)\\"><!--$--><table border=\\"0\\" width=\\"100%\\" cellPadding=\\"0\\" cellSpacing=\\"0\\" role=\\"presentation\\" align=\\"center\\"><tbody><tr><td style=\\"background-color:rgb(250,251,251);font-family:ui-sans-serif,system-ui,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&quot;Segoe UI Symbol&quot;,&quot;Noto Color Emoji&quot;;font-size:1rem;line-height:1.5\\"><table align=\\"center\\" width=\\"100%\\" border=\\"0\\" cellPadding=\\"0\\" cellSpacing=\\"0\\" role=\\"presentation\\" style=\\"max-width:37.5em;background-color:rgb(255,255,255);padding:45px;border-radius:0.5rem\\"><tbody><tr style=\\"width:100%\\"><td><div><h1>Test Email</h1><p>This is a test email with HTML content.</p></div></td></tr></tbody></table></td></tr></tbody></table><!--7--><!--/$--></body></html>"`);
133+
expect(sentEmail!.body?.html).toContain("<h1>Test Email</h1><p>This is a test email with HTML content.</p>");
134+
expect(sentEmail!.body?.html).not.toContain("/api/v1/emails/unsubscribe-link");
134135
});
135136

136137
it("unsubscribe link should be included when template exports Marketing notification category (two-pass rendering)", async ({ expect }) => {

claude/CLAUDE-KNOWLEDGE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,5 @@ A: The card playground now includes a `Header Actions` toggle that injects a sam
6767

6868
Q: What is the reliable way to lint a single dashboard file in this monorepo?
6969
A: Run lint from `apps/dashboard` directly (for example `pnpm lint -- "src/app/(main)/(protected)/projects/[projectId]/(overview)/line-chart.tsx"`), because running root `pnpm lint -- <file>` fans out through Turbo packages where that path does not exist.
70+
Q: How should unsubscribe-link e2e tests avoid breakage from email theme/layout changes?
71+
A: In `apps/e2e/tests/backend/endpoints/api/v1/unsubscribe-link.test.ts`, avoid snapshotting the entire rendered HTML for transactional emails; assert stable behavior instead (email content present and `/api/v1/emails/unsubscribe-link` absent) so cosmetic wrapper/style changes do not fail the test.

0 commit comments

Comments
 (0)