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
Boxiang Sun
gitlab-ce
Commits
ce7449ce
Commit
ce7449ce
authored
Oct 20, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clear localStorage after each capybara test (global)
parent
95d629a1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
8 deletions
+3
-8
spec/features/issues/gfm_autocomplete_spec.rb
spec/features/issues/gfm_autocomplete_spec.rb
+0
-4
spec/features/issues/markdown_toolbar_spec.rb
spec/features/issues/markdown_toolbar_spec.rb
+0
-4
spec/support/capybara.rb
spec/support/capybara.rb
+3
-0
No files found.
spec/features/issues/gfm_autocomplete_spec.rb
View file @
ce7449ce
...
@@ -16,10 +16,6 @@ feature 'GFM autocomplete', :js do
...
@@ -16,10 +16,6 @@ feature 'GFM autocomplete', :js do
wait_for_requests
wait_for_requests
end
end
after
do
execute_script
(
"localStorage.clear();"
)
end
it
'updates issue descripton with GFM reference'
do
it
'updates issue descripton with GFM reference'
do
find
(
'.issuable-edit'
).
click
find
(
'.issuable-edit'
).
click
...
...
spec/features/issues/markdown_toolbar_spec.rb
View file @
ce7449ce
...
@@ -11,10 +11,6 @@ feature 'Issue markdown toolbar', :js do
...
@@ -11,10 +11,6 @@ feature 'Issue markdown toolbar', :js do
visit
project_issue_path
(
project
,
issue
)
visit
project_issue_path
(
project
,
issue
)
end
end
after
do
execute_script
(
"localStorage.clear();"
)
end
it
"doesn't include first new line when adding bold"
do
it
"doesn't include first new line when adding bold"
do
find
(
'#note-body'
).
native
.
send_keys
(
'test'
)
find
(
'#note-body'
).
native
.
send_keys
(
'test'
)
find
(
'#note-body'
).
native
.
send_key
(
:enter
)
find
(
'#note-body'
).
native
.
send_key
(
:enter
)
...
...
spec/support/capybara.rb
View file @
ce7449ce
...
@@ -45,6 +45,9 @@ RSpec.configure do |config|
...
@@ -45,6 +45,9 @@ RSpec.configure do |config|
end
end
config
.
after
(
:example
,
:js
)
do
|
example
|
config
.
after
(
:example
,
:js
)
do
|
example
|
# prevent localstorage from introducing side effects based on test order
execute_script
(
"localStorage.clear();"
)
# capybara/rspec already calls Capybara.reset_sessions! in an `after` hook,
# capybara/rspec already calls Capybara.reset_sessions! in an `after` hook,
# but `block_and_wait_for_requests_complete` is called before it so by
# but `block_and_wait_for_requests_complete` is called before it so by
# calling it explicitely here, we prevent any new requests from being fired
# calling it explicitely here, we prevent any new requests from being fired
...
...
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