MM-60782 - use default download directory on windows (#3161)
* MM-60782 - use default download directory on windows * fix unit tests
This commit is contained in:
@@ -17,6 +17,7 @@ import MainWindow from '../windows/mainWindow';
|
||||
jest.mock('electron', () => ({
|
||||
app: {
|
||||
getVersion: () => '5.0.0',
|
||||
getPath: jest.fn(() => '/valid/downloads/path'),
|
||||
},
|
||||
BrowserView: jest.fn().mockImplementation(() => ({
|
||||
webContents: {
|
||||
|
@@ -28,6 +28,7 @@ jest.mock('electron', () => {
|
||||
return {
|
||||
app: {
|
||||
getAppPath: () => '',
|
||||
getPath: jest.fn(() => '/valid/downloads/path'),
|
||||
},
|
||||
BrowserView: jest.fn().mockImplementation(() => ({
|
||||
webContents: {
|
||||
|
@@ -36,6 +36,7 @@ jest.mock('electron', () => {
|
||||
return {
|
||||
app: {
|
||||
getAppPath: () => '',
|
||||
getPath: jest.fn(() => '/valid/downloads/path'),
|
||||
},
|
||||
BrowserView: jest.fn().mockImplementation(() => ({
|
||||
webContents: {
|
||||
|
@@ -25,6 +25,9 @@ jest.mock('electron', () => ({
|
||||
ipcMain: {
|
||||
on: jest.fn(),
|
||||
},
|
||||
app: {
|
||||
getPath: jest.fn(() => '/valid/downloads/path'),
|
||||
},
|
||||
}));
|
||||
jest.mock('main/windows/mainWindow', () => ({
|
||||
on: jest.fn(),
|
||||
|
@@ -18,6 +18,7 @@ import {ViewManager} from './viewManager';
|
||||
jest.mock('electron', () => ({
|
||||
app: {
|
||||
getAppPath: () => '/path/to/app',
|
||||
getPath: jest.fn(() => '/valid/downloads/path'),
|
||||
},
|
||||
dialog: {
|
||||
showErrorBox: jest.fn(),
|
||||
|
Reference in New Issue
Block a user