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
e7ca2350
Commit
e7ca2350
authored
Sep 30, 2019
by
Walmyr Lima e Silva Filho
Committed by
Mark Lapierre
Sep 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add end-to-end test for the related issues feature
parent
f6b1a0c3
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
0 deletions
+74
-0
ee/app/assets/javascripts/related_issues/components/related_issues_block.vue
...cripts/related_issues/components/related_issues_block.vue
+1
-0
qa/qa/ee/page/project/issue/show.rb
qa/qa/ee/page/project/issue/show.rb
+20
-0
qa/qa/page/project/issue/show.rb
qa/qa/page/project/issue/show.rb
+8
-0
qa/qa/resource/issue.rb
qa/qa/resource/issue.rb
+1
-0
qa/qa/specs/features/ee/browser_ui/2_plan/related_issues/related_issues_spec.rb
...e/browser_ui/2_plan/related_issues/related_issues_spec.rb
+44
-0
No files found.
ee/app/assets/javascripts/related_issues/components/related_issues_block.vue
View file @
e7ca2350
...
...
@@ -195,6 +195,7 @@ export default {
class=
"js-issue-count-badge-add-button issue-count-badge-add-button btn btn-sm btn-default"
:aria-label=
"__('Add an issue')"
data-placement=
"top"
data-qa-selector=
"related_issues_plus_button"
@
click=
"$emit('toggleAddRelatedIssuesForm', $event)"
>
<i
class=
"fa fa-plus"
aria-hidden=
"true"
></i>
...
...
qa/qa/ee/page/project/issue/show.rb
View file @
e7ca2350
...
...
@@ -10,8 +10,18 @@ module QA
def
self
.
prepended
(
page
)
page
.
module_eval
do
view
'ee/app/assets/javascripts/related_issues/components/add_issuable_form.vue'
do
element
:add_issue_button
end
view
'ee/app/assets/javascripts/related_issues/components/related_issuable_input.vue'
do
element
:add_issue_input
end
view
'ee/app/assets/javascripts/related_issues/components/related_issues_block.vue'
do
element
:related_issuable_item
element
:related_issues_loading_icon
element
:related_issues_plus_button
end
view
'ee/app/assets/javascripts/sidebar/components/weight/weight.vue'
do
...
...
@@ -36,6 +46,16 @@ module QA
click_element
(
:remove_weight_link
)
end
def
relate_issue
(
issue
)
click_element
(
:related_issues_plus_button
)
fill_element
(
:add_issue_input
,
issue
.
web_url
)
send_keys_to_element
(
:add_issue_input
,
:enter
)
end
def
related_issuable_item
find_element
(
:related_issuable_item
)
end
def
set_weight
(
weight
)
click_element
(
:edit_weight_link
)
fill_element
(
:weight_input_field
,
weight
)
...
...
qa/qa/page/project/issue/show.rb
View file @
e7ca2350
...
...
@@ -35,6 +35,10 @@ module QA
element
:more_assignees_link
end
view
'app/assets/javascripts/vue_shared/components/issue/related_issuable_item.vue'
do
element
:remove_issue_button
end
view
'app/helpers/dropdowns_helper.rb'
do
element
:dropdown_input_field
end
...
...
@@ -76,6 +80,10 @@ module QA
click_element
(
:milestone_link
)
end
def
click_remove_issue_button
click_element
(
:remove_issue_button
)
end
# Adds a comment to an issue
# attachment option should be an absolute path
def
comment
(
text
,
attachment:
nil
,
filter: :all_activities
)
...
...
qa/qa/resource/issue.rb
View file @
e7ca2350
...
...
@@ -15,6 +15,7 @@ module QA
end
attribute
:id
attribute
:iid
attribute
:assignee_ids
attribute
:labels
attribute
:title
...
...
qa/qa/specs/features/ee/browser_ui/2_plan/related_issues/related_issues_spec.rb
0 → 100644
View file @
e7ca2350
# frozen_string_literal: true
module
QA
context
'Plan'
do
describe
'Related issues'
do
let
(
:project
)
do
Resource
::
Project
.
fabricate_via_api!
do
|
resource
|
resource
.
name
=
'project-to-test-related-issues'
end
end
before
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
perform
(
&
:sign_in_using_credentials
)
@issue_1
=
Resource
::
Issue
.
fabricate_via_api!
do
|
issue
|
issue
.
project
=
project
issue
.
title
=
'Issue 1'
end
@issue_2
=
Resource
::
Issue
.
fabricate_via_api!
do
|
issue
|
issue
.
project
=
project
issue
.
title
=
'Issue 2'
end
end
it
'relates and unrelates one issue to/from another'
do
@issue_1
.
visit!
Page
::
Project
::
Issue
::
Show
.
perform
do
|
show
|
show
.
relate_issue
(
@issue_2
)
expect
(
show
).
to
have_content
(
"marked this issue as related to #
#{
@issue_2
.
iid
}
"
)
expect
(
show
.
related_issuable_item
).
to
have_content
(
@issue_2
.
title
)
show
.
click_remove_issue_button
expect
(
show
).
to
have_content
(
"removed the relation with #
#{
@issue_2
.
iid
}
"
)
expect
(
show
).
not_to
have_content
(
@issue_2
.
title
)
end
end
end
end
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