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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
6984c2ee
Commit
6984c2ee
authored
May 24, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use headless chrome instead of webkit via QtWebkit
parent
ec2130be
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
19 deletions
+29
-19
qa/Gemfile
qa/Gemfile
+1
-1
qa/Gemfile.lock
qa/Gemfile.lock
+10
-0
qa/qa/specs/config.rb
qa/qa/specs/config.rb
+18
-17
qa/spec/spec_helper.rb
qa/spec/spec_helper.rb
+0
-1
No files found.
qa/Gemfile
View file @
6984c2ee
...
...
@@ -2,6 +2,6 @@ source 'https://rubygems.org'
gem
'capybara'
,
'~> 2.12.1'
gem
'capybara-screenshot'
,
'~> 1.0.14'
gem
'capybara-webkit'
,
'~> 1.12.0'
gem
'rake'
,
'~> 12.0.0'
gem
'rspec'
,
'~> 3.5'
gem
'selenium-webdriver'
,
'~> 2.53'
qa/Gemfile.lock
View file @
6984c2ee
...
...
@@ -16,7 +16,10 @@ GEM
capybara-webkit (1.12.0)
capybara (>= 2.3.0, < 2.13.0)
json
childprocess (0.7.0)
ffi (~> 1.0, >= 1.0.11)
diff-lcs (1.3)
ffi (1.9.18)
json (2.0.3)
launchy (2.4.3)
addressable (~> 2.3)
...
...
@@ -44,6 +47,12 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
rubyzip (1.2.1)
selenium-webdriver (2.53.4)
childprocess (~> 0.5)
rubyzip (~> 1.0)
websocket (~> 1.0)
websocket (1.2.4)
xpath (2.0.0)
nokogiri (~> 1.3)
...
...
@@ -56,6 +65,7 @@ DEPENDENCIES
capybara-webkit (~> 1.12.0)
rake (~> 12.0.0)
rspec (~> 3.5)
selenium-webdriver (~> 2.53)
BUNDLED WITH
1.14.6
qa/qa/specs/config.rb
View file @
6984c2ee
require
'rspec/core'
require
'capybara/rspec'
require
'capybara-webkit'
require
'capybara-screenshot/rspec'
require
'selenium-webdriver'
# rubocop:disable Metrics/MethodLength
# rubocop:disable Metrics/LineLength
...
...
@@ -20,7 +20,6 @@ module QA
configure_rspec!
configure_capybara!
configure_webkit!
end
def
configure_rspec!
...
...
@@ -43,9 +42,9 @@ module QA
config
.
order
=
:random
Kernel
.
srand
config
.
seed
config
.
before
(
:all
)
do
page
.
current_window
.
resize_to
(
1200
,
1800
)
end
#
config.before(:all) do
#
page.current_window.resize_to(1200, 1800)
#
end
config
.
formatter
=
:documentation
config
.
color
=
true
...
...
@@ -53,26 +52,28 @@ module QA
end
def
configure_capybara!
Capybara
.
register_driver
:chrome
do
|
app
|
capabilities
=
Selenium
::
WebDriver
::
Remote
::
Capabilities
.
chrome
(
'chromeOptions'
=>
{
'binary'
=>
'/opt/google/chrome-beta/google-chrome-beta'
,
'args'
=>
%w[headless disable-gpu]
}
)
Capybara
::
Selenium
::
Driver
.
new
(
app
,
browser: :chrome
,
desired_capabilities:
capabilities
)
end
Capybara
.
configure
do
|
config
|
config
.
app_host
=
@address
config
.
default_driver
=
:
webkit
config
.
javascript_driver
=
:
webkit
config
.
default_driver
=
:
chrome
config
.
javascript_driver
=
:
chrome
config
.
default_max_wait_time
=
4
# https://github.com/mattheworiordan/capybara-screenshot/issues/164
config
.
save_path
=
'tmp'
end
end
def
configure_webkit!
Capybara
::
Webkit
.
configure
do
|
config
|
config
.
allow_url
(
@address
)
config
.
block_unknown_urls
end
rescue
RuntimeError
# rubocop:disable Lint/HandleExceptions
# TODO, Webkit is already configured, this make this
# configuration step idempotent, should be improved.
end
end
end
end
qa/spec/spec_helper.rb
View file @
6984c2ee
...
...
@@ -12,7 +12,6 @@ RSpec.configure do |config|
config
.
shared_context_metadata_behavior
=
:apply_to_host_groups
config
.
disable_monkey_patching!
config
.
expose_dsl_globally
=
true
config
.
warnings
=
true
config
.
profile_examples
=
10
config
.
order
=
:random
Kernel
.
srand
config
.
seed
...
...
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