mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-02 12:47:41 +02:00
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;
|