diff --git a/src/lib/constants.js b/src/lib/constants.js index f753ea2..3e6eeae 100644 --- a/src/lib/constants.js +++ b/src/lib/constants.js @@ -24,12 +24,21 @@ const YOUTUBE_CLIENT_VERSION = '2.20260415.01.00'; // ==================== CERTIFICATION EXAM (full disable) ==================== // Proctored certification exams — extension must NOT run at all. // The extension could be flagged as a cheating tool during proctored exams. +// +// Live URL verified 2026-05-11: +// https://anthropic.skilljar.com/claude-certified-architect-foundations-access-request +// Patterns also cover the public CCAF / CCA abbreviations seen in +// third-party prep guides, and Skilljar's `*-foundations-access-request` +// shape (used for any future cert tier — Professional, Expert, etc.). const CERT_DISABLE_PATTERNS = [ /\/claude-certified/i, /\/certified-architect/i, /\/certification-exam/i, /\/certified.*access-request/i, + /foundations-access-request/i, + /[/-]cca-?(?:foundations|professional|expert|associate)\b/i, + /\/ccaf\b/i, /[?&]type=certification/i, /\/proctored\b/i, ]; diff --git a/tests/content-helpers.test.js b/tests/content-helpers.test.js index 11e1093..0622510 100644 --- a/tests/content-helpers.test.js +++ b/tests/content-helpers.test.js @@ -82,6 +82,26 @@ describe('exam / cert URL patterns (production)', () => { expect(CERT_DISABLE_PATTERNS.some((p) => p.test('/proctored'))).toBe(true); }); + test('cert patterns match the live CCA-Foundations access-request URL', () => { + // Verified live 2026-05-11 — this is the actual cert entry point. + expect(CERT_DISABLE_PATTERNS.some((p) => p.test('/claude-certified-architect-foundations-access-request'))).toBe( + true, + ); + expect(CERT_DISABLE_PATTERNS.some((p) => p.test('/claude-certified-architect-foundations'))).toBe(true); + }); + + test('cert patterns match future cert-tier variants', () => { + // Forward-compat: Anthropic's cert ladder is likely Foundations → + // Associate → Professional → Expert. Catch the abbreviation set + // already used in third-party prep guides plus the Skilljar + // access-request URL shape. + expect(CERT_DISABLE_PATTERNS.some((p) => p.test('/cca-foundations'))).toBe(true); + expect(CERT_DISABLE_PATTERNS.some((p) => p.test('/cca-professional'))).toBe(true); + expect(CERT_DISABLE_PATTERNS.some((p) => p.test('/cca-expert'))).toBe(true); + expect(CERT_DISABLE_PATTERNS.some((p) => p.test('/ccaf'))).toBe(true); + expect(CERT_DISABLE_PATTERNS.some((p) => p.test('/anthropic-architect-foundations-access-request'))).toBe(true); + }); + test('cert patterns do not match normal course URLs', () => { expect(CERT_DISABLE_PATTERNS.some((p) => p.test('/courses/prompt-engineering'))).toBe(false); expect(CERT_DISABLE_PATTERNS.some((p) => p.test('/courses/claude-overview'))).toBe(false);