Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
dc5dc34d
Commit
dc5dc34d
authored
Jul 05, 2021
by
Andrejs Cunskis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix headless setting
parent
7e8235a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
qa/qa/runtime/env.rb
qa/qa/runtime/env.rb
+7
-3
qa/spec/runtime/env_spec.rb
qa/spec/runtime/env_spec.rb
+0
-5
No files found.
qa/qa/runtime/env.rb
View file @
dc5dc34d
...
...
@@ -71,7 +71,9 @@ module QA
ActiveSupport
::
Deprecation
.
warn
(
"CHROME_HEADLESS is deprecated. Use WEBDRIVER_HEADLESS instead."
)
end
enabled?
(
ENV
[
'WEBDRIVER_HEADLESS'
])
||
enabled?
(
ENV
[
'CHROME_HEADLESS'
])
return
enabled?
(
ENV
[
'WEBDRIVER_HEADLESS'
])
unless
ENV
[
'WEBDRIVER_HEADLESS'
].
nil?
enabled?
(
ENV
[
'CHROME_HEADLESS'
])
end
# set to 'true' to have Chrome use a fixed profile directory
...
...
@@ -336,7 +338,7 @@ module QA
# the feature is supported in the environment under test.
# All features are supported by default.
def
can_test?
(
feature
)
raise
ArgumentError
,
%
Q
(Unknown feature "
#{
feature
}
")
unless
SUPPORTED_FEATURES
.
include?
feature
raise
ArgumentError
,
%(Unknown feature "#{feature}")
unless
SUPPORTED_FEATURES
.
include?
feature
enabled?
(
ENV
[
SUPPORTED_FEATURES
[
feature
]],
default:
true
)
end
...
...
@@ -398,7 +400,9 @@ module QA
def
remote_grid_credentials
if
remote_grid_username
raise
ArgumentError
,
%Q(Please provide an access key for user "
#{
remote_grid_username
}
")
unless
remote_grid_access_key
unless
remote_grid_access_key
raise
ArgumentError
,
%(Please provide an access key for user "#{remote_grid_username}")
end
return
"
#{
remote_grid_username
}
:
#{
remote_grid_access_key
}
@"
end
...
...
qa/spec/runtime/env_spec.rb
View file @
dc5dc34d
...
...
@@ -55,11 +55,6 @@ RSpec.describe QA::Runtime::Env do
end
describe
'.webdriver_headless?'
do
before
do
# We need to set this because we have a fallback for CHROME_HEADLESS
stub_env
(
'CHROME_HEADLESS'
,
'false'
)
end
it_behaves_like
'boolean method'
,
method: :webdriver_headless?
,
env_key:
'WEBDRIVER_HEADLESS'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment