BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
19 deletions
+29
-19
Gemfile
qa/Gemfile
+1
-1
Gemfile.lock
qa/Gemfile.lock
+10
-0
config.rb
qa/qa/specs/config.rb
+18
-17
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'
...
@@ -2,6 +2,6 @@ source 'https://rubygems.org'
gem
'capybara'
,
'~> 2.12.1'
gem
'capybara'
,
'~> 2.12.1'
gem
'capybara-screenshot'
,
'~> 1.0.14'
gem
'capybara-screenshot'
,
'~> 1.0.14'
gem
'capybara-webkit'
,
'~> 1.12.0'
gem
'rake'
,
'~> 12.0.0'
gem
'rake'
,
'~> 12.0.0'
gem
'rspec'
,
'~> 3.5'
gem
'rspec'
,
'~> 3.5'
gem
'selenium-webdriver'
,
'~> 2.53'
qa/Gemfile.lock
View file @
6984c2ee
...
@@ -16,7 +16,10 @@ GEM
...
@@ -16,7 +16,10 @@ GEM
capybara-webkit (1.12.0)
capybara-webkit (1.12.0)
capybara (>= 2.3.0, < 2.13.0)
capybara (>= 2.3.0, < 2.13.0)
json
json
childprocess (0.7.0)
ffi (~> 1.0, >= 1.0.11)
diff-lcs (1.3)
diff-lcs (1.3)
ffi (1.9.18)
json (2.0.3)
json (2.0.3)
launchy (2.4.3)
launchy (2.4.3)
addressable (~> 2.3)
addressable (~> 2.3)
...
@@ -44,6 +47,12 @@ GEM
...
@@ -44,6 +47,12 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-support (~> 3.5.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)
xpath (2.0.0)
nokogiri (~> 1.3)
nokogiri (~> 1.3)
...
@@ -56,6 +65,7 @@ DEPENDENCIES
...
@@ -56,6 +65,7 @@ DEPENDENCIES
capybara-webkit (~> 1.12.0)
capybara-webkit (~> 1.12.0)
rake (~> 12.0.0)
rake (~> 12.0.0)
rspec (~> 3.5)
rspec (~> 3.5)
selenium-webdriver (~> 2.53)
BUNDLED WITH
BUNDLED WITH
1.14.6
1.14.6
qa/qa/specs/config.rb
View file @
6984c2ee
require
'rspec/core'
require
'rspec/core'
require
'capybara/rspec'
require
'capybara/rspec'
require
'capybara-webkit'
require
'capybara-screenshot/rspec'
require
'capybara-screenshot/rspec'
require
'selenium-webdriver'
# rubocop:disable Metrics/MethodLength
# rubocop:disable Metrics/MethodLength
# rubocop:disable Metrics/LineLength
# rubocop:disable Metrics/LineLength
...
@@ -20,7 +20,6 @@ module QA
...
@@ -20,7 +20,6 @@ module QA
configure_rspec!
configure_rspec!
configure_capybara!
configure_capybara!
configure_webkit!
end
end
def
configure_rspec!
def
configure_rspec!
...
@@ -43,9 +42,9 @@ module QA
...
@@ -43,9 +42,9 @@ module QA
config
.
order
=
:random
config
.
order
=
:random
Kernel
.
srand
config
.
seed
Kernel
.
srand
config
.
seed
config
.
before
(
:all
)
do
#
config.before(:all) do
page
.
current_window
.
resize_to
(
1200
,
1800
)
#
page.current_window.resize_to(1200, 1800)
end
#
end
config
.
formatter
=
:documentation
config
.
formatter
=
:documentation
config
.
color
=
true
config
.
color
=
true
...
@@ -53,26 +52,28 @@ module QA
...
@@ -53,26 +52,28 @@ module QA
end
end
def
configure_capybara!
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
|
Capybara
.
configure
do
|
config
|
config
.
app_host
=
@address
config
.
app_host
=
@address
config
.
default_driver
=
:
webkit
config
.
default_driver
=
:
chrome
config
.
javascript_driver
=
:
webkit
config
.
javascript_driver
=
:
chrome
config
.
default_max_wait_time
=
4
config
.
default_max_wait_time
=
4
# https://github.com/mattheworiordan/capybara-screenshot/issues/164
# https://github.com/mattheworiordan/capybara-screenshot/issues/164
config
.
save_path
=
'tmp'
config
.
save_path
=
'tmp'
end
end
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
end
end
end
qa/spec/spec_helper.rb
View file @
6984c2ee
...
@@ -12,7 +12,6 @@ RSpec.configure do |config|
...
@@ -12,7 +12,6 @@ RSpec.configure do |config|
config
.
shared_context_metadata_behavior
=
:apply_to_host_groups
config
.
shared_context_metadata_behavior
=
:apply_to_host_groups
config
.
disable_monkey_patching!
config
.
disable_monkey_patching!
config
.
expose_dsl_globally
=
true
config
.
expose_dsl_globally
=
true
config
.
warnings
=
true
config
.
profile_examples
=
10
config
.
profile_examples
=
10
config
.
order
=
:random
config
.
order
=
:random
Kernel
.
srand
config
.
seed
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