Fix media permissions failure on Calls window (#2550)

This commit is contained in:
Claudio Costa
2023-02-10 11:13:31 -06:00
committed by GitHub
parent 8dbdb0a75e
commit 562ef14aef
4 changed files with 65 additions and 0 deletions

View File

@@ -358,5 +358,26 @@ describe('main/windows/callsWidgetWindow', () => {
expect(popOut.focus).toHaveBeenCalled();
expect(popOut.restore).toHaveBeenCalled();
});
it('getWebContentsId', () => {
baseWindow.webContents = {
...baseWindow.webContents,
id: 'testID',
};
const widgetWindow = new CallsWidgetWindow(mainWindow, mainView, widgetConfig);
expect(widgetWindow.getWebContentsId()).toBe('testID');
});
it('getURL', () => {
baseWindow.webContents = {
...baseWindow.webContents,
id: 'testID',
getURL: jest.fn(() => 'http://localhost:8065/'),
};
const widgetWindow = new CallsWidgetWindow(mainWindow, mainView, widgetConfig);
expect(widgetWindow.getURL().toString()).toBe('http://localhost:8065/');
});
});
});