From 77669f31509f704cf2e9ddc0d1df8081e6596ca6 Mon Sep 17 00:00:00 2001 From: Bogdan Radacina Date: Fri, 8 Jan 2016 08:56:45 +1100 Subject: [PATCH] Add showOpenDialog tests for both call variants --- github-electron/github-electron-main-tests.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/github-electron/github-electron-main-tests.ts b/github-electron/github-electron-main-tests.ts index 55588681f..fd7437a89 100644 --- a/github-electron/github-electron-main-tests.ts +++ b/github-electron/github-electron-main-tests.ts @@ -249,9 +249,21 @@ contentTracing.startRecording('*', contentTracing.DEFAULT_OPTIONS, () => { // dialog // https://github.com/atom/electron/blob/master/docs/api/dialog.md -console.log(dialog.showOpenDialog({ +// variant without browserWindow +var openDialogResult: string[] = dialog.showOpenDialog({ + title: 'Testing showOpenDialog', + defaultPath: '/var/log/syslog', + filters: [{name: '', extensions: ['']}], properties: ['openFile', 'openDirectory', 'multiSelections'] -})); +}); + +// variant with browserWindow +openDialogResult = dialog.showOpenDialog(win, { + title: 'Testing showOpenDialog', + defaultPath: '/var/log/syslog', + filters: [{name: '', extensions: ['']}], + properties: ['openFile', 'openDirectory', 'multiSelections'] +}); // global-shortcut // https://github.com/atom/electron/blob/master/docs/api/global-shortcut.md