Skip to content
Snippets Groups Projects
Unverified Commit 666b7870 authored by Matiss Janis Aboltins's avatar Matiss Janis Aboltins Committed by GitHub
Browse files

:test_tube: improve setting e2e test stability (#3513)

parent 686ce5b5
No related branches found
No related tags found
No related merge requests found
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -18,7 +18,7 @@ expect.extend({
};
// Check lightmode
await locator.evaluate(() => window.Actual.setTheme('light'));
await locator.evaluate(() => window.Actual.setTheme('auto'));
const lightmode = await expect(locator).toHaveScreenshot(config);
if (lightmode && !lightmode.pass) {
......@@ -44,7 +44,7 @@ expect.extend({
}
// Switch back to lightmode
await locator.evaluate(() => window.Actual.setTheme('light'));
await locator.evaluate(() => window.Actual.setTheme('auto'));
return {
message: () => 'pass',
pass: true,
......
......@@ -31,7 +31,7 @@ export const darkThemeOptions = Object.entries({
}).map(([key, { name }]) => [key, name] as [DarkTheme, string]);
export function useTheme() {
const [theme = 'light', setThemePref] = useGlobalPref('theme');
const [theme = 'auto', setThemePref] = useGlobalPref('theme');
return [theme, setThemePref] as const;
}
......
---
category: Maintenance
authors: [MatissJanis]
---
e2e: improve settings test stability.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment