diff --git a/tests/test-all-features.js b/tests/test-all-features.js index ddf9450..e640ad5 100644 --- a/tests/test-all-features.js +++ b/tests/test-all-features.js @@ -45,9 +45,9 @@ const { chromium } = require('playwright'); console.log('šŸ–¼ļø Step 5: Testing logo toggle (atomic OOB swaps)'); await page.click('#logoToggle'); await page.waitForTimeout(800); - const showLogos = await page.locator('.cv-paper').evaluate(el => el.classList.contains('show-logos')); + const showIcons = await page.locator('.cv-paper').evaluate(el => el.classList.contains('show-icons')); url = page.url(); - console.log(` Logos: ${showLogos ? 'visible' : 'hidden'}`); + console.log(` Icons: ${showIcons ? 'visible' : 'hidden'}`); console.log(` URL still clean: ${!url.includes('#') ? 'āœ“' : 'āœ—'}\n`); console.log('ā¬†ļø Step 6: Testing back-to-top (URL cleanliness)'); @@ -71,12 +71,12 @@ const { chromium } = require('playwright'); const contentEN = await page.locator('.sidebar-accordion-header span').first().textContent(); const stillClean = await page.evaluate(() => document.body.classList.contains('theme-clean')); const stillLong = await page.locator('.cv-paper').evaluate(el => el.classList.contains('cv-long')); - const stillShowLogos = await page.locator('.cv-paper').evaluate(el => el.classList.contains('show-logos')); + const stillShowIcons = await page.locator('.cv-paper').evaluate(el => el.classList.contains('show-icons')); console.log(` Language: ${contentEN === 'Technical Skills' ? 'English āœ“' : 'Failed āœ—'}`); console.log(` Theme persisted: ${stillClean ? 'clean āœ“' : 'default āœ—'}`); console.log(` Length persisted: ${stillLong ? 'long āœ“' : 'short āœ—'}`); - console.log(` Logos persisted: ${stillShowLogos ? 'visible āœ“' : 'hidden āœ—'}`); + console.log(` Icons persisted: ${stillShowIcons ? 'visible āœ“' : 'hidden āœ—'}`); console.log(` URL: ${url}`); console.log(` Clean URL: ${!url.includes('#') ? 'āœ“' : 'āœ—'}\n`); @@ -85,7 +85,7 @@ const { chromium } = require('playwright'); contentEN === 'Technical Skills' && hasCleanTheme && stillClean && isLong && stillLong && - showLogos && stillShowLogos && + showIcons && stillShowIcons && !url.includes('#'); console.log(`\n${allPassed ? 'āœ… ALL FEATURES WORKING PERFECTLY!' : 'āŒ SOME TESTS FAILED'}`); diff --git a/tests/test-all-toggles.js b/tests/test-all-toggles.js index 2899242..9e658b4 100644 --- a/tests/test-all-toggles.js +++ b/tests/test-all-toggles.js @@ -57,7 +57,7 @@ const { chromium } = require('playwright'); // Test Logo Toggle (HTMX - should preserve scroll) console.log('\nšŸ–¼ļø TEST 3: Logo toggle (HTMX)...'); const scrollBeforeLogo = await page.evaluate(() => window.pageYOffset); - await page.locator('.selector-group').filter({ hasText: 'Logos' }).locator('label.icon-toggle').click(); + await page.locator('.selector-group').filter({ hasText: 'Icons' }).locator('label.icon-toggle').click(); await page.waitForTimeout(2000); // Wait for HTMX swap const scrollAfterLogo = await page.evaluate(() => window.pageYOffset); console.log(` Scroll before: ${scrollBeforeLogo}px, after: ${scrollAfterLogo}px`); diff --git a/tests/test-toggle-complete.js b/tests/test-toggle-complete.js index 1c0ef56..a238113 100644 --- a/tests/test-toggle-complete.js +++ b/tests/test-toggle-complete.js @@ -86,12 +86,12 @@ const { chromium } = require('playwright'); const storage = await page.evaluate(() => { return { length: localStorage.getItem('cv-length'), - logos: localStorage.getItem('cv-logos'), + icons: localStorage.getItem('cv-icons'), theme: localStorage.getItem('cv-theme') }; }); console.log(` Length: ${storage.length || 'not set'}`); - console.log(` Logos: ${storage.logos || 'not set'}`); + console.log(` Logos: ${storage.icons || 'not set'}`); console.log(` Theme: ${storage.theme || 'not set'}\n`); // Final summary @@ -105,7 +105,7 @@ const { chromium } = require('playwright'); } console.log('āœ… Desktop/mobile sync working perfectly'); - console.log('āœ… All 3 toggle types functional (length, logos, theme)'); + console.log('āœ… All 3 toggle types functional (length, icons, theme)'); console.log('āœ… Smooth CSS animations (300ms transitions)'); console.log('āœ… State persistence via localStorage'); console.log('āœ… HTMX integration with hx-swap="none"');