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
04a8d3aa
Commit
04a8d3aa
authored
Jan 03, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
494dfe89
97e526d8
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
110 additions
and
36 deletions
+110
-36
app/assets/javascripts/notes/components/toggle_replies_widget.vue
...ts/javascripts/notes/components/toggle_replies_widget.vue
+6
-2
changelogs/unreleased/deprecated-positional-spec-arguments.yml
...elogs/unreleased/deprecated-positional-spec-arguments.yml
+5
-0
qa/qa.rb
qa/qa.rb
+1
-0
qa/qa/page/component/note.rb
qa/qa/page/component/note.rb
+51
-0
qa/qa/page/merge_request/show.rb
qa/qa/page/merge_request/show.rb
+0
-25
qa/qa/page/project/issue/show.rb
qa/qa/page/project/issue/show.rb
+1
-0
qa/qa/specs/features/browser_ui/2_plan/issue/collapse_comments_in_discussions_spec.rb
..._ui/2_plan/issue/collapse_comments_in_discussions_spec.rb
+37
-0
spec/controllers/projects/merge_requests_controller_spec.rb
spec/controllers/projects/merge_requests_controller_spec.rb
+4
-4
spec/controllers/projects/snippets_controller_spec.rb
spec/controllers/projects/snippets_controller_spec.rb
+1
-1
spec/controllers/projects_controller_spec.rb
spec/controllers/projects_controller_spec.rb
+1
-1
spec/controllers/snippets_controller_spec.rb
spec/controllers/snippets_controller_spec.rb
+3
-3
No files found.
app/assets/javascripts/notes/components/toggle_replies_widget.vue
View file @
04a8d3aa
...
...
@@ -57,7 +57,7 @@ export default {
tooltip-placement=
"bottom"
/>
</div>
<button
class=
"btn btn-link js-replies-text"
type=
"button"
@
click=
"toggle"
>
<button
class=
"btn btn-link js-replies-text
qa-expand-replies
"
type=
"button"
@
click=
"toggle"
>
{{
replies
.
length
}}
{{
n__
(
'
reply
'
,
'
replies
'
,
replies
.
length
)
}}
</button>
{{
__
(
'
Last reply by
'
)
}}
...
...
@@ -66,7 +66,11 @@ export default {
</a>
<time-ago-tooltip
:time=
"lastReply.created_at"
tooltip-placement=
"bottom"
/>
</
template
>
<span
v-else
class=
"collapse-replies-btn js-collapse-replies"
@
click=
"toggle"
>
<span
v-else
class=
"collapse-replies-btn js-collapse-replies qa-collapse-replies"
@
click=
"toggle"
>
<icon
name=
"chevron-down"
/>
{{ s__('Notes|Collapse replies') }}
</span>
</li>
...
...
changelogs/unreleased/deprecated-positional-spec-arguments.yml
0 → 100644
View file @
04a8d3aa
---
title
:
'
Fix
deprecation:
Using
positional
arguments
in
integration
tests'
merge_request
:
24110
author
:
Jasper Maes
type
:
other
qa/qa.rb
View file @
04a8d3aa
...
...
@@ -283,6 +283,7 @@ module QA
autoload
:Select2
,
'qa/page/component/select2'
autoload
:DropdownFilter
,
'qa/page/component/dropdown_filter'
autoload
:UsersSelect
,
'qa/page/component/users_select'
autoload
:Note
,
'qa/page/component/note'
module
Issuable
autoload
:Common
,
'qa/page/component/issuable/common'
...
...
qa/qa/page/component/note.rb
0 → 100644
View file @
04a8d3aa
# frozen_string_literal: true
module
QA
module
Page
module
Component
module
Note
def
self
.
included
(
base
)
base
.
view
'app/assets/javascripts/notes/components/comment_form.vue'
do
element
:note_dropdown
element
:discussion_option
end
base
.
view
'app/assets/javascripts/notes/components/note_form.vue'
do
element
:reply_input
element
:reply_comment_button
end
base
.
view
'app/assets/javascripts/notes/components/noteable_discussion.vue'
do
element
:discussion_reply
end
base
.
view
'app/assets/javascripts/notes/components/toggle_replies_widget.vue'
do
element
:expand_replies
element
:collapse_replies
end
end
def
start_discussion
(
text
)
fill_element
:comment_input
,
text
click_element
:note_dropdown
click_element
:discussion_option
click_element
:comment_button
end
def
reply_to_discussion
(
reply_text
)
all_elements
(
:discussion_reply
).
last
.
click
fill_element
:reply_input
,
reply_text
click_element
:reply_comment_button
end
def
collapse_replies
click_element
:collapse_replies
end
def
expand_replies
click_element
:expand_replies
end
end
end
end
end
qa/qa/page/merge_request/show.rb
View file @
04a8d3aa
...
...
@@ -36,19 +36,6 @@ module QA
element
:diff_comment
end
view
'app/assets/javascripts/notes/components/comment_form.vue'
do
element
:note_dropdown
element
:discussion_option
end
view
'app/assets/javascripts/notes/components/note_form.vue'
do
element
:reply_input
end
view
'app/assets/javascripts/notes/components/noteable_discussion.vue'
do
element
:discussion_reply
end
view
'app/assets/javascripts/diffs/components/inline_diff_table_row.vue'
do
element
:new_diff_line
end
...
...
@@ -165,18 +152,6 @@ module QA
fill_element
:reply_input
,
text
end
def
start_discussion
(
text
)
fill_element
:comment_input
,
text
click_element
:note_dropdown
click_element
:discussion_option
click_element
:comment_button
end
def
reply_to_discussion
(
reply_text
)
all_elements
(
:discussion_reply
).
last
.
click
fill_element
:reply_input
,
reply_text
end
def
edit!
click_element
:edit_button
end
...
...
qa/qa/page/project/issue/show.rb
View file @
04a8d3aa
...
...
@@ -6,6 +6,7 @@ module QA
module
Issue
class
Show
<
Page
::
Base
include
Page
::
Component
::
Issuable
::
Common
include
Page
::
Component
::
Note
view
'app/views/shared/notes/_form.html.haml'
do
element
:new_note_form
,
'new-note'
# rubocop:disable QA/ElementWithPattern
...
...
qa/qa/specs/features/browser_ui/2_plan/issue/collapse_comments_in_discussions_spec.rb
0 → 100644
View file @
04a8d3aa
# frozen_string_literal: true
module
QA
context
'Plan'
do
describe
'collapse comments in issue discussions'
do
let
(
:issue_title
)
{
'issue title'
}
it
'user collapses reply for comments in an issue'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
perform
(
&
:sign_in_using_credentials
)
Resource
::
Issue
.
fabricate!
do
|
issue
|
issue
.
title
=
issue_title
end
expect
(
page
).
to
have_content
(
issue_title
)
Page
::
Project
::
Issue
::
Show
.
perform
do
|
show_page
|
show_page
.
select_all_activities_filter
show_page
.
start_discussion
(
"My first discussion"
)
expect
(
show_page
).
to
have_content
(
"My first discussion"
)
show_page
.
reply_to_discussion
(
"My First Reply"
)
expect
(
show_page
).
to
have_content
(
"My First Reply"
)
show_page
.
collapse_replies
expect
(
show_page
).
to
have_content
(
"1 reply"
)
expect
(
show_page
).
not_to
have_content
(
"My First Reply"
)
show_page
.
expand_replies
expect
(
show_page
).
to
have_content
(
"My First Reply"
)
expect
(
show_page
).
not_to
have_content
(
"1 reply"
)
end
end
end
end
end
spec/controllers/projects/merge_requests_controller_spec.rb
View file @
04a8d3aa
...
...
@@ -950,7 +950,7 @@ describe Projects::MergeRequestsController do
end
it
'returns 200'
do
get
:discussions
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
merge_request
.
iid
get
:discussions
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
merge_request
.
iid
}
expect
(
response
.
status
).
to
eq
(
200
)
end
...
...
@@ -969,7 +969,7 @@ describe Projects::MergeRequestsController do
expect
(
collection
).
to
receive
(
:find_by_id
).
with
(
note_diff_file
.
id
).
and_call_original
end
get
:discussions
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
merge_request
.
iid
get
:discussions
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
merge_request
.
iid
}
end
end
...
...
@@ -986,7 +986,7 @@ describe Projects::MergeRequestsController do
expect
(
collection
).
to
receive
(
:find_by_id
).
with
(
note_diff_file
.
id
).
and_call_original
end
get
:discussions
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
merge_request
.
iid
get
:discussions
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
merge_request
.
iid
}
end
it
'does not preload highlights when diff note is resolved'
do
...
...
@@ -999,7 +999,7 @@ describe Projects::MergeRequestsController do
expect
(
collection
).
to
receive
(
:find_by_id
).
with
(
note_diff_file
.
id
).
and_call_original
end
get
:discussions
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
merge_request
.
iid
get
:discussions
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
merge_request
.
iid
}
end
end
end
...
...
spec/controllers/projects/snippets_controller_spec.rb
View file @
04a8d3aa
...
...
@@ -385,7 +385,7 @@ describe Projects::SnippetsController do
before
do
sign_in
(
user
)
get
:show
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
project_snippet
.
to_param
,
format: :js
get
:show
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
project_snippet
.
to_param
}
,
format: :js
end
context
'when snippet is private'
do
...
...
spec/controllers/projects_controller_spec.rb
View file @
04a8d3aa
...
...
@@ -690,7 +690,7 @@ describe ProjectsController do
project
.
add_guest
(
user
)
sign_in
(
user
)
get
:refs
,
namespace_id:
project
.
namespace
,
id:
project
get
:refs
,
params:
{
namespace_id:
project
.
namespace
,
id:
project
}
expect
(
response
).
to
have_gitlab_http_status
(
404
)
end
...
...
spec/controllers/snippets_controller_spec.rb
View file @
04a8d3aa
...
...
@@ -82,7 +82,7 @@ describe SnippetsController do
end
it
'responds with status 404 when embeddable content is requested'
do
get
:show
,
id:
personal_snippet
.
to_param
,
format: :js
get
:show
,
params:
{
id:
personal_snippet
.
to_param
}
,
format: :js
expect
(
response
).
to
have_gitlab_http_status
(
404
)
end
...
...
@@ -114,7 +114,7 @@ describe SnippetsController do
end
it
'responds with status 404 when embeddable content is requested'
do
get
:show
,
id:
personal_snippet
.
to_param
,
format: :js
get
:show
,
params:
{
id:
personal_snippet
.
to_param
}
,
format: :js
expect
(
response
).
to
have_gitlab_http_status
(
404
)
end
...
...
@@ -145,7 +145,7 @@ describe SnippetsController do
end
it
'responds with status 200 when embeddable content is requested'
do
get
:show
,
id:
personal_snippet
.
to_param
,
format: :js
get
:show
,
params:
{
id:
personal_snippet
.
to_param
}
,
format: :js
expect
(
assigns
(
:snippet
)).
to
eq
(
personal_snippet
)
expect
(
response
).
to
have_gitlab_http_status
(
200
)
...
...
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