Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
logging-scratch-gui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Goessmann
logging-scratch-gui
Commits
b2117d79
Commit
b2117d79
authored
6 years ago
by
Paul Kaplan
Browse files
Options
Downloads
Patches
Plain Diff
Force deny getUserMedia in tests, see if that works on travis
parent
1c9f4c67
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/helpers/selenium-helper.js
+2
-3
2 additions, 3 deletions
test/helpers/selenium-helper.js
test/integration/blocks.test.js
+5
-1
5 additions, 1 deletion
test/integration/blocks.test.js
with
7 additions
and
4 deletions
test/helpers/selenium-helper.js
+
2
−
3
View file @
b2117d79
...
...
@@ -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
({
...
...
This diff is collapsed.
Click to expand it.
test/integration/blocks.test.js
+
5
−
1
View file @
b2117d79
...
...
@@ -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
([]);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment