mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-30 10:36:35 +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;
|