fix: preserve journey geometry and mailto placement
This commit is contained in:
@@ -242,12 +242,13 @@ const assertSemanticHtml = (html, inputs, contract) => {
|
||||
for (const copy of requiredVisibleCopy) {
|
||||
if (!semanticText.includes(copy)) throw new Error(`Missing visible semantic evidence: ${copy}`);
|
||||
}
|
||||
const mailLinks = [...appRoot.querySelectorAll('a[href^="mailto:"]')]
|
||||
.filter((node) => isVisibleSemanticNode(node, appRoot));
|
||||
if (mailLinks.length !== 2 || mailLinks.some((link) =>
|
||||
const mailLinks = [...document.querySelectorAll('a[href^="mailto:"]')];
|
||||
const startMailLinks = [...document.querySelectorAll('#start a[href^="mailto:"]')];
|
||||
const contactMailLinks = [...document.querySelectorAll('#contact a[href^="mailto:"]')];
|
||||
if (mailLinks.length !== 2 || startMailLinks.length !== 1 || contactMailLinks.length !== 1 || mailLinks.some((link) =>
|
||||
link.getAttribute('href') !== `mailto:${inputs.content.contact.email}` || link.textContent !== 'Email Luca'
|
||||
)) {
|
||||
throw new Error('Visible semantic mailto links must be exactly the hero and contact Email Luca actions.');
|
||||
throw new Error('Mailto links must be exactly one Email Luca action beneath each hero and contact section.');
|
||||
}
|
||||
|
||||
const moduleScript = document.querySelector(`script[type="module"][src="/${contract.entryModule}"]`);
|
||||
|
||||
Reference in New Issue
Block a user