mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
update bluetooth test to handle bluetooth permission denied
This commit is contained in:
@@ -1631,6 +1631,6 @@ describe('navigator.bluetooth', () => {
|
||||
it('can request bluetooth devices', async () => {
|
||||
const bluetooth = await w.webContents.executeJavaScript(`
|
||||
navigator.bluetooth.requestDevice({ acceptAllDevices: true}).then(device => "Found a device!").catch(err => err.message);`, true);
|
||||
expect(bluetooth).to.be.oneOf(['Found a device!', 'Bluetooth adapter not available.']);
|
||||
expect(bluetooth).to.be.oneOf(['Found a device!', 'Bluetooth adapter not available.', 'User cancelled the requestDevice() chooser.']);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user