1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

Desktop: Fixes #10551: Watch resources for changes when opened from the Rich Text Editor (#10554)

This commit is contained in:
Henry Heino
2024-06-10 14:31:38 -07:00
committed by GitHub
parent 80aeff6ecd
commit c511fb59c7
10 changed files with 176 additions and 66 deletions

View File

@@ -0,0 +1,16 @@
import { ElectronApplication } from '@playwright/test';
const waitForNextOpenPath = (electronApp: ElectronApplication) => {
return electronApp.evaluate(async ({ shell }) => {
return new Promise<string>(resolve => {
const originalOpenPath = shell.openPath;
shell.openPath = async (path: string) => {
shell.openPath = originalOpenPath;
resolve(path);
return '';
};
});
});
};
export default waitForNextOpenPath;