Skip to content
Snippets Groups Projects
Commit b2117d79 authored by Paul Kaplan's avatar Paul Kaplan
Browse files

Force deny getUserMedia in tests, see if that works on travis

parent 1c9f4c67
No related branches found
No related tags found
No related merge requests found
......@@ -49,9 +49,8 @@ class SeleniumHelper {
args.push('--headless');
}
// Stub getUserMedia to prevent permissions access issues
args.push('--use-fake-ui-for-media-stream');
args.push('--fake-device-for-media-stream');
// Stub getUserMedia to always not allow access
args.push('--use-fake-ui-for-media-stream=deny');
chromeCapabilities.set('chromeOptions', {args});
chromeCapabilities.setLoggingPrefs({
......
......@@ -158,7 +158,7 @@ describe('Working with the blocks', () => {
await expect(logs).toEqual([]);
});
test('Record option from sound block menu opens sound recorder', async () => {
test.only('Record option from sound block menu opens sound recorder', async () => {
await loadUri(uri);
await clickXpath('//button[@title="Try It"]');
await clickText('Code');
......@@ -166,6 +166,10 @@ describe('Working with the blocks', () => {
await new Promise(resolve => setTimeout(resolve, 1000)); // Wait for scroll animation
await clickText('Meow', scope.blocksTab); // Click "play sound <Meow> until done" block
await clickText('record'); // Click "record..." option in the block's sound menu
// Access has been force denied, so close the alert that comes up
await driver.sleep(1000); // getUserMedia requests are very slow to fail for some reason
await driver.switchTo().alert()
.accept();
await findByText('Record Sound'); // Sound recorder is open
const logs = await getLogs();
await expect(logs).toEqual([]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment