@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user