+3
-2
@@ -287,14 +287,15 @@ test('camera Allow now starts a grant even when Camera access is off', async ()
|
||||
} finally { await daemon.close(); }
|
||||
});
|
||||
|
||||
test('a failed camera portal does not revoke an Allow now grant', async () => {
|
||||
test('a failed camera permission request revokes the grant instead of showing active access', async () => {
|
||||
const daemon = new JarvisDaemon();
|
||||
try {
|
||||
daemon.webcam = { access: async () => { throw new Error('Camera portal Access response 2'); } };
|
||||
daemon.webcamGrant();
|
||||
await Promise.resolve();
|
||||
await Promise.resolve();
|
||||
assert.equal(daemon.camera.status().active, true);
|
||||
assert.equal(daemon.camera.status().active, false);
|
||||
assert.equal(daemon.camera.status().backend, 'none');
|
||||
} finally { await daemon.close(); }
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user