Integrate local business workflow and SaaS redesign

This commit is contained in:
2026-06-12 21:08:35 +02:00
parent f00c5a3193
commit 21c7e4c9a4
88 changed files with 2683 additions and 849 deletions

View File

@@ -80,25 +80,34 @@ test("LeadsReviewTable uses compact card summaries with modal review details", a
"Location should use overflow-safe text classes in compact card.",
);
const emailSpanMatch = source.match(
/<span className="([^"]+)">\s*\{lead\.email \|\| "Keine E-Mail"\}\s*<\/span>/,
const emailAnchorMatch = source.match(
/<a className="([^"]+)" href=\{emailHref\}>\s*\{lead\.email\}\s*<\/a>/,
);
assert.ok(
emailSpanMatch !== null &&
emailAnchorMatch !== null &&
/(?:^|\s)(break-all|max-w-full|min-w-0)(?:\s|$)/.test(
emailSpanMatch[1],
emailAnchorMatch[1],
),
"Lead email should use overflow-safe text classes in compact card.",
"Lead email should use an overflow-safe mailto link in compact card.",
);
assert.match(source, /<span className="[^"]*">\s*Keine E-Mail\s*<\/span>/);
const phoneSpanMatch = source.match(
/<span className="([^"]+)">\s*\{lead\.phone\}\s*<\/span>/,
const phoneAnchorMatch = source.match(
/<a className="([^"]+)" href=\{phoneHref\}>\s*\{lead\.phone\}\s*<\/a>/,
);
assert.ok(
phoneSpanMatch !== null &&
/(?:^|\s)(break-all|max-w-full|min-w-0)(?:\s|$)/.test(phoneSpanMatch[1]),
"Lead phone should use overflow-safe text classes in compact card.",
phoneAnchorMatch !== null &&
/(?:^|\s)(break-all|max-w-full|min-w-0)(?:\s|$)/.test(phoneAnchorMatch[1]),
"Lead phone should use an overflow-safe tel link in compact card.",
);
assert.match(source, /toEmailHref/);
assert.match(source, /mailto:\$\{normalizedEmail\}/);
assert.match(source, /toPhoneHref/);
assert.match(source, /tel:\$\{dialablePhone\}/);
assert.match(source, /toWebsiteHref/);
assert.match(source, /href=\{websiteHref\}/);
assert.match(source, /target="_blank"/);
assert.match(source, /rel="noreferrer"/);
assert.match(source, /Kontaktstatus/);
assert.match(source, /Review-E-Mail/);
@@ -122,3 +131,15 @@ test("LeadsReviewTable exposes count filters and live status feedback", async ()
assert.match(source, /role="status"/);
assert.match(source, /role="alert"/);
});
test("LeadsReviewTable exposes explicit manual audit start action", async () => {
const source = await readFile(leadsReviewPath, "utf8");
assert.match(source, /api\.pageSpeed\.requestLeadAudit/);
assert.match(source, /api\.pageSpeed\.getLeadAuditStartStates/);
assert.match(source, /Audit starten/);
assert.match(source, /auditStartDisabledReason/);
assert.match(source, /Website fehlt|Keine Website/);
assert.match(source, /Audit l(?:ä|ae)uft|Audit läuft/);
assert.doesNotMatch(source, /api\.websiteEnrichment\.queueLeadEnrichment/);
});