diff --git a/tests/runner-e2e/chat-catalog-domains/integrator-skills.test.ts b/tests/runner-e2e/chat-catalog-domains/integrator-skills.test.ts index 4b1db4f9d39..eefe9168ec8 100644 --- a/tests/runner-e2e/chat-catalog-domains/integrator-skills.test.ts +++ b/tests/runner-e2e/chat-catalog-domains/integrator-skills.test.ts @@ -84,7 +84,7 @@ it("rejects negated use of the required viewport instead of treating nonoverflow expect(preservesWebsiteChecklist(markdown)).toBe(false); }); -it.each(["Never test", "Avoid testing", "Don't bother testing"])("rejects unconditional mobile-check omission: %s", instruction => { +it.each(["Never test", "Avoid testing", "Don't bother testing", "No need to test"])("rejects unconditional mobile-check omission: %s", instruction => { const markdown = websiteChecklist.join("\n").replace(websiteChecklist[3]!, `${instruction} a viewport 375px wide; there must be no horizontal overflow.`); expect(preservesWebsiteChecklist(markdown)).toBe(false); }); @@ -92,3 +92,7 @@ it("keeps the required viewport review when a separate restriction forbids testi const markdown = `${websiteChecklist.join("\n")}; do not perform the check on a cached build.`; expect(preservesWebsiteChecklist(markdown)).toBe(true); }); + +it("rejects a universal execution restriction despite a separately stated viewport check", () => { + expect(preservesWebsiteChecklist(`${websiteChecklist.join("\n")}; do not perform the check using any browser.`)).toBe(false); +}); diff --git a/tests/runner-e2e/chat-catalog-domains/integrator-skills.ts b/tests/runner-e2e/chat-catalog-domains/integrator-skills.ts index dd114c7764b..815aa2b91b7 100644 --- a/tests/runner-e2e/chat-catalog-domains/integrator-skills.ts +++ b/tests/runner-e2e/chat-catalog-domains/integrator-skills.ts @@ -21,14 +21,17 @@ function websiteChecklistChecks(markdown: string): boolean[] { const mobileWaiver = (text: string) => { const clauses = text.split(/[.!?;\n]+/); const affirmative = clauses.some(clause => mobileRequirements.every(pattern => pattern.test(clause)) - && !/\b(?:don't|do not|never|avoid|need not|skip|omit|ignore|optional|not required)\b/i.test(clause)); + && !/\b(?:don't|do not|never|avoid|no need to|need not|skip|omit|ignore|optional|not required)\b/i.test(clause)); return /\b(?:skip|omit|ignore|need not|not required|optional)\b/i.test(text) - || clauses.some(clause => [...clause.matchAll(/\b(?:don't|do not|never|avoid)\s+/gi)].some(negation => { + || clauses.some(clause => [...clause.matchAll(/\b(?:don't|do not|never|avoid|no need to)\s+/gi)].some(negation => { const action = clause.slice(negation.index + negation[0].length).trimStart(); const target = /\b(?:375\s*(?:px|pixels?)?|viewport|check|test|review)\b/i.exec(action); const overflow = /\boverflow(?:ing)?\b/i.exec(action); const restriction = /\b(?:on|with|using|against)\s+(.+)$/i.exec(action)?.[1]; - const qualified = !!restriction && !/\b(?:375\s*(?:px|pixels?)?|viewport|mobile|width)\b/i.test(restriction); + const qualified = !!restriction + && /\b(?:cached|stale|outdated|previous|old|archived)\b/i.test(restriction) + && /\b(?:build|version|snapshot|artifact|bundle)\b/i.test(restriction) + && !/\b(?:any|all|every|current|live|selected|375\s*(?:px|pixels?)?|viewport|mobile|width)\b/i.test(restriction); return !!target && (!overflow || target.index < overflow.index) && !(affirmative && qualified); })); };