mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
ELECTRON-651 (Assign focused window to the screen picker) [Windows] (#468)
* ELECTRON-651 - Assign focused window to the screen picker which disables user interaction with the content below * ELECTRON-651 - Fix jest-html-reporter's path in jest config * ELECTRON-651 - Fix unit tests
This commit is contained in:
committed by
Vishwas Shashidhar
parent
9dba7521fc
commit
5a0576402c
@@ -79,6 +79,10 @@ function openScreenPickerWindow(eventSender, sources, id) {
|
|||||||
windowConfig.x = Math.round(centerX - (windowWidth / 2.0));
|
windowConfig.x = Math.round(centerX - (windowWidth / 2.0));
|
||||||
windowConfig.y = Math.round(centerY - (windowHeight / 2.0));
|
windowConfig.y = Math.round(centerY - (windowHeight / 2.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isWindowsOS) {
|
||||||
|
windowConfig.parent = focusedWindow;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store the window ref to send event
|
// Store the window ref to send event
|
||||||
|
|||||||
@@ -70,11 +70,11 @@ const ipcRenderer = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
require: jest.genMockFunction(),
|
require: jest.fn(),
|
||||||
match: jest.genMockFunction(),
|
match: jest.fn(),
|
||||||
app: jest.genMockFunction(),
|
app: jest.fn(),
|
||||||
ipcMain: ipcMain,
|
ipcMain: ipcMain,
|
||||||
ipcRenderer: ipcRenderer,
|
ipcRenderer: ipcRenderer,
|
||||||
remote: jest.genMockFunction(),
|
remote: jest.fn(),
|
||||||
dialog: jest.genMockFunction()
|
dialog: jest.fn()
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ describe('read/write config tests', function() {
|
|||||||
|
|
||||||
return updateConfigField('url2', 'hello world')
|
return updateConfigField('url2', 'hello world')
|
||||||
.catch(function (err) {
|
.catch(function (err) {
|
||||||
expect(err).toThrow(err);
|
expect(err.message).toBe('Path must be a string. Received null');
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -309,7 +309,7 @@ describe('read/write config tests', function() {
|
|||||||
|
|
||||||
return saveUserConfig('url2', 'hello world')
|
return saveUserConfig('url2', 'hello world')
|
||||||
.catch(function (err) {
|
.catch(function (err) {
|
||||||
expect(err).toThrow(err);
|
expect(err.message).toBe('Path must be a string. Received null');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"testMatch": ["**/*.test.js"],
|
"testMatch": ["**/*.test.js"],
|
||||||
"verbose": true,
|
"verbose": true,
|
||||||
"testResultsProcessor": "./node_modules/jest-html-reporter"
|
"testResultsProcessor": "../node_modules/jest-html-reporter"
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user