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
1852dfa3
Commit
1852dfa3
authored
Aug 12, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds type for shared note specs
parent
1e41440b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
9 deletions
+15
-9
spec/features/reportable_note/commit_spec.rb
spec/features/reportable_note/commit_spec.rb
+2
-2
spec/features/reportable_note/issue_spec.rb
spec/features/reportable_note/issue_spec.rb
+1
-1
spec/features/reportable_note/merge_request_spec.rb
spec/features/reportable_note/merge_request_spec.rb
+2
-2
spec/features/reportable_note/snippets_spec.rb
spec/features/reportable_note/snippets_spec.rb
+1
-1
spec/support/features/reportable_note_shared_examples.rb
spec/support/features/reportable_note_shared_examples.rb
+9
-3
No files found.
spec/features/reportable_note/commit_spec.rb
View file @
1852dfa3
...
...
@@ -18,7 +18,7 @@ describe 'Reportable note on commit', :js do
visit
project_commit_path
(
project
,
sample_commit
.
id
)
end
it_behaves_like
'reportable note'
it_behaves_like
'reportable note'
,
'commit'
end
context
'a diff note'
do
...
...
@@ -28,6 +28,6 @@ describe 'Reportable note on commit', :js do
visit
project_commit_path
(
project
,
sample_commit
.
id
)
end
it_behaves_like
'reportable note'
it_behaves_like
'reportable note'
,
'commit'
end
end
spec/features/reportable_note/issue_spec.rb
View file @
1852dfa3
...
...
@@ -13,5 +13,5 @@ describe 'Reportable note on issue', :js do
visit
project_issue_path
(
project
,
issue
)
end
it_behaves_like
'reportable note'
it_behaves_like
'reportable note'
,
'issue'
end
spec/features/reportable_note/merge_request_spec.rb
View file @
1852dfa3
...
...
@@ -15,12 +15,12 @@ describe 'Reportable note on merge request', :js do
context
'a normal note'
do
let!
(
:note
)
{
create
(
:note_on_merge_request
,
noteable:
merge_request
,
project:
project
)
}
it_behaves_like
'reportable note'
it_behaves_like
'reportable note'
,
'merge_request'
end
context
'a diff note'
do
let!
(
:note
)
{
create
(
:diff_note_on_merge_request
,
noteable:
merge_request
,
project:
project
)
}
it_behaves_like
'reportable note'
it_behaves_like
'reportable note'
,
'merge_request'
end
end
spec/features/reportable_note/snippets_spec.rb
View file @
1852dfa3
...
...
@@ -17,6 +17,6 @@ describe 'Reportable note on snippets', :js do
visit
project_snippet_path
(
project
,
snippet
)
end
it_behaves_like
'reportable note'
it_behaves_like
'reportable note'
,
'snippets'
end
end
spec/support/features/reportable_note_shared_examples.rb
View file @
1852dfa3
require
'spec_helper'
shared_examples
'reportable note'
do
shared_examples
'reportable note'
do
|
type
|
include
NotesHelper
let
(
:comment
)
{
find
(
"#
#{
ActionView
::
RecordIdentifier
.
dom_id
(
note
)
}
"
)
}
...
...
@@ -15,8 +15,14 @@ shared_examples 'reportable note' do
dropdown
=
comment
.
find
(
more_actions_selector
)
open_dropdown
(
dropdown
)
expect
(
dropdown
).
to
have_button
(
'Edit comment'
)
expect
(
dropdown
).
to
have_button
(
'Delete comment'
)
if
type
==
'issue'
expect
(
dropdown
).
to
have_button
(
'Edit comment'
)
expect
(
dropdown
).
to
have_button
(
'Delete comment'
)
else
expect
(
dropdown
).
to
have_link
(
'Edit comment'
)
expect
(
dropdown
).
to
have_link
(
'Delete comment'
)
end
expect
(
dropdown
).
to
have_link
(
'Report as abuse'
,
href:
abuse_report_path
)
end
...
...
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