update bluetooth test to handle bluetooth permission denied

This commit is contained in:
John Kleinschmidt
2021-02-25 10:17:51 -05:00
parent dcd1c75740
commit 1c7ca277cc

View File

@@ -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.']);
});
});