diff --git a/ts/test/automation/switching_theme.spec.ts b/ts/test/automation/switching_theme.spec.ts index 26f0a7025..cfb0e3647 100644 --- a/ts/test/automation/switching_theme.spec.ts +++ b/ts/test/automation/switching_theme.spec.ts @@ -15,15 +15,17 @@ test('Switch themes', async () => { windows = windowLoggedIn.windows; const [windowA] = windows; // Check light theme colour is correct - const lightThemeColor = windowA.locator('.inbox.index'); - await expect(lightThemeColor).toHaveCSS('background-color', 'rgb(255, 255, 255)'); + const darkThemeColor = windowA.locator('.inbox.index'); + await expect(darkThemeColor).toHaveCSS('background-color', 'rgb(27, 27, 27)'); + // Click theme button and change to dark theme await clickOnTestIdWithText(windowA, 'theme-section'); // Check background colour of background to verify dark theme - const darkThemeColor = windowA.locator('.inbox.index'); - await expect(darkThemeColor).toHaveCSS('background-color', 'rgb(23, 23, 23)'); + const lightThemeColor = windowA.locator('.inbox.index'); + await expect(lightThemeColor).toHaveCSS('background-color', 'rgb(255, 255, 255)'); + // Toggle back to light theme await clickOnTestIdWithText(windowA, 'theme-section'); // Check background colour again - await expect(lightThemeColor).toHaveCSS('background-color', 'rgb(255, 255, 255)'); + await expect(darkThemeColor).toHaveCSS('background-color', 'rgb(27, 27, 27)'); });