mirror of
https://github.com/corazoncp/corazoncp-landing.git
synced 2026-12-01 04:30:31 +00:00
* test(wpo): add Red contract tests for self-hosted woff2, 404.html, twitter:card, img dims, and view transitions - Assert self-hosted .woff2 fonts in public/fonts/, @font-face in built CSS, and zero Google Fonts links - Assert dist/404.html with shared partials, zero inline scripts, and return CTA to / - Assert twitter:card on all 4 routes, numeric width/height on all <img> tags, @view-transition, and brand hover * perf(wpo): self-host woff2 fonts, add 404.html, explicit img dims, twitter:card, and view transitions - Self-host 5 latin .woff2 font files (176 KB total) in public/fonts/ with @font-face in src/style.css and remove Google Fonts links - Add static 404.html with shared partials and register in vite.config.ts - Add twitter:card metadata across all 4 routes and explicit width/height on logo.png and all 8 index.html images - Add @view-transition (prefers-reduced-motion: no-preference), brand hover state, arrow motion on solid CTAs, and reconcile services-catalog.test.js
513 lines
19 KiB
JavaScript
513 lines
19 KiB
JavaScript
import assert from 'node:assert/strict';
|
|
import fs from 'node:fs';
|
|
import path from 'node:path';
|
|
import test from 'node:test';
|
|
|
|
// Why: built HTML is the deployable artifact and the seam where partials are expanded;
|
|
// design tokens intentionally remain asserted against the source stylesheet.
|
|
const indexPath = path.resolve('dist/index.html');
|
|
const indexHtml = fs.readFileSync(indexPath, 'utf-8');
|
|
|
|
const cssPath = path.resolve('src/style.css');
|
|
const styleCss = fs.readFileSync(cssPath, 'utf-8');
|
|
|
|
/**
|
|
* Locate a service card by its <h3> heading and return its enclosing card <div>.
|
|
* Why: avoids coupling tests to HTML comments that minification may strip.
|
|
*/
|
|
function extractCardByHeading(html, headingText) {
|
|
const headingMatch = new RegExp(`<h3\\b[^>]*>[^<]*${headingText}[^<]*</h3>`, 'i').exec(html);
|
|
if (!headingMatch) {
|
|
return undefined;
|
|
}
|
|
|
|
let cardStart = -1;
|
|
for (const match of html.matchAll(/<div\b[^>]*class="[^"]*\brounded-2xl\b[^"]*"[^>]*>/gi)) {
|
|
if (match.index > headingMatch.index) {
|
|
break;
|
|
}
|
|
cardStart = match.index;
|
|
}
|
|
if (cardStart === -1) {
|
|
return undefined;
|
|
}
|
|
|
|
let depth = 0;
|
|
for (const tagMatch of html.matchAll(/<\/?div\b[^>]*>/gi)) {
|
|
if (tagMatch.index < cardStart) {
|
|
continue;
|
|
}
|
|
depth += tagMatch[0].startsWith('</') ? -1 : 1;
|
|
if (depth === 0) {
|
|
return html.slice(cardStart, tagMatch.index + tagMatch[0].length);
|
|
}
|
|
}
|
|
return undefined;
|
|
}
|
|
|
|
test('Slice 3 Acceptance Criteria: 5-Card Catalog, Brand Tokens & Complementary Paths', async (t) => {
|
|
await t.test(
|
|
'Criterion 1: Brand System Integrity (Self-hosted @font-face rules, Tailwind @theme color tokens)',
|
|
() => {
|
|
// 1. Self-hosted @font-face rules in built CSS and zero Google Fonts links in index.html
|
|
// Why: Issue #12 replaces external Google Fonts <link> requests with self-hosted .woff2
|
|
// @font-face rules for WPO (eliminates render-blocking third-party DNS/TLS/CSS round-trips).
|
|
assert.doesNotMatch(
|
|
indexHtml,
|
|
/fonts\.googleapis\.com/i,
|
|
'dist/index.html must contain zero fonts.googleapis.com links',
|
|
);
|
|
|
|
const assetsDir = path.resolve('dist/assets');
|
|
const cssFiles = fs.readdirSync(assetsDir).filter((file) => file.endsWith('.css'));
|
|
assert.ok(cssFiles.length > 0, 'dist/assets must contain at least one built CSS file');
|
|
const builtCss = cssFiles
|
|
.map((file) => fs.readFileSync(path.join(assetsDir, file), 'utf-8'))
|
|
.join('\n');
|
|
const fontFaceRules = builtCss.match(/@font-face\s*\{[^}]*\}/gi) ?? [];
|
|
|
|
for (const family of ['Playfair Display', 'Cormorant Garamond', 'Raleway']) {
|
|
const hasSelfHostedWoff2 = fontFaceRules.some(
|
|
(rule) =>
|
|
new RegExp(`font-family:\\s*["']?${family}["']?`, 'i').test(rule) &&
|
|
/url\(["']?[^"')]+?\.woff2["']?\)/i.test(rule),
|
|
);
|
|
assert.ok(
|
|
hasSelfHostedWoff2,
|
|
`built CSS must declare a self-hosted @font-face rule for ${family} pointing to a .woff2 file`,
|
|
);
|
|
}
|
|
|
|
// 2. Custom color tokens in src/style.css @theme
|
|
assert.match(
|
|
styleCss,
|
|
/--color-porcelain-mist:\s*#f4f1ea/i,
|
|
'src/style.css must define --color-porcelain-mist: #f4f1ea in @theme',
|
|
);
|
|
assert.match(
|
|
styleCss,
|
|
/--color-gris-oscuro:\s*#303030/i,
|
|
'src/style.css must define --color-gris-oscuro: #303030 in @theme',
|
|
);
|
|
|
|
// 3. Typography mappings in @theme
|
|
assert.match(
|
|
styleCss,
|
|
/Playfair Display/i,
|
|
'src/style.css must reference Playfair Display for headings',
|
|
);
|
|
assert.match(
|
|
styleCss,
|
|
/Cormorant Garamond/i,
|
|
'src/style.css must reference Cormorant Garamond for card headings',
|
|
);
|
|
assert.match(styleCss, /Raleway/i, 'src/style.css must reference Raleway for body/ui');
|
|
},
|
|
);
|
|
|
|
await t.test(
|
|
'Criterion 2: Hero & Header Polish (contrast wash, clean subtitle hook, enlarged quote text-sm/md/lg)',
|
|
() => {
|
|
// 1. Sticky Navigation Bar with WCAG-legible ivory wash
|
|
// Why: Issue #11 replaces the low-contrast green tint wash with bg-ivory/95 for dark link legibility.
|
|
const headerMatch = indexHtml.match(/<header[^>]*class="([^"]*)"/i);
|
|
assert.ok(headerMatch, 'Header must exist with class attribute');
|
|
const headerClasses = headerMatch[1];
|
|
assert.match(headerClasses, /sticky/i, 'Header must be sticky');
|
|
assert.match(
|
|
headerClasses,
|
|
/bg-ivory\/95/i,
|
|
'Header must use WCAG-legible ivory wash (bg-ivory/95)',
|
|
);
|
|
assert.match(headerClasses, /backdrop-blur/i, 'Header must retain backdrop-blur');
|
|
assert.match(headerClasses, /border-b/i, 'Header must have border-b');
|
|
|
|
// 2. Hero Subtitle single clean hook
|
|
const heroSection = indexHtml.match(/<section id="hero"[\s\S]*?<\/section>/)?.[0];
|
|
assert.ok(heroSection, 'Hero section must exist');
|
|
|
|
const expectedHeroHook =
|
|
'Un respiro consciente frente al parloteo mental y la fatiga del sistema nervioso para abrir tu corazón a tu propia medicina interna.';
|
|
assert.ok(
|
|
heroSection.includes(expectedHeroHook),
|
|
'Hero must include approved single clean subtitle hook',
|
|
);
|
|
assert.ok(
|
|
!heroSection.includes('Acompañamiento integral para habitar tu cuerpo sin dolor'),
|
|
'Hero must not contain dense multi-service copy (moved to Section 03)',
|
|
);
|
|
|
|
// 3. Quote Caption scale (desktop enlarged md:text-base/lg:text-lg, mobile text-sm without text-xs)
|
|
const quoteBlock = heroSection.match(/<div[^>]*rounded-2xl[^>]*>[\s\S]*?<\/div>/i)?.[0];
|
|
assert.ok(quoteBlock, 'Quote callout block must exist near portrait in Hero');
|
|
assert.match(
|
|
quoteBlock,
|
|
/text-sm\s+md:text-base\s+lg:text-lg/,
|
|
'Quote caption must scale from text-sm on mobile to md:text-base and lg:text-lg on desktop',
|
|
);
|
|
assert.ok(
|
|
!quoteBlock.includes('text-xs'),
|
|
'Quote caption must not contain text-xs to prevent mobile readability regression',
|
|
);
|
|
},
|
|
);
|
|
|
|
await t.test(
|
|
'Criterion 3: 5-Card Outcome-First Services Grid with balanced 3+2 architecture & reconciled subtitle',
|
|
() => {
|
|
const serviciosSection = indexHtml.match(/<section id="servicios"[\s\S]*?<\/section>/)?.[0];
|
|
assert.ok(serviciosSection, 'Section #servicios must exist');
|
|
|
|
// Subtitle with sanación emocional profunda & zero Respuestas concretas
|
|
const expectedServicesSubtitle =
|
|
'Acompañamiento integral para habitar tu cuerpo sin dolor, disipar el estrés, la ansiedad y el insomnio. Un espacio seguro para transitar procesos de sanación emocional profunda, recuperar tu vitalidad y liderar tu vida desde la soberanía.';
|
|
assert.ok(
|
|
serviciosSection.includes(expectedServicesSubtitle),
|
|
'Section #servicios must contain approved subtitle with "sanación emocional profunda"',
|
|
);
|
|
assert.ok(
|
|
!indexHtml.includes('Respuestas concretas para el estrés crónico'),
|
|
'Document must have zero occurrences of rejected phrase "Respuestas concretas para el estrés crónico"',
|
|
);
|
|
|
|
// 5 approved image assets in order
|
|
const expectedAssets = [
|
|
'oidaterapia.webp',
|
|
'kundalini-yoga.webp',
|
|
'barras-access.webp',
|
|
'procesos-cuerpo.webp',
|
|
'meditaciones.webp',
|
|
];
|
|
|
|
for (const asset of expectedAssets) {
|
|
assert.ok(
|
|
serviciosSection.includes(asset),
|
|
`Section #servicios must include service card image ${asset}`,
|
|
);
|
|
}
|
|
|
|
// 5 approved service card titles in order
|
|
const serviceTitles = [
|
|
/Mentorías y Oidaterapia/i,
|
|
/Kundalini Yoga/i,
|
|
/Barras de Access®/i,
|
|
/Procesos de Cuerpo/i,
|
|
/Meditaciones Personalizadas/i,
|
|
];
|
|
|
|
let lastIndex = 0;
|
|
for (const titleRegex of serviceTitles) {
|
|
const match = serviciosSection.slice(lastIndex).match(titleRegex);
|
|
assert.ok(
|
|
match,
|
|
`Service card title matching ${titleRegex} must appear in order in Section #servicios`,
|
|
);
|
|
lastIndex += match.index + match[0].length;
|
|
}
|
|
|
|
// Check 3+2 grid layout: 6-column grid on md/lg and 2 centered cards on row 2
|
|
assert.match(
|
|
serviciosSection,
|
|
/(grid-cols-1.*md:grid-cols-6|md:grid-cols-6)/,
|
|
'Services grid must use 6-column layout on desktop (md:grid-cols-6)',
|
|
);
|
|
assert.match(
|
|
serviciosSection,
|
|
/md:col-start-2/,
|
|
'Row 2 first card must use md:col-start-2 to center the 2 cards in 6-column grid',
|
|
);
|
|
},
|
|
);
|
|
|
|
await t.test('Criterion 4: Trademark and Authority Link for Barras de Access®', () => {
|
|
const serviciosSection = indexHtml.match(/<section id="servicios"[\s\S]*?<\/section>/)?.[0];
|
|
assert.ok(serviciosSection, 'Section #servicios must exist');
|
|
|
|
// Registered trademark symbol
|
|
assert.match(
|
|
serviciosSection,
|
|
/Barras de Access®/,
|
|
'Must include registered trademark symbol ® in Barras de Access®',
|
|
);
|
|
|
|
// Authority link to official Access Consciousness site
|
|
const linkMatch = serviciosSection.match(
|
|
/<a[^>]+href="https:\/\/www\.accessconsciousness\.com\/bars"[^>]*>[\s\S]*?<\/a>/i,
|
|
);
|
|
assert.ok(linkMatch, 'Must contain authority link to https://www.accessconsciousness.com/bars');
|
|
assert.match(
|
|
linkMatch[0],
|
|
/target="_blank"/i,
|
|
'Authority link must open in new tab (target="_blank")',
|
|
);
|
|
assert.match(
|
|
linkMatch[0],
|
|
/rel="noopener noreferrer"/i,
|
|
'Authority link must include rel="noopener noreferrer"',
|
|
);
|
|
});
|
|
|
|
await t.test('Criterion 5: Contextual WhatsApp CTAs & Phone Invariant (4 cards + Hatha)', () => {
|
|
const phone = '573215428972';
|
|
|
|
// Find all WhatsApp links in the document
|
|
const waLinks = [...indexHtml.matchAll(/href="(https:\/\/wa\.me\/[^"]+)"/gi)].map((m) => m[1]);
|
|
|
|
// Why: Card 2 now routes to /kundalini/, leaving 9 links (FAB, 2 hero, 4 cards,
|
|
// Hatha, contact); >= 8 keeps headroom for copy edits without masking a lost CTA.
|
|
assert.ok(waLinks.length >= 8, `Expected at least 8 WhatsApp links, found ${waLinks.length}`);
|
|
|
|
const uniqueMessages = new Set();
|
|
|
|
for (const link of waLinks) {
|
|
assert.ok(
|
|
link.startsWith(`https://wa.me/${phone}`),
|
|
`All WhatsApp links must route strictly to https://wa.me/${phone}`,
|
|
);
|
|
|
|
// Ensure no raw unencoded spaces in href
|
|
assert.ok(!link.includes(' '), `WhatsApp URL must not contain unencoded spaces: ${link}`);
|
|
|
|
const url = new URL(link);
|
|
const text = url.searchParams.get('text');
|
|
if (text) {
|
|
uniqueMessages.add(text);
|
|
}
|
|
}
|
|
|
|
// Why: 7 distinct texts = hero sesiones, 4 non-Kundalini cards, Hatha, contact.
|
|
assert.ok(
|
|
uniqueMessages.size >= 7,
|
|
`Expected at least 7 distinct contextual inquiry messages, found ${uniqueMessages.size}`,
|
|
);
|
|
|
|
// Verify phone invariant across entire document
|
|
const phoneMatches = indexHtml.matchAll(/(?:\+?57)?[ -]?(3\d{2}[ -]?\d{3}[ -]?\d{4})/g);
|
|
for (const match of phoneMatches) {
|
|
const rawDigits = match[0].replace(/\D/g, '');
|
|
const normalized = rawDigits.startsWith('57') ? rawDigits : `57${rawDigits}`;
|
|
assert.equal(
|
|
normalized,
|
|
phone,
|
|
`Found unauthorized phone number: ${match[0]} (only ${phone} allowed)`,
|
|
);
|
|
}
|
|
});
|
|
|
|
await t.test('Criterion 5b: Service Card 2 CTA routes in-tab to /kundalini/', () => {
|
|
const kundaliniCard = extractCardByHeading(
|
|
indexHtml,
|
|
'Clases de Kundalini Yoga y Acompañamientos',
|
|
);
|
|
assert.ok(kundaliniCard, 'Service Card 2 (Kundalini Yoga) must exist in built HTML');
|
|
|
|
const ctaTag = [...kundaliniCard.matchAll(/<a\b[^>]*>/gi)]
|
|
.map((match) => match[0])
|
|
.find((tag) => /\bhref="\/kundalini\/"/i.test(tag));
|
|
assert.ok(ctaTag, 'Service Card 2 must have a CTA with href="/kundalini/"');
|
|
// Why: same-site navigation must stay in the current tab; target/rel are external-link only.
|
|
assert.doesNotMatch(ctaTag, /\btarget=/i, 'Card 2 CTA must not open a new tab');
|
|
assert.doesNotMatch(ctaTag, /\brel=/i, 'Card 2 CTA must not carry a rel attribute');
|
|
});
|
|
|
|
await t.test(
|
|
'Criterion 6: Reconciled Caminos Complementarios (Section 04: single container & media strip)',
|
|
() => {
|
|
const otrosEspaciosSection = indexHtml.match(
|
|
/<section id="otros-espacios"[\s\S]*?<\/section>/,
|
|
)?.[0];
|
|
assert.ok(otrosEspaciosSection, 'Section #otros-espacios must exist');
|
|
|
|
// Heading Explora Otros Espacios
|
|
assert.match(
|
|
otrosEspaciosSection,
|
|
/Explora Otros Espacios/i,
|
|
'Section must have heading Explora Otros Espacios',
|
|
);
|
|
|
|
// Single full-width container & absence of legacy split grid classes
|
|
assert.ok(
|
|
otrosEspaciosSection.includes(
|
|
'overflow-hidden rounded-3xl border border-sage/30 bg-ivory shadow-xl',
|
|
),
|
|
'Section 04 must use single full-width container',
|
|
);
|
|
assert.ok(
|
|
!otrosEspaciosSection.includes('lg:col-span-8'),
|
|
'Section 04 must not contain legacy split grid class lg:col-span-8',
|
|
);
|
|
assert.ok(
|
|
!otrosEspaciosSection.includes('lg:col-span-4'),
|
|
'Section 04 must not contain legacy split grid class lg:col-span-4',
|
|
);
|
|
|
|
// Part 1: Hatha Yoga anchor
|
|
assert.match(
|
|
otrosEspaciosSection,
|
|
/hatha-yoga\.webp/,
|
|
'Complementary paths must include hatha-yoga.webp',
|
|
);
|
|
assert.match(
|
|
otrosEspaciosSection,
|
|
/Clases de Hatha Yoga \(Personalizadas y Grupales\)/,
|
|
'Must include title: Clases de Hatha Yoga (Personalizadas y Grupales)',
|
|
);
|
|
assert.match(
|
|
otrosEspaciosSection,
|
|
/alineación.*respiración consciente.*desbloqueo somático/s,
|
|
'Hatha Yoga copy must mention alignment, conscious breathing, and somatic release',
|
|
);
|
|
assert.match(
|
|
otrosEspaciosSection,
|
|
/Conversar sobre Clases por WhatsApp/,
|
|
'Hatha Yoga CTA must have text "Conversar sobre Clases por WhatsApp"',
|
|
);
|
|
|
|
// Part 2: Integrated media strip
|
|
assert.match(
|
|
otrosEspaciosSection,
|
|
/bg-porcelain-mist/,
|
|
'Media strip must use bg-porcelain-mist styling',
|
|
);
|
|
assert.match(
|
|
otrosEspaciosSection,
|
|
/Escucha · Respira · Reconecta/,
|
|
'Media strip must contain cadence header "Escucha · Respira · Reconecta"',
|
|
);
|
|
assert.match(
|
|
otrosEspaciosSection,
|
|
/meditaciones abiertas en mi canal de YouTube/i,
|
|
'Media strip must invite to YouTube open meditations',
|
|
);
|
|
assert.match(
|
|
otrosEspaciosSection,
|
|
/Próximamente en Spotify/i,
|
|
'Media strip must mention upcoming Spotify availability',
|
|
);
|
|
assert.match(
|
|
otrosEspaciosSection,
|
|
/https:\/\/www\.youtube\.com\/@Elcoraz(?:%C3%B3|[oó])ncomoportal/i,
|
|
'Media strip must link to official YouTube channel',
|
|
);
|
|
|
|
// Simple Icons YouTube SVG vector
|
|
const youtubeSvgPath =
|
|
'M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z';
|
|
assert.ok(
|
|
otrosEspaciosSection.includes(youtubeSvgPath),
|
|
'Media strip must render the official Simple Icons YouTube SVG path vector',
|
|
);
|
|
},
|
|
);
|
|
|
|
await t.test(
|
|
'Criterion 7: Footer Channels (Facebook Fanpage with target="_blank" and rel="noopener noreferrer")',
|
|
() => {
|
|
const footerMatch = indexHtml.match(/<footer[\s\S]*?<\/footer>/i)?.[0];
|
|
assert.ok(footerMatch, 'Footer element must exist');
|
|
|
|
const fbLinkMatch = footerMatch.match(
|
|
/<a[^>]+href="https:\/\/www\.facebook\.com\/elcorazoncomoportal\/"[^>]*>[\s\S]*?<\/a>/i,
|
|
);
|
|
assert.ok(
|
|
fbLinkMatch,
|
|
'Footer must contain official Facebook Fanpage link: https://www.facebook.com/elcorazoncomoportal/',
|
|
);
|
|
assert.match(
|
|
fbLinkMatch[0],
|
|
/target="_blank"/i,
|
|
'Facebook link in footer must have target="_blank"',
|
|
);
|
|
assert.match(
|
|
fbLinkMatch[0],
|
|
/rel="noopener noreferrer"/i,
|
|
'Facebook link in footer must have rel="noopener noreferrer"',
|
|
);
|
|
},
|
|
);
|
|
|
|
await t.test(
|
|
'Criterion 8: Build and Lint Hygiene (dist artifacts exist and reflect slice changes)',
|
|
() => {
|
|
const distHtmlPath = path.resolve('dist/index.html');
|
|
assert.ok(fs.existsSync(distHtmlPath), 'dist/index.html must exist from build');
|
|
const distHtml = fs.readFileSync(distHtmlPath, 'utf-8');
|
|
assert.match(
|
|
distHtml,
|
|
/Explora Otros Espacios/i,
|
|
'Built HTML must contain Explora Otros Espacios',
|
|
);
|
|
assert.ok(
|
|
distHtml.includes('Mentorías y Oidaterapia'),
|
|
'Built HTML must contain Mentorías y Oidaterapia',
|
|
);
|
|
},
|
|
);
|
|
|
|
await t.test('Criterion 9: Bio & Philosophy Reconciled Integrity', () => {
|
|
// Section 05: Acerca de
|
|
const acercaSection = indexHtml.match(/<section id="acerca"[\s\S]*?<\/section>/)?.[0];
|
|
assert.ok(acercaSection, 'Section #acerca must exist');
|
|
|
|
assert.ok(
|
|
acercaSection.includes('src="/img/namaste-bio.webp"'),
|
|
'Section #acerca must use namaste-bio.webp',
|
|
);
|
|
assert.match(
|
|
acercaSection,
|
|
/alt="Azucena Sánchez \(Seva Surpreet Kaur\) junto a su mentora Nam Nidhan Kaur"/,
|
|
'Section #acerca must include descriptive alt text with mentor Nam Nidhan Kaur',
|
|
);
|
|
assert.match(
|
|
acercaSection,
|
|
/<h2[^>]*>\s*Azucena Sánchez\s*<\/h2>/,
|
|
'Section #acerca must display civil name H2: Azucena Sánchez',
|
|
);
|
|
assert.match(
|
|
acercaSection,
|
|
/Seva Surpreet Kaur — Facilitadora de bienestar/,
|
|
'Section #acerca must display spiritual name without "Azu" prefix',
|
|
);
|
|
assert.ok(
|
|
!acercaSection.includes('Azu Seva'),
|
|
'Section #acerca must not include rejected hybrid name "Azu Seva"',
|
|
);
|
|
|
|
// Bio paragraphs verbatim keywords
|
|
assert.match(
|
|
acercaSection,
|
|
/directora y productora en la televisión nacional colombiana.*piloto automático/s,
|
|
'Bio paragraph 1 must describe Colombian TV trajectory and autopilot',
|
|
);
|
|
assert.match(
|
|
acercaSection,
|
|
/Kundalini KRI.*Acceso a la consciencia.*Oidaterapia/s,
|
|
'Bio paragraph 2 must include Kundalini KRI and Acceso a la consciencia',
|
|
);
|
|
assert.match(
|
|
acercaSection,
|
|
/despiertes tu propia brújula interna.*contribuir al mundo que habitamos/s,
|
|
'Bio paragraph 3 must include inner compass and closing clause on contributing to the world',
|
|
);
|
|
|
|
// Section 06: Filosofía
|
|
const filosofiaSection = indexHtml.match(/<section id="filosofia"[\s\S]*?<\/section>/)?.[0];
|
|
assert.ok(filosofiaSection, 'Section #filosofia must exist');
|
|
|
|
assert.match(
|
|
filosofiaSection,
|
|
/sabiduría trascendental del corazón/,
|
|
'Filosofía quote must contain "sabiduría trascendental del corazón"',
|
|
);
|
|
assert.match(
|
|
filosofiaSection,
|
|
/El Corazón como Portal · Conecta con tu guía interno/,
|
|
'Filosofía eyebrow must contain "El Corazón como Portal · Conecta con tu guía interno"',
|
|
);
|
|
assert.ok(
|
|
!filosofiaSection.includes('Anahata Chakra'),
|
|
'Filosofía eyebrow must not contain "Anahata Chakra"',
|
|
);
|
|
});
|
|
});
|