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
806ffd2c
Commit
806ffd2c
authored
Jun 15, 2017
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't include Capybara::DSL in the global scope
parent
619a7928
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
features/support/env.rb
features/support/env.rb
+0
-1
spec/support/wait_for_requests.rb
spec/support/wait_for_requests.rb
+2
-0
No files found.
features/support/env.rb
View file @
806ffd2c
...
@@ -32,7 +32,6 @@ end
...
@@ -32,7 +32,6 @@ end
Spinach
.
hooks
.
after_scenario
do
|
scenario_data
,
step_definitions
|
Spinach
.
hooks
.
after_scenario
do
|
scenario_data
,
step_definitions
|
if
scenario_data
.
tags
.
include?
(
'javascript'
)
if
scenario_data
.
tags
.
include?
(
'javascript'
)
include
Capybara
::
DSL
include
WaitForRequests
include
WaitForRequests
block_and_wait_for_requests_complete
block_and_wait_for_requests_complete
end
end
...
...
spec/support/wait_for_requests.rb
View file @
806ffd2c
...
@@ -3,6 +3,8 @@ require_relative './wait_for_requests'
...
@@ -3,6 +3,8 @@ require_relative './wait_for_requests'
module
WaitForRequests
module
WaitForRequests
extend
self
extend
self
include
Capybara
::
DSL
# This is inspired by http://www.salsify.com/blog/engineering/tearing-capybara-ajax-tests
# This is inspired by http://www.salsify.com/blog/engineering/tearing-capybara-ajax-tests
def
block_and_wait_for_requests_complete
def
block_and_wait_for_requests_complete
Gitlab
::
Testing
::
RequestBlockerMiddleware
.
block_requests!
Gitlab
::
Testing
::
RequestBlockerMiddleware
.
block_requests!
...
...
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