light to dark theme
Playwright Tests / test (push) Successful in 6m52s

This commit is contained in:
2026-05-02 23:38:24 +02:00
parent e67a4a1edf
commit 18e78b04ba
33 changed files with 300 additions and 1119 deletions
+9 -4
View File
@@ -99,13 +99,18 @@ export class HomePage {
/*
* Test theme
*/
// Test Theme sun
async switchThemeFunction() {
// Test Theme Light
async switchThemeFunctionLight() {
const themeButton = this.page.locator('#themeToggle');
await themeButton.click();
await expect(this.page.locator('html')).toHaveAttribute('data-theme', 'light');
}
// Test Theme Dark
async switchThemeFunctionDark() {
const themeButton = this.page.locator('#themeToggle');
await themeButton.click();
await expect(this.page.locator('html')).toHaveAttribute('data-theme', 'dark');
}
}