Files
HiveGrid-Wireframes/03 Quellen und Referenzen/hivegrid-cloud/packages/mail/src/templates-react/transactional/tenant-notification-branches.coverage.test.tsx
T

18 lines
859 B
TypeScript

import { describe, expect, test } from "vitest";
import { renderReactEmail } from "../render-helpers.js";
import { defaultMailBrand } from "../_layout/theme.js";
import { TenantNotificationEmail } from "./TenantNotification.js";
describe("TenantNotificationEmail default action label", () => {
test("uses the built-in 'Open' label when an actionUrl is present but no label override is given", () => {
const { html } = renderReactEmail(
<TenantNotificationEmail brand={defaultMailBrand} title="New comment" body="Grace mentioned you." actionUrl="https://app.example.com/tickets/42" />
);
expect(html).toContain('href="https://app.example.com/tickets/42"');
expect(html).toContain(">Open <span");
// The support fallback label must not appear when an action URL exists.
expect(html).not.toContain("Contact support");
});
});