mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-21 09:38:01 +02:00
a616dc3cd2
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
10 lines
286 B
TypeScript
10 lines
286 B
TypeScript
import { ElectronApplication } from '@playwright/test';
|
|
|
|
const setDarkMode = (app: ElectronApplication, darkMode: boolean) => {
|
|
return app.evaluate(({ nativeTheme }, darkMode) => {
|
|
nativeTheme.themeSource = darkMode ? 'dark' : 'light';
|
|
}, darkMode);
|
|
};
|
|
|
|
export default setDarkMode;
|