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
6b4b88eb
Commit
6b4b88eb
authored
May 13, 2021
by
Désirée Chevalier
Committed by
Dan Davison
May 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update e2e selectors and page objects for diffs
parent
32474423
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
99 additions
and
147 deletions
+99
-147
app/assets/javascripts/batch_comments/components/preview_dropdown.vue
...avascripts/batch_comments/components/preview_dropdown.vue
+1
-1
app/assets/javascripts/diffs/components/commit_item.vue
app/assets/javascripts/diffs/components/commit_item.vue
+1
-1
app/assets/javascripts/diffs/components/diff_row.vue
app/assets/javascripts/diffs/components/diff_row.vue
+3
-2
app/assets/javascripts/diffs/components/inline_diff_table_row.vue
...ts/javascripts/diffs/components/inline_diff_table_row.vue
+0
-1
app/assets/javascripts/diffs/components/parallel_diff_table_row.vue
.../javascripts/diffs/components/parallel_diff_table_row.vue
+2
-2
app/assets/javascripts/notes/components/note_form.vue
app/assets/javascripts/notes/components/note_form.vue
+2
-12
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_enabled.vue
...widget/components/states/mr_widget_auto_merge_enabled.vue
+1
-1
app/assets/javascripts/vue_shared/components/markdown/apply_suggestion.vue
...ripts/vue_shared/components/markdown/apply_suggestion.vue
+2
-2
app/assets/javascripts/vue_shared/components/markdown/suggestion_diff.vue
...cripts/vue_shared/components/markdown/suggestion_diff.vue
+1
-1
app/views/projects/merge_requests/_description.html.haml
app/views/projects/merge_requests/_description.html.haml
+1
-1
app/views/projects/merge_requests/_mr_box.html.haml
app/views/projects/merge_requests/_mr_box.html.haml
+1
-1
app/views/shared/_commit_message_container.html.haml
app/views/shared/_commit_message_container.html.haml
+7
-5
qa/qa/page/file/shared/commit_message.rb
qa/qa/page/file/shared/commit_message.rb
+2
-2
qa/qa/page/merge_request/show.rb
qa/qa/page/merge_request/show.rb
+65
-102
qa/qa/specs/features/ee/browser_ui/3_create/merge_request/add_batch_comments_in_merge_request_spec.rb
...merge_request/add_batch_comments_in_merge_request_spec.rb
+1
-1
spec/features/markdown/copy_as_gfm_spec.rb
spec/features/markdown/copy_as_gfm_spec.rb
+2
-2
spec/frontend/diffs/components/inline_diff_table_row_spec.js
spec/frontend/diffs/components/inline_diff_table_row_spec.js
+6
-7
spec/frontend/vue_mr_widget/components/states/__snapshots__/mr_widget_auto_merge_enabled_spec.js.snap
...s/__snapshots__/mr_widget_auto_merge_enabled_spec.js.snap
+0
-2
spec/frontend/vue_shared/components/markdown/__snapshots__/suggestion_diff_spec.js.snap
...nents/markdown/__snapshots__/suggestion_diff_spec.js.snap
+1
-1
No files found.
app/assets/javascripts/batch_comments/components/preview_dropdown.vue
View file @
6b4b88eb
...
@@ -35,7 +35,7 @@ export default {
...
@@ -35,7 +35,7 @@ export default {
<gl-dropdown
<gl-dropdown
:header-text=
"n__('%d pending comment', '%d pending comments', draftsCount)"
:header-text=
"n__('%d pending comment', '%d pending comments', draftsCount)"
dropup
dropup
toggle-class=
"qa-review-preview-toggle
"
data-qa-selector=
"review_preview_dropdown
"
>
>
<template
#button-content
>
<template
#button-content
>
{{
__
(
'
Pending comments
'
)
}}
{{
__
(
'
Pending comments
'
)
}}
...
...
app/assets/javascripts/diffs/components/commit_item.vue
View file @
6b4b88eb
...
@@ -138,7 +138,7 @@ export default {
...
@@ -138,7 +138,7 @@ export default {
/>
/>
</div>
</div>
<div
class=
"commit-detail flex-list"
>
<div
class=
"commit-detail flex-list"
>
<div
class=
"commit-content
qa-commit-
content"
>
<div
class=
"commit-content
"
data-qa-selector=
"commit_
content"
>
<a
<a
:href=
"commit.commit_url"
:href=
"commit.commit_url"
class=
"commit-row-message item-title"
class=
"commit-row-message item-title"
...
...
app/assets/javascripts/diffs/components/diff_row.vue
View file @
6b4b88eb
...
@@ -206,6 +206,7 @@ export default {
...
@@ -206,6 +206,7 @@ export default {
:class=
"classNameMapCellLeft"
:class=
"classNameMapCellLeft"
data-testid=
"left-line-number"
data-testid=
"left-line-number"
class=
"diff-td diff-line-num"
class=
"diff-td diff-line-num"
data-qa-selector=
"new_diff_line_link"
>
>
<template
v-if=
"!isLeftConflictMarker"
>
<template
v-if=
"!isLeftConflictMarker"
>
<span
<span
...
@@ -220,7 +221,7 @@ export default {
...
@@ -220,7 +221,7 @@ export default {
tabindex=
"0"
tabindex=
"0"
:draggable=
"!line.left.commentsDisabled && glFeatures.dragCommentSelection"
:draggable=
"!line.left.commentsDisabled && glFeatures.dragCommentSelection"
type=
"button"
type=
"button"
class=
"add-diff-note unified-diff-components-diff-note-button note-button js-add-diff-note-button
qa-diff-comment
"
class=
"add-diff-note unified-diff-components-diff-note-button note-button js-add-diff-note-button"
data-qa-selector=
"diff_comment_button"
data-qa-selector=
"diff_comment_button"
:class=
"
{ 'gl-cursor-grab': dragging }"
:class=
"
{ 'gl-cursor-grab': dragging }"
:disabled="line.left.commentsDisabled"
:disabled="line.left.commentsDisabled"
...
@@ -327,7 +328,7 @@ export default {
...
@@ -327,7 +328,7 @@ export default {
tabindex=
"0"
tabindex=
"0"
:draggable=
"!line.right.commentsDisabled && glFeatures.dragCommentSelection"
:draggable=
"!line.right.commentsDisabled && glFeatures.dragCommentSelection"
type=
"button"
type=
"button"
class=
"add-diff-note unified-diff-components-diff-note-button note-button js-add-diff-note-button
qa-diff-comment
"
class=
"add-diff-note unified-diff-components-diff-note-button note-button js-add-diff-note-button"
:class=
"
{ 'gl-cursor-grab': dragging }"
:class=
"
{ 'gl-cursor-grab': dragging }"
:disabled="line.right.commentsDisabled"
:disabled="line.right.commentsDisabled"
:aria-disabled="line.right.commentsDisabled"
:aria-disabled="line.right.commentsDisabled"
...
...
app/assets/javascripts/diffs/components/inline_diff_table_row.vue
View file @
6b4b88eb
...
@@ -177,7 +177,6 @@ export default {
...
@@ -177,7 +177,6 @@ export default {
<a
<a
v-if=
"line.new_line"
v-if=
"line.new_line"
ref=
"lineNumberRefNew"
ref=
"lineNumberRefNew"
data-qa-selector=
"new_diff_line_link"
:data-linenumber=
"line.new_line"
:data-linenumber=
"line.new_line"
:href=
"line.lineHref"
:href=
"line.lineHref"
@
click=
"setHighlightedRow(line.lineCode)"
@
click=
"setHighlightedRow(line.lineCode)"
...
...
app/assets/javascripts/diffs/components/parallel_diff_table_row.vue
View file @
6b4b88eb
...
@@ -193,7 +193,7 @@ export default {
...
@@ -193,7 +193,7 @@ export default {
v-show=
"shouldShowCommentButtonLeft"
v-show=
"shouldShowCommentButtonLeft"
ref=
"addDiffNoteButtonLeft"
ref=
"addDiffNoteButtonLeft"
type=
"button"
type=
"button"
class=
"add-diff-note note-button js-add-diff-note-button
qa-diff-comment
"
class=
"add-diff-note note-button js-add-diff-note-button"
:disabled=
"line.left.commentsDisabled"
:disabled=
"line.left.commentsDisabled"
:aria-label=
"addCommentTooltipLeft"
:aria-label=
"addCommentTooltipLeft"
@
click=
"handleCommentButton(line.left)"
@
click=
"handleCommentButton(line.left)"
...
@@ -251,7 +251,7 @@ export default {
...
@@ -251,7 +251,7 @@ export default {
v-show=
"shouldShowCommentButtonRight"
v-show=
"shouldShowCommentButtonRight"
ref=
"addDiffNoteButtonRight"
ref=
"addDiffNoteButtonRight"
type=
"button"
type=
"button"
class=
"add-diff-note note-button js-add-diff-note-button
qa-diff-comment
"
class=
"add-diff-note note-button js-add-diff-note-button"
:disabled=
"line.right.commentsDisabled"
:disabled=
"line.right.commentsDisabled"
:aria-label=
"addCommentTooltipRight"
:aria-label=
"addCommentTooltipRight"
@
click=
"handleCommentButton(line.right)"
@
click=
"handleCommentButton(line.right)"
...
...
app/assets/javascripts/notes/components/note_form.vue
View file @
6b4b88eb
...
@@ -367,21 +367,11 @@ export default {
...
@@ -367,21 +367,11 @@ export default {
<p
v-if=
"showResolveDiscussionToggle"
>
<p
v-if=
"showResolveDiscussionToggle"
>
<label>
<label>
<template
v-if=
"discussionResolved"
>
<template
v-if=
"discussionResolved"
>
<input
<input
v-model=
"isUnresolving"
type=
"checkbox"
class=
"js-unresolve-checkbox"
/>
v-model=
"isUnresolving"
type=
"checkbox"
class=
"js-unresolve-checkbox"
data-qa-selector=
"unresolve_review_discussion_checkbox"
/>
{{
__
(
'
Unresolve thread
'
)
}}
{{
__
(
'
Unresolve thread
'
)
}}
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<input
<input
v-model=
"isResolving"
type=
"checkbox"
class=
"js-resolve-checkbox"
/>
v-model=
"isResolving"
type=
"checkbox"
class=
"js-resolve-checkbox"
data-qa-selector=
"resolve_review_discussion_checkbox"
/>
{{
__
(
'
Resolve thread
'
)
}}
{{
__
(
'
Resolve thread
'
)
}}
</
template
>
</
template
>
</label>
</label>
...
...
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_enabled.vue
View file @
6b4b88eb
...
@@ -154,7 +154,7 @@ export default {
...
@@ -154,7 +154,7 @@ export default {
<status-icon
status=
"success"
/>
<status-icon
status=
"success"
/>
<div
class=
"media-body"
>
<div
class=
"media-body"
>
<h4
class=
"gl-display-flex"
>
<h4
class=
"gl-display-flex"
>
<span
class=
"gl-mr-3"
data-qa-selector=
"merge_request_status_content"
>
<span
class=
"gl-mr-3"
>
<span
class=
"js-status-text-before-author"
data-testid=
"beforeStatusText"
>
{{
<span
class=
"js-status-text-before-author"
data-testid=
"beforeStatusText"
>
{{
statusTextBeforeAuthor
statusTextBeforeAuthor
}}
</span>
}}
</span>
...
...
app/assets/javascripts/vue_shared/components/markdown/apply_suggestion.vue
View file @
6b4b88eb
...
@@ -34,7 +34,7 @@ export default {
...
@@ -34,7 +34,7 @@ export default {
boundary=
"window"
boundary=
"window"
right
right
menu-class=
"gl-w-full!"
menu-class=
"gl-w-full!"
data-qa-selector=
"apply_suggestion_
butto
n"
data-qa-selector=
"apply_suggestion_
dropdow
n"
@
shown=
"$refs.commitMessage.$el.focus()"
@
shown=
"$refs.commitMessage.$el.focus()"
>
>
<gl-dropdown-form
class=
"gl-px-4! gl-m-0!"
>
<gl-dropdown-form
class=
"gl-px-4! gl-m-0!"
>
...
@@ -45,7 +45,7 @@ export default {
...
@@ -45,7 +45,7 @@ export default {
v-model=
"message"
v-model=
"message"
:placeholder=
"defaultCommitMessage"
:placeholder=
"defaultCommitMessage"
submit-on-enter
submit-on-enter
data-qa-selector=
"commit_message_
textbox
"
data-qa-selector=
"commit_message_
field
"
@
submit=
"onApply"
@
submit=
"onApply"
/>
/>
<gl-button
<gl-button
...
...
app/assets/javascripts/vue_shared/components/markdown/suggestion_diff.vue
View file @
6b4b88eb
...
@@ -70,7 +70,7 @@ export default {
...
@@ -70,7 +70,7 @@ export default {
<
template
>
<
template
>
<div
class=
"md-suggestion"
>
<div
class=
"md-suggestion"
>
<suggestion-diff-header
<suggestion-diff-header
class=
"
qa-suggestion-diff-header
js-suggestion-diff-header"
class=
"js-suggestion-diff-header"
:suggestions-count=
"suggestionsCount"
:suggestions-count=
"suggestionsCount"
:can-apply=
"suggestion.appliable && suggestion.current_user.can_apply && !disabled"
:can-apply=
"suggestion.appliable && suggestion.current_user.can_apply && !disabled"
:is-applied=
"suggestion.applied"
:is-applied=
"suggestion.applied"
...
...
app/views/projects/merge_requests/_description.html.haml
View file @
6b4b88eb
%div
%div
-
if
@merge_request
.
description
.
present?
-
if
@merge_request
.
description
.
present?
.description
.qa-description
{
class:
can?
(
current_user
,
:update_merge_request
,
@merge_request
)
?
'js-task-list-container'
:
''
}
.description
{
class:
can?
(
current_user
,
:update_merge_request
,
@merge_request
)
?
'js-task-list-container'
:
''
,
data:
{
qa_selector:
'description_content'
}
}
.md
.md
=
markdown_field
(
@merge_request
,
:description
)
=
markdown_field
(
@merge_request
,
:description
)
%textarea
.hidden.js-task-list-field
{
data:
{
value:
@merge_request
.
description
}
}
%textarea
.hidden.js-task-list-field
{
data:
{
value:
@merge_request
.
description
}
}
...
...
app/views/projects/merge_requests/_mr_box.html.haml
View file @
6b4b88eb
.detail-page-description.py-2
.detail-page-description.py-2
%h2
.title.
qa-title.mb-0
%h2
.title.
mb-0
{
data:
{
qa_selector:
'title_content'
}
}
=
markdown_field
(
@merge_request
,
:title
)
=
markdown_field
(
@merge_request
,
:title
)
app/views/shared/_commit_message_container.html.haml
View file @
6b4b88eb
...
@@ -7,11 +7,13 @@
...
@@ -7,11 +7,13 @@
.commit-message-container
.commit-message-container
.max-width-marker
.max-width-marker
=
text_area_tag
'commit_message'
,
=
text_area_tag
'commit_message'
,
(
params
[
:commit_message
]
||
local_assigns
[
:text
]
||
local_assigns
[
:placeholder
]),
(
params
[
:commit_message
]
||
local_assigns
[
:text
]
||
local_assigns
[
:placeholder
]),
class:
'form-control gl-form-input js-commit-message'
,
placeholder:
local_assigns
[
:placeholder
],
class:
'form-control gl-form-input js-commit-message'
,
data:
descriptions
,
placeholder:
local_assigns
[
:placeholder
],
required:
true
,
rows:
(
local_assigns
[
:rows
]
||
3
),
data:
descriptions
,
id:
"commit_message-
#{
nonce
}
"
'data-qa-selector'
:
'commit_message_field'
,
required:
true
,
rows:
(
local_assigns
[
:rows
]
||
3
),
id:
"commit_message-
#{
nonce
}
"
-
if
local_assigns
[
:hint
]
-
if
local_assigns
[
:hint
]
%p
.hint
%p
.hint
=
_
(
'Try to keep the first line under 52 characters and the others under 72.'
)
=
_
(
'Try to keep the first line under 52 characters and the others under 72.'
)
...
...
qa/qa/page/file/shared/commit_message.rb
View file @
6b4b88eb
...
@@ -11,7 +11,7 @@ module QA
...
@@ -11,7 +11,7 @@ module QA
super
super
base
.
view
'app/views/shared/_commit_message_container.html.haml'
do
base
.
view
'app/views/shared/_commit_message_container.html.haml'
do
element
:commit_message
,
"text_area_tag 'commit_message'"
# rubocop:disable QA/ElementWithPattern
element
:commit_message
_field
end
end
base
.
view
'app/views/projects/commits/_commit.html.haml'
do
base
.
view
'app/views/projects/commits/_commit.html.haml'
do
...
@@ -20,7 +20,7 @@ module QA
...
@@ -20,7 +20,7 @@ module QA
end
end
def
add_commit_message
(
message
)
def
add_commit_message
(
message
)
fill_
in
'commit_message'
,
with:
message
fill_
element
(
:commit_message_field
,
message
)
end
end
def
has_commit_message?
(
text
)
def
has_commit_message?
(
text
)
...
...
qa/qa/page/merge_request/show.rb
View file @
6b4b88eb
...
@@ -7,50 +7,16 @@ module QA
...
@@ -7,50 +7,16 @@ module QA
include
Page
::
Component
::
Note
include
Page
::
Component
::
Note
include
Page
::
Component
::
Issuable
::
Sidebar
include
Page
::
Component
::
Issuable
::
Sidebar
view
'app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue'
do
view
'app/assets/javascripts/batch_comments/components/preview_dropdown.vue'
do
element
:download_dropdown
element
:review_preview_dropdown
element
:download_email_patches_menu_item
element
:download_plain_diff_menu_item
element
:open_in_web_ide_button
end
view
'app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue'
do
element
:merge_request_pipeline_info_content
element
:pipeline_link
end
view
'app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue'
do
element
:merge_button
element
:fast_forward_message_content
element
:merge_moment_dropdown
element
:merge_immediately_menu_item
end
view
'app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_enabled.vue'
do
element
:merge_request_status_content
end
view
'app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue'
do
element
:merged_status_content
end
view
'app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_failed_to_merge.vue'
do
element
:merge_request_error_content
end
view
'app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_rebase.vue'
do
element
:mr_rebase_button
element
:no_fast_forward_message_content
end
end
view
'app/assets/javascripts/
vue_merge_request_widget/components/states/squash_before_merge
.vue'
do
view
'app/assets/javascripts/
batch_comments/components/publish_button
.vue'
do
element
:s
quash_checkbox
element
:s
ubmit_review_button
end
end
view
'app/views/projects/merge_requests/show.html.haml'
do
view
'app/assets/javascripts/batch_comments/components/review_bar.vue'
do
element
:notes_tab
element
:review_bar_content
element
:commits_tab
element
:diffs_tab
end
end
view
'app/assets/javascripts/diffs/components/compare_dropdown_layout.vue'
do
view
'app/assets/javascripts/diffs/components/compare_dropdown_layout.vue'
do
...
@@ -70,33 +36,60 @@ module QA
...
@@ -70,33 +36,60 @@ module QA
view
'app/assets/javascripts/diffs/components/diff_row.vue'
do
view
'app/assets/javascripts/diffs/components/diff_row.vue'
do
element
:diff_comment_button
element
:diff_comment_button
element
:new_diff_line_link
end
end
view
'app/assets/javascripts/diffs/components/inline_diff_table_row.vue'
do
view
'app/assets/javascripts/notes/components/note_form.vue'
do
element
:new_diff_line_link
element
:start_review_button
element
:comment_now_button
end
end
view
'app/views/projects/merge_requests/_mr_title.html.haml'
do
view
'app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue'
do
element
:edit_button
element
:download_dropdown
element
:download_email_patches_menu_item
element
:download_plain_diff_menu_item
element
:open_in_web_ide_button
end
end
view
'app/assets/javascripts/batch_comments/components/publish_button.vue'
do
view
'app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue'
do
element
:submit_review_button
element
:merge_request_pipeline_info_content
element
:pipeline_link
end
end
view
'app/assets/javascripts/
batch_comments/components/review_bar
.vue'
do
view
'app/assets/javascripts/
vue_merge_request_widget/components/states/mr_widget_failed_to_merge
.vue'
do
element
:
review_ba
r_content
element
:
merge_request_erro
r_content
end
end
view
'app/assets/javascripts/notes/components/note_form.vue'
do
view
'app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue'
do
element
:unresolve_review_discussion_checkbox
element
:cherry_pick_button
element
:resolve_review_discussion_checkbox
element
:merged_status_content
element
:start_review_button
element
:revert_button
element
:comment_now_button
end
end
view
'app/assets/javascripts/batch_comments/components/preview_dropdown.vue'
do
view
'app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_rebase.vue'
do
element
:review_preview_toggle
element
:mr_rebase_button
element
:no_fast_forward_message_content
end
view
'app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue'
do
element
:merge_button
element
:fast_forward_message_content
element
:merge_moment_dropdown
element
:merge_immediately_menu_item
end
view
'app/assets/javascripts/vue_merge_request_widget/components/states/squash_before_merge.vue'
do
element
:squash_checkbox
end
view
'app/assets/javascripts/vue_shared/components/markdown/apply_suggestion.vue'
do
element
:apply_suggestion_dropdown
element
:commit_message_field
element
:commit_with_custom_message_button
end
view
'app/assets/javascripts/vue_shared/components/markdown/header.vue'
do
element
:suggestion_button
end
end
view
'app/assets/javascripts/vue_shared/components/markdown/suggestion_diff_header.vue'
do
view
'app/assets/javascripts/vue_shared/components/markdown/suggestion_diff_header.vue'
do
...
@@ -104,19 +97,22 @@ module QA
...
@@ -104,19 +97,22 @@ module QA
element
:add_suggestion_batch_button
element
:add_suggestion_batch_button
end
end
view
'app/
assets/javascripts/vue_shared/components/markdown/header.vue
'
do
view
'app/
views/projects/merge_requests/_description.html.haml
'
do
element
:
suggestion_button
element
:
description_content
end
end
view
'app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue'
do
view
'app/views/projects/merge_requests/_mr_box.html.haml'
do
element
:revert_button
element
:title_content
element
:cherry_pick_button
end
end
view
'app/assets/javascripts/vue_shared/components/markdown/apply_suggestion.vue'
do
view
'app/views/projects/merge_requests/_mr_title.html.haml'
do
element
:apply_suggestion_button
element
:edit_button
element
:commit_message_textbox
end
element
:commit_with_custom_message_button
view
'app/views/projects/merge_requests/show.html.haml'
do
element
:notes_tab
element
:commits_tab
element
:diffs_tab
end
end
def
start_review
def
start_review
...
@@ -131,21 +127,13 @@ module QA
...
@@ -131,21 +127,13 @@ module QA
click_element
(
:target_version_dropdown
)
click_element
(
:target_version_dropdown
)
end
end
def
comment_now
click_element
(
:comment_now_button
)
# After clicking the button, wait for it to disappear
# before moving on to the next part of the test
has_no_element?
(
:comment_now_button
)
end
def
version_dropdown_content
def
version_dropdown_content
find_element
(
:dropdown_content
).
text
find_element
(
:dropdown_content
).
text
end
end
def
submit_pending_reviews
def
submit_pending_reviews
within_element
(
:review_bar_content
)
do
within_element
(
:review_bar_content
)
do
click_element
(
:review_preview_
toggle
)
click_element
(
:review_preview_
dropdown
)
click_element
(
:submit_review_button
)
click_element
(
:submit_review_button
)
# After clicking the button, wait for it to disappear
# After clicking the button, wait for it to disappear
...
@@ -154,22 +142,6 @@ module QA
...
@@ -154,22 +142,6 @@ module QA
end
end
end
end
def
discard_pending_reviews
within_element
(
:review_bar_content
)
do
click_element
(
:discard_review
)
end
click_element
(
:modal_delete_pending_comments
)
end
def
resolve_review_discussion
scroll_to_element
(
:start_review_button
)
check_element
(
:resolve_review_discussion_checkbox
)
end
def
unresolve_review_discussion
check_element
(
:unresolve_review_discussion_checkbox
)
end
def
add_comment_to_diff
(
text
)
def
add_comment_to_diff
(
text
)
wait_until
(
sleep_interval:
5
)
do
wait_until
(
sleep_interval:
5
)
do
has_css?
(
'a[data-linenumber="1"]'
)
has_css?
(
'a[data-linenumber="1"]'
)
...
@@ -230,11 +202,11 @@ module QA
...
@@ -230,11 +202,11 @@ module QA
end
end
def
has_title?
(
title
)
def
has_title?
(
title
)
has_element?
(
:title
,
text:
title
)
has_element?
(
:title
_content
,
text:
title
)
end
end
def
has_description?
(
description
)
def
has_description?
(
description
)
has_element?
(
:description
,
text:
description
)
has_element?
(
:description
_content
,
text:
description
)
end
end
def
mark_to_squash
def
mark_to_squash
...
@@ -253,11 +225,6 @@ module QA
...
@@ -253,11 +225,6 @@ module QA
raise
"Merge did not appear to be successful"
unless
merged?
raise
"Merge did not appear to be successful"
unless
merged?
end
end
def
merge_immediately!
click_element
(
:merge_moment_dropdown
)
click_element
(
:merge_immediately_menu_item
)
end
def
merge_when_pipeline_succeeds!
def
merge_when_pipeline_succeeds!
wait_until_ready_to_merge
wait_until_ready_to_merge
...
@@ -281,10 +248,6 @@ module QA
...
@@ -281,10 +248,6 @@ module QA
has_element?
(
:merge_button
,
disabled:
false
)
has_element?
(
:merge_button
,
disabled:
false
)
end
end
def
merge_request_status
find_element
(
:merge_request_status_content
).
text
end
# Waits up 60 seconds and raises an error if unable to merge
# Waits up 60 seconds and raises an error if unable to merge
def
wait_until_ready_to_merge
def
wait_until_ready_to_merge
has_element?
(
:merge_button
)
has_element?
(
:merge_button
)
...
@@ -363,8 +326,8 @@ module QA
...
@@ -363,8 +326,8 @@ module QA
end
end
def
apply_suggestion_with_message
(
message
)
def
apply_suggestion_with_message
(
message
)
click_element
(
:apply_suggestion_
butto
n
)
click_element
(
:apply_suggestion_
dropdow
n
)
fill_element
(
:commit_message_
textbox
,
message
)
fill_element
(
:commit_message_
field
,
message
)
click_element
(
:commit_with_custom_message_button
)
click_element
(
:commit_with_custom_message_button
)
end
end
...
...
qa/qa/specs/features/ee/browser_ui/3_create/merge_request/add_batch_comments_in_merge_request_spec.rb
View file @
6b4b88eb
...
@@ -38,7 +38,7 @@ module QA
...
@@ -38,7 +38,7 @@ module QA
end
end
end
end
it
'user submits a diff review'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1776'
,
quarantine:
{
issue:
'https://gitlab.com/gitlab-org/gitlab/-/issues/297257'
,
type: :investigating
}
do
it
'user submits a diff review'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1776'
do
Flow
::
Login
.
sign_in
Flow
::
Login
.
sign_in
merge_request
.
visit!
merge_request
.
visit!
...
...
spec/features/markdown/copy_as_gfm_spec.rb
View file @
6b4b88eb
...
@@ -426,8 +426,8 @@ RSpec.describe 'Copy as GFM', :js do
...
@@ -426,8 +426,8 @@ RSpec.describe 'Copy as GFM', :js do
html
=
<<~
HTML
html
=
<<~
HTML
<div class="md-suggestion">
<div class="md-suggestion">
<div class="md-suggestion-header border-bottom-0 mt-2
qa-suggestion-diff-header
js-suggestion-diff-header">
<div class="md-suggestion-header border-bottom-0 mt-2 js-suggestion-diff-header">
<div class="
qa-suggestion-diff-header
js-suggestion-diff-header font-weight-bold">
<div class="js-suggestion-diff-header font-weight-bold">
Suggested change
Suggested change
<a href="/gitlab/help/user/discussions/index.md#suggest-changes" aria-label="Help" class="js-help-btn">
<a href="/gitlab/help/user/discussions/index.md#suggest-changes" aria-label="Help" class="js-help-btn">
<svg aria-hidden="true" class="s16 ic-question-o link-highlight">
<svg aria-hidden="true" class="s16 ic-question-o link-highlight">
...
...
spec/frontend/diffs/components/inline_diff_table_row_spec.js
View file @
6b4b88eb
...
@@ -216,14 +216,14 @@ describe('InlineDiffTableRow', () => {
...
@@ -216,14 +216,14 @@ describe('InlineDiffTableRow', () => {
const
TEST_LINE_NUMBER
=
1
;
const
TEST_LINE_NUMBER
=
1
;
describe
.
each
`
describe
.
each
`
lineProps | findLineNumber | expectedHref | expectedClickArg
| expectedQaSelector
lineProps | findLineNumber | expectedHref | expectedClickArg
${{
line_code
:
TEST_LINE_CODE
,
old_line
:
TEST_LINE_NUMBER
}
} |
${
findLineNumberOld
}
|
${
`#
${
TEST_LINE_CODE
}
`
}
|
${
TEST_LINE_CODE
}
|
${
undefined
}
${{
line_code
:
TEST_LINE_CODE
,
old_line
:
TEST_LINE_NUMBER
}
} |
${
findLineNumberOld
}
|
${
`#
${
TEST_LINE_CODE
}
`
}
|
${
TEST_LINE_CODE
}
${{
line_code
:
undefined
,
old_line
:
TEST_LINE_NUMBER
}
} |
${
findLineNumberOld
}
|
${
'
#
'
}
|
${
undefined
}
|
${
undefined
}
${{
line_code
:
undefined
,
old_line
:
TEST_LINE_NUMBER
}
} |
${
findLineNumberOld
}
|
${
'
#
'
}
|
${
undefined
}
${{
line_code
:
undefined
,
left
:
{
line_code
:
TEST_LINE_CODE
}
, old_line: TEST_LINE_NUMBER }} |
${
findLineNumberOld
}
|
${
'
#
'
}
|
${
TEST_LINE_CODE
}
|
${
undefined
}
${{
line_code
:
undefined
,
left
:
{
line_code
:
TEST_LINE_CODE
}
, old_line: TEST_LINE_NUMBER }} |
${
findLineNumberOld
}
|
${
'
#
'
}
|
${
TEST_LINE_CODE
}
${{
line_code
:
undefined
,
right
:
{
line_code
:
TEST_LINE_CODE
}
, new_line: TEST_LINE_NUMBER }} |
${
findLineNumberNew
}
|
${
'
#
'
}
|
${
TEST_LINE_CODE
}
|
${
'
new_diff_line_link
'
}
${{
line_code
:
undefined
,
right
:
{
line_code
:
TEST_LINE_CODE
}
, new_line: TEST_LINE_NUMBER }} |
${
findLineNumberNew
}
|
${
'
#
'
}
|
${
TEST_LINE_CODE
}
`
(
`
(
'
with line ($lineProps)
'
,
'
with line ($lineProps)
'
,
({
lineProps
,
findLineNumber
,
expectedHref
,
expectedClickArg
,
expectedQaSelector
})
=>
{
({
lineProps
,
findLineNumber
,
expectedHref
,
expectedClickArg
})
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
jest
.
spyOn
(
store
,
'
dispatch
'
).
mockImplementation
();
jest
.
spyOn
(
store
,
'
dispatch
'
).
mockImplementation
();
createComponent
({
createComponent
({
...
@@ -236,7 +236,6 @@ describe('InlineDiffTableRow', () => {
...
@@ -236,7 +236,6 @@ describe('InlineDiffTableRow', () => {
expect
(
findLineNumber
().
attributes
()).
toEqual
({
expect
(
findLineNumber
().
attributes
()).
toEqual
({
href
:
expectedHref
,
href
:
expectedHref
,
'
data-linenumber
'
:
TEST_LINE_NUMBER
.
toString
(),
'
data-linenumber
'
:
TEST_LINE_NUMBER
.
toString
(),
'
data-qa-selector
'
:
expectedQaSelector
,
});
});
});
});
...
...
spec/frontend/vue_mr_widget/components/states/__snapshots__/mr_widget_auto_merge_enabled_spec.js.snap
View file @
6b4b88eb
...
@@ -16,7 +16,6 @@ exports[`MRWidgetAutoMergeEnabled when graphql is disabled template should have
...
@@ -16,7 +16,6 @@ exports[`MRWidgetAutoMergeEnabled when graphql is disabled template should have
>
>
<span
<span
class="gl-mr-3"
class="gl-mr-3"
data-qa-selector="merge_request_status_content"
>
>
<span
<span
class="js-status-text-before-author"
class="js-status-text-before-author"
...
@@ -108,7 +107,6 @@ exports[`MRWidgetAutoMergeEnabled when graphql is enabled template should have c
...
@@ -108,7 +107,6 @@ exports[`MRWidgetAutoMergeEnabled when graphql is enabled template should have c
>
>
<span
<span
class="gl-mr-3"
class="gl-mr-3"
data-qa-selector="merge_request_status_content"
>
>
<span
<span
class="js-status-text-before-author"
class="js-status-text-before-author"
...
...
spec/frontend/vue_shared/components/markdown/__snapshots__/suggestion_diff_spec.js.snap
View file @
6b4b88eb
...
@@ -6,7 +6,7 @@ exports[`Suggestion Diff component matches snapshot 1`] = `
...
@@ -6,7 +6,7 @@ exports[`Suggestion Diff component matches snapshot 1`] = `
>
>
<suggestion-diff-header-stub
<suggestion-diff-header-stub
batchsuggestionscount="1"
batchsuggestionscount="1"
class="
qa-suggestion-diff-header
js-suggestion-diff-header"
class="js-suggestion-diff-header"
defaultcommitmessage="Apply suggestion"
defaultcommitmessage="Apply suggestion"
helppagepath="path_to_docs"
helppagepath="path_to_docs"
isapplyingbatch="true"
isapplyingbatch="true"
...
...
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