diff --git a/playwright-report/data/07db22177e9028b0f9109a1270dfc20b9ac5a4a1.zip b/playwright-report/data/07db22177e9028b0f9109a1270dfc20b9ac5a4a1.zip deleted file mode 100644 index 72eeb90..0000000 Binary files a/playwright-report/data/07db22177e9028b0f9109a1270dfc20b9ac5a4a1.zip and /dev/null differ diff --git a/playwright-report/data/d807d13ca5e897672dc2fbc0e84274edc6b965ce.zip b/playwright-report/data/d807d13ca5e897672dc2fbc0e84274edc6b965ce.zip deleted file mode 100644 index 54339e1..0000000 Binary files a/playwright-report/data/d807d13ca5e897672dc2fbc0e84274edc6b965ce.zip and /dev/null differ diff --git a/playwright-report/index.html b/playwright-report/index.html index f6d9c46..c640424 100644 --- a/playwright-report/index.html +++ b/playwright-report/index.html @@ -87,4 +87,4 @@ Error generating stack: `+l.message+`
- \ No newline at end of file + \ No newline at end of file diff --git a/test-results/homePage-EndeavourOS-HomeP-07ab2-navigation-to-Krátké-návody-chromium/trace.zip b/test-results/homePage-EndeavourOS-HomeP-07ab2-navigation-to-Krátké-návody-chromium/trace.zip deleted file mode 100644 index 0627389..0000000 Binary files a/test-results/homePage-EndeavourOS-HomeP-07ab2-navigation-to-Krátké-návody-chromium/trace.zip and /dev/null differ diff --git a/test-results/homePage-EndeavourOS-HomeP-20a1c----odkaz-má-správnou-adresu-chromium/trace.zip b/test-results/homePage-EndeavourOS-HomeP-20a1c----odkaz-má-správnou-adresu-chromium/trace.zip deleted file mode 100644 index ae610ca..0000000 Binary files a/test-results/homePage-EndeavourOS-HomeP-20a1c----odkaz-má-správnou-adresu-chromium/trace.zip and /dev/null differ diff --git a/test-results/homePage-EndeavourOS-HomeP-2542e-avigate-navigation-to-O-nás-chromium/trace.zip b/test-results/homePage-EndeavourOS-HomeP-2542e-avigate-navigation-to-O-nás-chromium/trace.zip deleted file mode 100644 index 947fafe..0000000 Binary files a/test-results/homePage-EndeavourOS-HomeP-2542e-avigate-navigation-to-O-nás-chromium/trace.zip and /dev/null differ diff --git a/test-results/homePage-EndeavourOS-HomeP-2b294-vigate-navigation-to-Články-chromium/trace.zip b/test-results/homePage-EndeavourOS-HomeP-2b294-vigate-navigation-to-Články-chromium/trace.zip deleted file mode 100644 index 7a1b160..0000000 Binary files a/test-results/homePage-EndeavourOS-HomeP-2b294-vigate-navigation-to-Články-chromium/trace.zip and /dev/null differ diff --git a/test-results/homePage-EndeavourOS-HomeP-61dc4-tlém-režimu-kontrola-režimu-chromium/trace.zip b/test-results/homePage-EndeavourOS-HomeP-61dc4-tlém-režimu-kontrola-režimu-chromium/trace.zip index 72eeb90..f1a9bbc 100644 Binary files a/test-results/homePage-EndeavourOS-HomeP-61dc4-tlém-režimu-kontrola-režimu-chromium/trace.zip and b/test-results/homePage-EndeavourOS-HomeP-61dc4-tlém-režimu-kontrola-režimu-chromium/trace.zip differ diff --git a/test-results/homePage-EndeavourOS-HomeP-8d75c--navigate-search-for-a-term-chromium/trace.zip b/test-results/homePage-EndeavourOS-HomeP-8d75c--navigate-search-for-a-term-chromium/trace.zip deleted file mode 100644 index 0ccb92c..0000000 Binary files a/test-results/homePage-EndeavourOS-HomeP-8d75c--navigate-search-for-a-term-chromium/trace.zip and /dev/null differ diff --git a/test-results/homePage-EndeavourOS-HomeP-b56ca-e-light-Light-to-Dark-check-chromium/trace.zip b/test-results/homePage-EndeavourOS-HomeP-b56ca-e-light-Light-to-Dark-check-chromium/trace.zip index 54339e1..04fc409 100644 Binary files a/test-results/homePage-EndeavourOS-HomeP-b56ca-e-light-Light-to-Dark-check-chromium/trace.zip and b/test-results/homePage-EndeavourOS-HomeP-b56ca-e-light-Light-to-Dark-check-chromium/trace.zip differ diff --git a/test-results/homePage-EndeavourOS-HomeP-d2e7a-t-to-light-switch-theme-sun-chromium/trace.zip b/test-results/homePage-EndeavourOS-HomeP-d2e7a-t-to-light-switch-theme-sun-chromium/trace.zip deleted file mode 100644 index bd87b22..0000000 Binary files a/test-results/homePage-EndeavourOS-HomeP-d2e7a-t-to-light-switch-theme-sun-chromium/trace.zip and /dev/null differ diff --git a/test-results/homePage-EndeavourOS-HomeP-f2011-k-all-menu-items-visibility-chromium/trace.zip b/test-results/homePage-EndeavourOS-HomeP-f2011-k-all-menu-items-visibility-chromium/trace.zip deleted file mode 100644 index 8835477..0000000 Binary files a/test-results/homePage-EndeavourOS-HomeP-f2011-k-all-menu-items-visibility-chromium/trace.zip and /dev/null differ diff --git a/test-results/homePage-EndeavourOS-HomeP-f7827-e-navigation-to-EndeavourOS-chromium/trace.zip b/test-results/homePage-EndeavourOS-HomeP-f7827-e-navigation-to-EndeavourOS-chromium/trace.zip deleted file mode 100644 index 4ecaa1d..0000000 Binary files a/test-results/homePage-EndeavourOS-HomeP-f7827-e-navigation-to-EndeavourOS-chromium/trace.zip and /dev/null differ diff --git a/test-results/homePage-Theme-Mock-date-l-c97b5-tlém-režimu-kontrola-režimu-chromium/trace.zip b/test-results/homePage-Theme-Mock-date-l-c97b5-tlém-režimu-kontrola-režimu-chromium/trace.zip deleted file mode 100644 index 8256ca7..0000000 Binary files a/test-results/homePage-Theme-Mock-date-l-c97b5-tlém-režimu-kontrola-režimu-chromium/trace.zip and /dev/null differ diff --git a/test-results/homePage-Theme-Mock-date-light-Light-to-Dark-check-chromium/error-context.md b/test-results/homePage-Theme-Mock-date-light-Light-to-Dark-check-chromium/error-context.md deleted file mode 100644 index 60f7081..0000000 --- a/test-results/homePage-Theme-Mock-date-light-Light-to-Dark-check-chromium/error-context.md +++ /dev/null @@ -1,223 +0,0 @@ -# Instructions - -- Following Playwright test failed. -- Explain why, be concise, respect Playwright best practices. -- Provide a snippet of code with the fix, if possible. - -# Test info - -- Name: homePage.test.ts >> Theme >> Mock date light >> Light to Dark check -- Location: tests/homePage.test.ts:175:9 - -# Error details - -``` -ReferenceError: homePage is not defined -``` - -# Page snapshot - -```yaml -- generic [active] [ref=e1]: - - banner [ref=e2]: - - generic [ref=e3]: - - link "EndeavourOS Logo CZ" [ref=e4] [cursor=pointer]: - - /url: /index.php - - img "EndeavourOS Logo" [ref=e5] - - generic [ref=e6]: CZ - - navigation [ref=e7]: - - list [ref=e8]: - - listitem [ref=e9]: - - link "Domů" [ref=e10] [cursor=pointer]: - - /url: /index.php - - listitem [ref=e11]: - - link "EndeavourOS" [ref=e12] [cursor=pointer]: - - /url: /endeavouros.php - - listitem [ref=e13]: - - link "Články" [ref=e14] [cursor=pointer]: - - /url: /rozcestnik.php - - listitem [ref=e15]: - - link "Krátké návody" [ref=e16] [cursor=pointer]: - - /url: /cheatsheet.php - - listitem [ref=e17]: - - link "Fórum" [ref=e18] [cursor=pointer]: - - /url: https://forum.arch-linux.cz/ - - listitem [ref=e19]: - - link "O nás" [ref=e20] [cursor=pointer]: - - /url: /o-nas.php - - generic [ref=e21]: - - textbox "Hledat v článcích..." [ref=e23] - - button "Sdílet stránku" [ref=e24] [cursor=pointer]: - - generic [ref=e25]:  - - text: Sdílet - - button "Přepnout téma" [ref=e26] [cursor=pointer]: - - generic [ref=e27]:  - - main [ref=e28]: - - generic [ref=e29]: - - heading "🇨🇿 Vítám Tě na webu České komunity EndeavourOS! 🇨🇿" [level=1] [ref=e30] - - paragraph [ref=e31]: Lehká, rychlá a moderní distribuce založená na Arch Linuxu. - - heading "Je navržena tak, aby poskytovala uživatelům přístup k nejnovějším technologiím a softwaru, přičemž zachovává jednoduchost a stabilitu. Distribuce nabízí několik předinstalovaných prostředí." [level=4] [ref=e32] - - heading "👇 Začínáme 👇" [level=2] [ref=e33] - - generic [ref=e34]: - - 'link "🚀 Přecházíme na Linux: Kompletní průvodce světem EndeavourOS a GNOME Máte pocit, že váš počítač s Windows je čím dál pomalejší? Štve vás, že si systém dělá, co chce, a vy nad ním nemáte kon... 2026-04-28" [ref=e35] [cursor=pointer]': - - /url: "/article.php?slug=🚀 Přecházíme na Linux: Kompletní průvodce světem EndeavourOS a GNOME" - - 'heading "🚀 Přecházíme na Linux: Kompletní průvodce světem EndeavourOS a GNOME" [level=3] [ref=e36]' - - paragraph [ref=e37]: Máte pocit, že váš počítač s Windows je čím dál pomalejší? Štve vás, že si systém dělá, co chce, a vy nad ním nemáte kon... - - generic [ref=e38]: 2026-04-28 - - link "⛵ Co je to ten Linux, EndeavourOS a GNOME? Malý slovníček pro úplné začátečníky Rozhodli jste se zkusit Linux, ale točí se vám hlava z názvů jako distribuce, prostředí, balíčky nebo AUR? Nebojte se. Ve světě Windows... 2026-04-28" [ref=e39] [cursor=pointer]: - - /url: /article.php?slug=⛵ Co je to ten Linux, EndeavourOS a GNOME? Malý slovníček pro úplné začátečníky - - heading "⛵ Co je to ten Linux, EndeavourOS a GNOME? Malý slovníček pro úplné začátečníky" [level=3] [ref=e40] - - paragraph [ref=e41]: Rozhodli jste se zkusit Linux, ale točí se vám hlava z názvů jako distribuce, prostředí, balíčky nebo AUR? Nebojte se. Ve světě Windows... - - generic [ref=e42]: 2026-04-28 - - 'link "🚀 Jak oživit počítač moderním systémem: Instalujeme EndeavourOS s GNOME Láká vás svět Linuxu, konkrétně pověstná rychlost a aktuálnost Arch Linuxu, ale odrazuje vás složitá instalace přes č... 2026-04-28" [ref=e43] [cursor=pointer]': - - /url: "/article.php?slug=🚀 Jak oživit počítač moderním systémem: Instalujeme EndeavourOS s GNOME" - - 'heading "🚀 Jak oživit počítač moderním systémem: Instalujeme EndeavourOS s GNOME" [level=3] [ref=e44]' - - paragraph [ref=e45]: Láká vás svět Linuxu, konkrétně pověstná rychlost a aktuálnost Arch Linuxu, ale odrazuje vás složitá instalace přes č... - - generic [ref=e46]: 2026-04-28 - - 'link "🔥 Záchranná brzda pro váš systém: Co je to LTS jádro a proč ho mít nainstalované Užíváte si rychlost EndeavourOS? Skvělé. Ale co když jednoho dne po aktualizaci zapnete počítač a nenaběhne grafika, nebo přesta... 2026-04-28" [ref=e47] [cursor=pointer]': - - /url: "/article.php?slug=🔥 Záchranná brzda pro váš systém: Co je to LTS jádro a proč ho mít nainstalované" - - 'heading "🔥 Záchranná brzda pro váš systém: Co je to LTS jádro a proč ho mít nainstalované" [level=3] [ref=e48]' - - paragraph [ref=e49]: Užíváte si rychlost EndeavourOS? Skvělé. Ale co když jednoho dne po aktualizaci zapnete počítač a nenaběhne grafika, nebo přesta... - - generic [ref=e50]: 2026-04-28 - - link "💽 Jak připojit nový SSD disk v EndeavourOS Určíme přidaný disk (dle názvu či velikosti), v mém případě ... 2026-04-28" [ref=e51] [cursor=pointer]: - - /url: /article.php?slug=💽 Jak připojit nový SSD disk v EndeavourOS - - heading "💽 Jak připojit nový SSD disk v EndeavourOS" [level=3] [ref=e52] - - paragraph [ref=e53]: Určíme přidaný disk (dle názvu či velikosti), v mém případě ... - - generic [ref=e54]: 2026-04-28 - - link "🧰 Jak lehce instalovat aplikace pomocí grafického správce Pamac Jak lehce instalovat aplikace pomocí grafického správce Pamac... 2026-04-28" [ref=e55] [cursor=pointer]: - - /url: /article.php?slug=Jak lehce instalovat aplikace pomocí grafického správce Pamac - - heading "🧰 Jak lehce instalovat aplikace pomocí grafického správce Pamac" [level=3] [ref=e56] - - paragraph [ref=e57]: Jak lehce instalovat aplikace pomocí grafického správce Pamac... - - generic [ref=e58]: 2026-04-28 - - link "💾 AUR packages a jak nainstalovat aplikaci pomocí YAY EndeavourOS jako všechny ostatní distribuce rodiny Arch Linuxnabízí obří seznam balíčků... 2026-04-28" [ref=e59] [cursor=pointer]: - - /url: /article.php?slug=AUR packages a jak nainstalovat aplikaci pomocí YAY - - heading "💾 AUR packages a jak nainstalovat aplikaci pomocí YAY" [level=3] [ref=e60] - - paragraph [ref=e61]: EndeavourOS jako všechny ostatní distribuce rodiny Arch Linuxnabízí obří seznam balíčků... - - generic [ref=e62]: 2026-04-28 - - link "🚨 Jak zapnout upozornění na nové aktualizace Jak zapnout upozornění na nové aktualizace... 2026-04-28" [ref=e63] [cursor=pointer]: - - /url: /article.php?slug=Jak zapnout upozornění na nové aktualizace - - heading "🚨 Jak zapnout upozornění na nové aktualizace" [level=3] [ref=e64] - - paragraph [ref=e65]: Jak zapnout upozornění na nové aktualizace... - - generic [ref=e66]: 2026-04-28 - - link "🐧 Linux pacman příkazy Linux pacman příkazy. Pacman je nedílnou součástí Arch Linuxu a distribucí na Arc... 2026-04-28" [ref=e67] [cursor=pointer]: - - /url: /article.php?slug=🐧 Linux pacman příkazy - - heading "🐧 Linux pacman příkazy" [level=3] [ref=e68] - - paragraph [ref=e69]: Linux pacman příkazy. Pacman je nedílnou součástí Arch Linuxu a distribucí na Arc... - - generic [ref=e70]: 2026-04-28 - - contentinfo [ref=e71]: - - generic [ref=e72]: - - paragraph [ref=e73]: © 2026 EndeavourOS CZ Komunita. Vytvořeno s láskou k Linuxu ❤️. - - paragraph [ref=e74]: - - link "Zásady ochrany osobních údajů" [ref=e75] [cursor=pointer]: - - /url: /privacy-policy.php -``` - -# Test source - -```ts - 100 | - 101 | - 102 | - 103 | test.describe('Carts (Karty) na HomePage', () => { - 104 | let homePage: HomePage; - 105 | - 106 | test.beforeEach(async ({ page }) => { - 107 | homePage = new HomePage(page); - 108 | await homePage.navigate(); - 109 | }); - 110 | - 111 | // Otestuje textace na kartách - 112 | test('should display all cards correctly', async () => { - 113 | for (const card of homePageCards) { - 114 | // Používáme naši POM metodu pro každou kartu - 115 | await homePage.verifyCardContent(card.title, card.description); - 116 | } - 117 | }); - 118 | - 119 | // test('should navigate after clicking on a specific card', async ({ page }) => { - 120 | // // Příklad pro jednu konkrétní kartu - 121 | // await homePage.clickCardButton('Lehkost a rychlost'); - 122 | // // Zde by následoval expect na novou URL - 123 | // }); - 124 | }); - 125 | }); - 126 | - 127 | - 128 | - 129 | test.describe('Theme', () => { - 130 | test.describe('Theme -- dark default to light', () => { - 131 | let homePage: HomePage; - 132 | - 133 | test.beforeEach(async ({ page }) => { - 134 | homePage = new HomePage(page); - 135 | await homePage.navigate(); - 136 | }); - 137 | test('switch theme sun', async ({ page }) => { - 138 | await homePage.switchThemeFunctionLight() - 139 | }); - 140 | - 141 | }); - 142 | test.describe('Mock date light', () => { - 143 | test('vynucený start ve světlém režimu + kontrola režimu', async ({ page }) => { - 144 | // 1. Nastavíme emulaci systému na light (to je základ) - 145 | await page.emulateMedia({ colorScheme: 'light' }); - 146 | - 147 | // 2. Mockujeme stav paměti a DOMu - 148 | await page.addInitScript(() => { - 149 | // Vnutíme informaci, že chceme light do paměti - 150 | window.localStorage.setItem('theme', 'light'); - 151 | window.localStorage.setItem('color-theme', 'light'); // Pro jistotu oba běžné názvy - 152 | - 153 | // Tady je ten trik: Sledujeme, kdyby se web snažil přidat 'dark' a hned to smažeme - 154 | const observer = new MutationObserver(() => { - 155 | if (document.documentElement.classList.contains('dark')) { - 156 | document.documentElement.classList.remove('dark'); - 157 | } - 158 | }); - 159 | observer.observe(document.documentElement, { attributes: true, attributeFilter: ['class'] }); - 160 | }); - 161 | - 162 | // 3. Jdeme na web - 163 | await page.goto('https://endeavouros.cz'); - 164 | - 165 | // 4. OVĚŘENÍ: Teď už musí být světlý - 166 | const html = page.locator('html'); - 167 | await expect(html).not.toHaveClass(/dark/); - 168 | - 169 | // Vizuální kontrola - barva pozadí by teď měla být bílá/světlá (rgb 255, 255, 255) - 170 | // Poznámka: Pokud má web i ve světlém režimu jinou barvu, uprav si rgb hodnotu - 171 | await expect(page.locator('body')).toHaveCSS('background-color', 'rgb(248, 249, 250)'); - 172 | await expect(page.locator('html')).toHaveAttribute('data-theme', 'light'); - 173 | - 174 | }); - 175 | test('Light to Dark check', async ({ page }) => { - 176 | // 1. Nastavíme emulaci systému na light (to je základ) - 177 | await page.emulateMedia({ colorScheme: 'light' }); - 178 | - 179 | // 2. Mockujeme stav paměti a DOMu - 180 | await page.addInitScript(() => { - 181 | // Vnutíme informaci, že chceme light do paměti - 182 | window.localStorage.setItem('theme', 'light'); - 183 | window.localStorage.setItem('color-theme', 'light'); // Pro jistotu oba běžné názvy - 184 | - 185 | // Tady je ten trik: Sledujeme, kdyby se web snažil přidat 'dark' a hned to smažeme - 186 | const observer = new MutationObserver(() => { - 187 | if (document.documentElement.classList.contains('dark')) { - 188 | document.documentElement.classList.remove('dark'); - 189 | } - 190 | }); - 191 | observer.observe(document.documentElement, { attributes: true, attributeFilter: ['class'] }); - 192 | }); - 193 | - 194 | // 3. Jdeme na web - 195 | await page.goto('https://endeavouros.cz'); - 196 | - 197 | // 4. OVĚŘENÍ: Teď už musí být světlý - 198 | const html = page.locator('html'); - 199 | await expect(html).not.toHaveClass(/dark/); -> 200 | await homePage.switchThemeFunctionDark() - | ^ ReferenceError: homePage is not defined - 201 | }); - 202 | }); - 203 | }); -``` \ No newline at end of file diff --git a/test-results/homePage-Theme-Mock-date-light-Light-to-Dark-check-chromium/test-failed-1.png b/test-results/homePage-Theme-Mock-date-light-Light-to-Dark-check-chromium/test-failed-1.png deleted file mode 100644 index 9252ba0..0000000 Binary files a/test-results/homePage-Theme-Mock-date-light-Light-to-Dark-check-chromium/test-failed-1.png and /dev/null differ diff --git a/test-results/homePage-Theme-Mock-date-light-Light-to-Dark-check-chromium/trace.zip b/test-results/homePage-Theme-Mock-date-light-Light-to-Dark-check-chromium/trace.zip deleted file mode 100644 index c93b721..0000000 Binary files a/test-results/homePage-Theme-Mock-date-light-Light-to-Dark-check-chromium/trace.zip and /dev/null differ diff --git a/test-results/homePage-Theme-Theme----da-966b4-t-to-light-switch-theme-sun-chromium/error-context.md b/test-results/homePage-Theme-Theme----da-966b4-t-to-light-switch-theme-sun-chromium/error-context.md deleted file mode 100644 index bb0e40b..0000000 --- a/test-results/homePage-Theme-Theme----da-966b4-t-to-light-switch-theme-sun-chromium/error-context.md +++ /dev/null @@ -1,285 +0,0 @@ -# Instructions - -- Following Playwright test failed. -- Explain why, be concise, respect Playwright best practices. -- Provide a snippet of code with the fix, if possible. - -# Test info - -- Name: homePage.test.ts >> Theme >> Theme -- dark default to light >> switch theme sun -- Location: tests/homePage.test.ts:137:9 - -# Error details - -``` -TypeError: homePage.switchThemeFunctionLight is not a function -``` - -# Page snapshot - -```yaml -- generic [active] [ref=e1]: - - banner [ref=e2]: - - generic [ref=e3]: - - link "EndeavourOS Logo CZ" [ref=e4] [cursor=pointer]: - - /url: /index.php - - img "EndeavourOS Logo" [ref=e5] - - generic [ref=e6]: CZ - - navigation [ref=e7]: - - list [ref=e8]: - - listitem [ref=e9]: - - link "Domů" [ref=e10] [cursor=pointer]: - - /url: /index.php - - listitem [ref=e11]: - - link "EndeavourOS" [ref=e12] [cursor=pointer]: - - /url: /endeavouros.php - - listitem [ref=e13]: - - link "Články" [ref=e14] [cursor=pointer]: - - /url: /rozcestnik.php - - listitem [ref=e15]: - - link "Krátké návody" [ref=e16] [cursor=pointer]: - - /url: /cheatsheet.php - - listitem [ref=e17]: - - link "Fórum" [ref=e18] [cursor=pointer]: - - /url: https://forum.arch-linux.cz/ - - listitem [ref=e19]: - - link "O nás" [ref=e20] [cursor=pointer]: - - /url: /o-nas.php - - generic [ref=e21]: - - textbox "Hledat v článcích..." [ref=e23] - - button "Sdílet stránku" [ref=e24] [cursor=pointer]: - - generic [ref=e25]:  - - text: Sdílet - - button "Přepnout téma" [ref=e26] [cursor=pointer]: - - generic [ref=e27]:  - - main [ref=e28]: - - generic [ref=e29]: - - heading "🇨🇿 Vítám Tě na webu České komunity EndeavourOS! 🇨🇿" [level=1] [ref=e30] - - paragraph [ref=e31]: Lehká, rychlá a moderní distribuce založená na Arch Linuxu. - - heading "Je navržena tak, aby poskytovala uživatelům přístup k nejnovějším technologiím a softwaru, přičemž zachovává jednoduchost a stabilitu. Distribuce nabízí několik předinstalovaných prostředí." [level=4] [ref=e32] - - heading "👇 Začínáme 👇" [level=2] [ref=e33] - - generic [ref=e34]: - - 'link "🚀 Přecházíme na Linux: Kompletní průvodce světem EndeavourOS a GNOME Máte pocit, že váš počítač s Windows je čím dál pomalejší? Štve vás, že si systém dělá, co chce, a vy nad ním nemáte kon... 2026-04-28" [ref=e35] [cursor=pointer]': - - /url: "/article.php?slug=🚀 Přecházíme na Linux: Kompletní průvodce světem EndeavourOS a GNOME" - - 'heading "🚀 Přecházíme na Linux: Kompletní průvodce světem EndeavourOS a GNOME" [level=3] [ref=e36]' - - paragraph [ref=e37]: Máte pocit, že váš počítač s Windows je čím dál pomalejší? Štve vás, že si systém dělá, co chce, a vy nad ním nemáte kon... - - generic [ref=e38]: 2026-04-28 - - link "⛵ Co je to ten Linux, EndeavourOS a GNOME? Malý slovníček pro úplné začátečníky Rozhodli jste se zkusit Linux, ale točí se vám hlava z názvů jako distribuce, prostředí, balíčky nebo AUR? Nebojte se. Ve světě Windows... 2026-04-28" [ref=e39] [cursor=pointer]: - - /url: /article.php?slug=⛵ Co je to ten Linux, EndeavourOS a GNOME? Malý slovníček pro úplné začátečníky - - heading "⛵ Co je to ten Linux, EndeavourOS a GNOME? Malý slovníček pro úplné začátečníky" [level=3] [ref=e40] - - paragraph [ref=e41]: Rozhodli jste se zkusit Linux, ale točí se vám hlava z názvů jako distribuce, prostředí, balíčky nebo AUR? Nebojte se. Ve světě Windows... - - generic [ref=e42]: 2026-04-28 - - 'link "🚀 Jak oživit počítač moderním systémem: Instalujeme EndeavourOS s GNOME Láká vás svět Linuxu, konkrétně pověstná rychlost a aktuálnost Arch Linuxu, ale odrazuje vás složitá instalace přes č... 2026-04-28" [ref=e43] [cursor=pointer]': - - /url: "/article.php?slug=🚀 Jak oživit počítač moderním systémem: Instalujeme EndeavourOS s GNOME" - - 'heading "🚀 Jak oživit počítač moderním systémem: Instalujeme EndeavourOS s GNOME" [level=3] [ref=e44]' - - paragraph [ref=e45]: Láká vás svět Linuxu, konkrétně pověstná rychlost a aktuálnost Arch Linuxu, ale odrazuje vás složitá instalace přes č... - - generic [ref=e46]: 2026-04-28 - - 'link "🔥 Záchranná brzda pro váš systém: Co je to LTS jádro a proč ho mít nainstalované Užíváte si rychlost EndeavourOS? Skvělé. Ale co když jednoho dne po aktualizaci zapnete počítač a nenaběhne grafika, nebo přesta... 2026-04-28" [ref=e47] [cursor=pointer]': - - /url: "/article.php?slug=🔥 Záchranná brzda pro váš systém: Co je to LTS jádro a proč ho mít nainstalované" - - 'heading "🔥 Záchranná brzda pro váš systém: Co je to LTS jádro a proč ho mít nainstalované" [level=3] [ref=e48]' - - paragraph [ref=e49]: Užíváte si rychlost EndeavourOS? Skvělé. Ale co když jednoho dne po aktualizaci zapnete počítač a nenaběhne grafika, nebo přesta... - - generic [ref=e50]: 2026-04-28 - - link "💽 Jak připojit nový SSD disk v EndeavourOS Určíme přidaný disk (dle názvu či velikosti), v mém případě ... 2026-04-28" [ref=e51] [cursor=pointer]: - - /url: /article.php?slug=💽 Jak připojit nový SSD disk v EndeavourOS - - heading "💽 Jak připojit nový SSD disk v EndeavourOS" [level=3] [ref=e52] - - paragraph [ref=e53]: Určíme přidaný disk (dle názvu či velikosti), v mém případě ... - - generic [ref=e54]: 2026-04-28 - - link "🧰 Jak lehce instalovat aplikace pomocí grafického správce Pamac Jak lehce instalovat aplikace pomocí grafického správce Pamac... 2026-04-28" [ref=e55] [cursor=pointer]: - - /url: /article.php?slug=Jak lehce instalovat aplikace pomocí grafického správce Pamac - - heading "🧰 Jak lehce instalovat aplikace pomocí grafického správce Pamac" [level=3] [ref=e56] - - paragraph [ref=e57]: Jak lehce instalovat aplikace pomocí grafického správce Pamac... - - generic [ref=e58]: 2026-04-28 - - link "💾 AUR packages a jak nainstalovat aplikaci pomocí YAY EndeavourOS jako všechny ostatní distribuce rodiny Arch Linuxnabízí obří seznam balíčků... 2026-04-28" [ref=e59] [cursor=pointer]: - - /url: /article.php?slug=AUR packages a jak nainstalovat aplikaci pomocí YAY - - heading "💾 AUR packages a jak nainstalovat aplikaci pomocí YAY" [level=3] [ref=e60] - - paragraph [ref=e61]: EndeavourOS jako všechny ostatní distribuce rodiny Arch Linuxnabízí obří seznam balíčků... - - generic [ref=e62]: 2026-04-28 - - link "🚨 Jak zapnout upozornění na nové aktualizace Jak zapnout upozornění na nové aktualizace... 2026-04-28" [ref=e63] [cursor=pointer]: - - /url: /article.php?slug=Jak zapnout upozornění na nové aktualizace - - heading "🚨 Jak zapnout upozornění na nové aktualizace" [level=3] [ref=e64] - - paragraph [ref=e65]: Jak zapnout upozornění na nové aktualizace... - - generic [ref=e66]: 2026-04-28 - - link "🐧 Linux pacman příkazy Linux pacman příkazy. Pacman je nedílnou součástí Arch Linuxu a distribucí na Arc... 2026-04-28" [ref=e67] [cursor=pointer]: - - /url: /article.php?slug=🐧 Linux pacman příkazy - - heading "🐧 Linux pacman příkazy" [level=3] [ref=e68] - - paragraph [ref=e69]: Linux pacman příkazy. Pacman je nedílnou součástí Arch Linuxu a distribucí na Arc... - - generic [ref=e70]: 2026-04-28 - - contentinfo [ref=e71]: - - generic [ref=e72]: - - paragraph [ref=e73]: © 2026 EndeavourOS CZ Komunita. Vytvořeno s láskou k Linuxu ❤️. - - paragraph [ref=e74]: - - link "Zásady ochrany osobních údajů" [ref=e75] [cursor=pointer]: - - /url: /privacy-policy.php -``` - -# Test source - -```ts - 38 | await homePage.searchInput.fill('EndeavourOS'); - 39 | // nejdříve je nutno opravit vyhledávaní na webu - 40 | // await page.getByText('Linux pacman příkazy').click(); - 41 | - 42 | }); - 43 | - 44 | test('check all menu items visibility', async () => { - 45 | await homePage.checkMenuTexts(expectedMenuTexts); - 46 | }); - 47 | - 48 | test('navigation to EndeavourOS', async ({ page }) => { - 49 | await homePage.clickMenuItem('EndeavourOS'); - 50 | await expect(page).toHaveURL(new RegExp(`.*${homePage.url}/endeavouros`)); - 51 | }); - 52 | - 53 | test('navigation to Články', async ({ page }) => { - 54 | await homePage.clickMenuItem('Články'); - 55 | await expect(page).toHaveURL(new RegExp(`.*${homePage.url}/rozcestnik`)); - 56 | }); - 57 | - 58 | test('navigation to Krátké návody', async ({ page }) => { - 59 | await homePage.clickMenuItem('Krátké návody'); - 60 | await expect(page).toHaveURL(new RegExp(`.*${homePage.url}/cheatsheet`)); - 61 | }); - 62 | - 63 | // Seznam externích odkazů, které chceme prověřit - 64 | // Nyní nejde nutno doopravit - 65 | // test('externí odkazy v menu jsou platné', async ({ page, request }) => { - 66 | // const homePage = new HomePage(page); - 67 | // await homePage.navigate(); - 68 | - 69 | // Seznam externích odkazů, které chceme prověřit - 70 | // test('kontrola externích odkazů na zdraví (status 200)', async ({ page, request }) => { - 71 | // const homePage = new HomePage(page); - 72 | // await homePage.navigate(); - 73 | - 74 | // for (const link of externalLinks) { - 75 | // // Ověříme, že text tlačítka je na stránce vidět - 76 | // const href = await homePage.getMenuItemHref(link.name); - 77 | - 78 | // // Ověříme, že href v HTML odpovídá tomu, co máme v datech - 79 | // expect(href).toBe(link.url); - 80 | - 81 | // // Provedeme rychlou kontrolu, zda link není "mrtvý" - 82 | // const response = await request.get(link.url); - 83 | // expect(response.ok(), `Odkaz ${link.name} na adrese ${link.url} vrací chybu!`).toBeTruthy(); - 84 | - 85 | // console.log(`Log: Odkaz "${link.name}" je v pořádku.`); - 86 | // } - 87 | // }); - 88 | - 89 | //funkční řešení - otevře web - 90 | test('externí Fórum -> odkaz má správnou adresu', async () => { - 91 | const href = await homePage.getMenuItemLinkHref('Fórum'); // Příklad - 92 | expect(href).toBe('https://forum.arch-linux.cz/'); - 93 | }); - 94 | - 95 | test('navigation to O nás', async ({ page }) => { - 96 | await homePage.clickMenuItem('O nás'); - 97 | await expect(page).toHaveURL(new RegExp(`.*${homePage.url}/o-nas`)); - 98 | }); - 99 | }); - 100 | - 101 | - 102 | - 103 | test.describe('Carts (Karty) na HomePage', () => { - 104 | let homePage: HomePage; - 105 | - 106 | test.beforeEach(async ({ page }) => { - 107 | homePage = new HomePage(page); - 108 | await homePage.navigate(); - 109 | }); - 110 | - 111 | // Otestuje textace na kartách - 112 | test('should display all cards correctly', async () => { - 113 | for (const card of homePageCards) { - 114 | // Používáme naši POM metodu pro každou kartu - 115 | await homePage.verifyCardContent(card.title, card.description); - 116 | } - 117 | }); - 118 | - 119 | // test('should navigate after clicking on a specific card', async ({ page }) => { - 120 | // // Příklad pro jednu konkrétní kartu - 121 | // await homePage.clickCardButton('Lehkost a rychlost'); - 122 | // // Zde by následoval expect na novou URL - 123 | // }); - 124 | }); - 125 | }); - 126 | - 127 | - 128 | - 129 | test.describe('Theme', () => { - 130 | test.describe('Theme -- dark default to light', () => { - 131 | let homePage: HomePage; - 132 | - 133 | test.beforeEach(async ({ page }) => { - 134 | homePage = new HomePage(page); - 135 | await homePage.navigate(); - 136 | }); - 137 | test('switch theme sun', async ({ page }) => { -> 138 | await homePage.switchThemeFunctionLight() - | ^ TypeError: homePage.switchThemeFunctionLight is not a function - 139 | }); - 140 | - 141 | }); - 142 | test.describe('Mock date light', () => { - 143 | test('vynucený start ve světlém režimu + kontrola režimu', async ({ page }) => { - 144 | // 1. Nastavíme emulaci systému na light (to je základ) - 145 | await page.emulateMedia({ colorScheme: 'light' }); - 146 | - 147 | // 2. Mockujeme stav paměti a DOMu - 148 | await page.addInitScript(() => { - 149 | // Vnutíme informaci, že chceme light do paměti - 150 | window.localStorage.setItem('theme', 'light'); - 151 | window.localStorage.setItem('color-theme', 'light'); // Pro jistotu oba běžné názvy - 152 | - 153 | // Tady je ten trik: Sledujeme, kdyby se web snažil přidat 'dark' a hned to smažeme - 154 | const observer = new MutationObserver(() => { - 155 | if (document.documentElement.classList.contains('dark')) { - 156 | document.documentElement.classList.remove('dark'); - 157 | } - 158 | }); - 159 | observer.observe(document.documentElement, { attributes: true, attributeFilter: ['class'] }); - 160 | }); - 161 | - 162 | // 3. Jdeme na web - 163 | await page.goto('https://endeavouros.cz'); - 164 | - 165 | // 4. OVĚŘENÍ: Teď už musí být světlý - 166 | const html = page.locator('html'); - 167 | await expect(html).not.toHaveClass(/dark/); - 168 | - 169 | // Vizuální kontrola - barva pozadí by teď měla být bílá/světlá (rgb 255, 255, 255) - 170 | // Poznámka: Pokud má web i ve světlém režimu jinou barvu, uprav si rgb hodnotu - 171 | await expect(page.locator('body')).toHaveCSS('background-color', 'rgb(248, 249, 250)'); - 172 | await expect(page.locator('html')).toHaveAttribute('data-theme', 'light'); - 173 | - 174 | }); - 175 | test('Light to Dark check', async ({ page }) => { - 176 | // 1. Nastavíme emulaci systému na light (to je základ) - 177 | await page.emulateMedia({ colorScheme: 'light' }); - 178 | - 179 | // 2. Mockujeme stav paměti a DOMu - 180 | await page.addInitScript(() => { - 181 | // Vnutíme informaci, že chceme light do paměti - 182 | window.localStorage.setItem('theme', 'light'); - 183 | window.localStorage.setItem('color-theme', 'light'); // Pro jistotu oba běžné názvy - 184 | - 185 | // Tady je ten trik: Sledujeme, kdyby se web snažil přidat 'dark' a hned to smažeme - 186 | const observer = new MutationObserver(() => { - 187 | if (document.documentElement.classList.contains('dark')) { - 188 | document.documentElement.classList.remove('dark'); - 189 | } - 190 | }); - 191 | observer.observe(document.documentElement, { attributes: true, attributeFilter: ['class'] }); - 192 | }); - 193 | - 194 | // 3. Jdeme na web - 195 | await page.goto('https://endeavouros.cz'); - 196 | - 197 | // 4. OVĚŘENÍ: Teď už musí být světlý - 198 | const html = page.locator('html'); - 199 | await expect(html).not.toHaveClass(/dark/); - 200 | await homePage.switchThemeFunctionDark() - 201 | }); - 202 | }); - 203 | }); -``` \ No newline at end of file diff --git a/test-results/homePage-Theme-Theme----da-966b4-t-to-light-switch-theme-sun-chromium/test-failed-1.png b/test-results/homePage-Theme-Theme----da-966b4-t-to-light-switch-theme-sun-chromium/test-failed-1.png deleted file mode 100644 index dfe8b63..0000000 Binary files a/test-results/homePage-Theme-Theme----da-966b4-t-to-light-switch-theme-sun-chromium/test-failed-1.png and /dev/null differ diff --git a/test-results/homePage-Theme-Theme----da-966b4-t-to-light-switch-theme-sun-chromium/trace.zip b/test-results/homePage-Theme-Theme----da-966b4-t-to-light-switch-theme-sun-chromium/trace.zip deleted file mode 100644 index 5410de6..0000000 Binary files a/test-results/homePage-Theme-Theme----da-966b4-t-to-light-switch-theme-sun-chromium/trace.zip and /dev/null differ diff --git a/tests/homePage.test.ts b/tests/homePage.test.ts index 9d400c9..07d7f6b 100644 --- a/tests/homePage.test.ts +++ b/tests/homePage.test.ts @@ -156,7 +156,7 @@ test.describe('EndeavourOS HomePage - POM', () => { observer.observe(document.documentElement, { attributes: true, attributeFilter: ['class'] }); }); - // 3. Jdeme na web + // 3. Jdeme na web . await page.goto('https://endeavouros.cz'); // 4. OVĚŘENÍ: Teď už musí být světlý