fix: restore content compatibility checks
This commit is contained in:
@@ -242,10 +242,12 @@ 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:${inputs.content.contact.email}"]`)]
|
||||
const mailLinks = [...appRoot.querySelectorAll('a[href^="mailto:"]')]
|
||||
.filter((node) => isVisibleSemanticNode(node, appRoot));
|
||||
if (mailLinks.length !== 1 || mailLinks[0].textContent !== 'Start a conversation') {
|
||||
throw new Error('Missing visible semantic mailto contact link.');
|
||||
if (mailLinks.length !== 2 || 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.');
|
||||
}
|
||||
|
||||
const moduleScript = document.querySelector(`script[type="module"][src="/${contract.entryModule}"]`);
|
||||
|
||||
Reference in New Issue
Block a user