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
6b7fdd28
Commit
6b7fdd28
authored
Jun 14, 2019
by
Michel Engelen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated tests for !29553
parent
c08aecff
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
spec/features/merge_request/user_sees_discussions_spec.rb
spec/features/merge_request/user_sees_discussions_spec.rb
+4
-4
spec/features/merge_request/user_sees_merge_button_depending_on_unresolved_discussions_spec.rb
..._merge_button_depending_on_unresolved_discussions_spec.rb
+6
-6
No files found.
spec/features/merge_request/user_sees_discussions_spec.rb
View file @
6b7fdd28
require
'rails_helper'
describe
'Merge request > User sees
discussion
s'
,
:js
do
describe
'Merge request > User sees
thread
s'
,
:js
do
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
let
(
:user
)
{
project
.
creator
}
let
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
)
}
...
...
@@ -30,7 +30,7 @@ describe 'Merge request > User sees discussions', :js do
visit
project_merge_request_path
(
project
,
merge_request
)
end
context
'active
discussion
s'
do
context
'active
thread
s'
do
it
'shows a link to the diff'
do
within
(
".discussion[data-discussion-id='
#{
active_discussion
.
id
}
']"
)
do
path
=
diffs_project_merge_request_path
(
project
,
merge_request
,
anchor:
active_discussion
.
line_code
)
...
...
@@ -39,7 +39,7 @@ describe 'Merge request > User sees discussions', :js do
end
end
context
'outdated
discussion
s'
do
context
'outdated
thread
s'
do
it
'shows a link to the outdated diff'
do
within
(
".discussion[data-discussion-id='
#{
outdated_discussion
.
id
}
']"
)
do
path
=
diffs_project_merge_request_path
(
project
,
merge_request
,
diff_id:
old_merge_request_diff
.
id
,
anchor:
outdated_discussion
.
line_code
)
...
...
@@ -85,7 +85,7 @@ describe 'Merge request > User sees discussions', :js do
it_behaves_like
'a functional discussion'
it
'displays correct header'
do
expect
(
page
).
to
have_content
"started a
discussion
on commit
#{
note
.
commit_id
[
0
...
7
]
}
"
expect
(
page
).
to
have_content
"started a
thread
on commit
#{
note
.
commit_id
[
0
...
7
]
}
"
end
end
...
...
spec/features/merge_request/user_sees_merge_button_depending_on_unresolved_discussions_spec.rb
View file @
6b7fdd28
require
'rails_helper'
describe
'Merge request > User sees merge button depending on unresolved
discussion
s'
,
:js
do
describe
'Merge request > User sees merge button depending on unresolved
thread
s'
,
:js
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
project
.
creator
}
let!
(
:merge_request
)
{
create
(
:merge_request_with_diff_notes
,
source_project:
project
,
author:
user
)
}
...
...
@@ -16,14 +16,14 @@ describe 'Merge request > User sees merge button depending on unresolved discuss
visit
project_merge_request_path
(
project
,
merge_request
)
end
context
'with unresolved
discussion
s'
do
context
'with unresolved
thread
s'
do
it
'does not allow to merge'
do
expect
(
page
).
not_to
have_button
'Merge'
expect
(
page
).
to
have_content
(
'There are unresolved
discussion
s.'
)
expect
(
page
).
to
have_content
(
'There are unresolved
thread
s.'
)
end
end
context
'with all
discussion
s resolved'
do
context
'with all
thread
s resolved'
do
before
do
merge_request
.
discussions
.
each
{
|
d
|
d
.
resolve!
(
user
)
}
visit
project_merge_request_path
(
project
,
merge_request
)
...
...
@@ -41,13 +41,13 @@ describe 'Merge request > User sees merge button depending on unresolved discuss
visit
project_merge_request_path
(
project
,
merge_request
)
end
context
'with unresolved
discussion
s'
do
context
'with unresolved
thread
s'
do
it
'does not allow to merge'
do
expect
(
page
).
to
have_button
'Merge'
end
end
context
'with all
discussion
s resolved'
do
context
'with all
thread
s resolved'
do
before
do
merge_request
.
discussions
.
each
{
|
d
|
d
.
resolve!
(
user
)
}
visit
project_merge_request_path
(
project
,
merge_request
)
...
...
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