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
a5ab2a5e
Commit
a5ab2a5e
authored
Nov 10, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not require to set Capybara app_host in RSpec
parent
14238ee2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
19 deletions
+14
-19
qa/qa/page/main/entry.rb
qa/qa/page/main/entry.rb
+1
-1
qa/qa/scenario/entrypoint.rb
qa/qa/scenario/entrypoint.rb
+12
-11
qa/qa/specs/config.rb
qa/qa/specs/config.rb
+1
-7
No files found.
qa/qa/page/main/entry.rb
View file @
a5ab2a5e
...
@@ -3,7 +3,7 @@ module QA
...
@@ -3,7 +3,7 @@ module QA
module
Main
module
Main
class
Entry
<
Page
::
Base
class
Entry
<
Page
::
Base
def
initialize
def
initialize
visit
(
'/'
)
visit
(
Runtime
::
Scenario
.
gitlab_address
)
# This resolves cold boot / background tasks problems
# This resolves cold boot / background tasks problems
#
#
...
...
qa/qa/scenario/entrypoint.rb
View file @
a5ab2a5e
...
@@ -7,18 +7,9 @@ module QA
...
@@ -7,18 +7,9 @@ module QA
class
Entrypoint
<
Template
class
Entrypoint
<
Template
include
Bootable
include
Bootable
def
self
.
tags
(
*
tags
)
@tags
=
tags
end
def
self
.
get_tags
@tags
end
def
perform
(
address
,
*
files
)
def
perform
(
address
,
*
files
)
Specs
::
Config
.
perform
do
|
specs
|
Runtime
::
Scenario
.
define
(
:gitlab_address
,
address
)
specs
.
address
=
address
Specs
::
Config
.
perform
end
##
##
# Perform before hooks, which are different for CE and EE
# Perform before hooks, which are different for CE and EE
...
@@ -33,6 +24,16 @@ module QA
...
@@ -33,6 +24,16 @@ module QA
)
)
end
end
end
end
private
def
self
.
tags
(
*
tags
)
@tags
=
tags
end
def
self
.
get_tags
@tags
end
end
end
end
end
end
end
qa/qa/specs/config.rb
View file @
a5ab2a5e
...
@@ -11,13 +11,7 @@ module QA
...
@@ -11,13 +11,7 @@ module QA
class
Config
<
Scenario
::
Template
class
Config
<
Scenario
::
Template
attr_writer
:address
attr_writer
:address
def
initialize
@address
=
ENV
[
'GITLAB_URL'
]
end
def
perform
def
perform
raise
'Please configure GitLab address!'
unless
@address
configure_rspec!
configure_rspec!
configure_capybara!
configure_capybara!
end
end
...
@@ -56,7 +50,7 @@ module QA
...
@@ -56,7 +50,7 @@ module QA
end
end
Capybara
.
configure
do
|
config
|
Capybara
.
configure
do
|
config
|
config
.
app_host
=
@address
#
config.app_host = @address
config
.
default_driver
=
:chrome
config
.
default_driver
=
:chrome
config
.
javascript_driver
=
:chrome
config
.
javascript_driver
=
:chrome
config
.
default_max_wait_time
=
4
config
.
default_max_wait_time
=
4
...
...
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