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
e8a2a4e3
Commit
e8a2a4e3
authored
Nov 05, 2021
by
Désirée Chevalier
Committed by
Mark Lapierre
Nov 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update scoped label e2e with labels_widget ff
parent
03275c17
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
39 deletions
+48
-39
qa/qa/page/component/issuable/sidebar.rb
qa/qa/page/component/issuable/sidebar.rb
+36
-33
qa/qa/specs/features/ee/browser_ui/2_plan/scoped_labels/editing_scoped_labels_spec.rb
...ser_ui/2_plan/scoped_labels/editing_scoped_labels_spec.rb
+11
-6
qa/qa/support/matchers/have_matcher.rb
qa/qa/support/matchers/have_matcher.rb
+1
-0
No files found.
qa/qa/page/component/issuable/sidebar.rb
View file @
e8a2a4e3
...
...
@@ -22,20 +22,16 @@ module QA
element
:labels_block
end
base
.
view
'app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/dropdown_
value
.vue'
do
element
:
selected_label_content
base
.
view
'app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/dropdown_
contents_labels_view
.vue'
do
element
:
dropdown_input_field
end
base
.
view
'app/assets/javascripts/vue_shared/components/sidebar/labels_select_
vue
/dropdown_contents.vue'
do
base
.
view
'app/assets/javascripts/vue_shared/components/sidebar/labels_select_
widget
/dropdown_contents.vue'
do
element
:labels_dropdown_content
end
base
.
view
'app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/dropdown_title.vue'
do
element
:labels_edit_button
end
base
.
view
'app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/dropdown_contents_labels_view.vue'
do
element
:dropdown_input_field
base
.
view
'app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/dropdown_value.vue'
do
element
:selected_label_content
end
base
.
view
'app/views/shared/issuable/_sidebar.html.haml'
do
...
...
@@ -53,7 +49,7 @@ module QA
end
def
assign_milestone
(
milestone
)
w
ithin_element
(
:milestone_block
)
do
w
ait_milestone_block_finish_loading
do
click_element
(
:edit_link
)
click_on
(
milestone
.
title
)
end
...
...
@@ -70,14 +66,14 @@ module QA
end
def
has_assignee?
(
username
)
w
ithin_element
(
:assignee_block
)
do
has_text?
(
username
,
wait:
1
)
w
ait_assignees_block_finish_loading
do
has_text?
(
username
)
end
end
def
has_no_assignee?
(
username
)
w
ithin_element
(
:assignee_block
)
do
has_no_text?
(
username
,
wait:
1
)
w
ait_assignees_block_finish_loading
do
has_no_text?
(
username
)
end
end
...
...
@@ -88,8 +84,14 @@ module QA
end
def
has_label?
(
label
)
within_element
(
:labels_block
)
do
!!
has_element?
(
:selected_label_content
,
label_name:
label
)
wait_labels_block_finish_loading
do
has_element?
(
:selected_label_content
,
label_name:
label
)
end
end
def
has_no_label?
(
label
)
wait_labels_block_finish_loading
do
has_no_element?
(
:selected_label_content
,
label_name:
label
)
end
end
...
...
@@ -103,27 +105,19 @@ module QA
find_element
(
:more_assignees_link
)
end
def
select_labels_and_refresh
(
labels
)
Support
::
Retrier
.
retry_until
do
click_element
(
:labels_edit_button
)
has_element?
(
:labels_dropdown_content
,
text:
labels
.
first
)
end
def
select_labels
(
labels
)
within_element
(
:labels_block
)
do
click_element
(
:edit_link
)
labels
.
each
do
|
label
|
within_element
(
:labels_dropdown_content
)
do
send_keys_to_element
(
:dropdown_input_field
,
[
label
,
:enter
])
fill_element
(
:dropdown_input_field
,
label
)
click_button
(
text:
label
)
end
end
click_element
(
:labels_edit_button
)
labels
.
each
do
|
label
|
has_element?
(
:labels_block
,
text:
label
,
wait:
0
)
end
refresh
wait_for_requests
click_element
(
:title
)
# to blur dropdown
end
def
toggle_more_assignees_link
...
...
@@ -141,6 +135,15 @@ module QA
end
end
def
wait_labels_block_finish_loading
within_element
(
:labels_block
)
do
wait_until
(
reload:
false
,
max_duration:
10
,
sleep_interval:
1
)
do
finished_loading_block?
yield
end
end
end
def
wait_milestone_block_finish_loading
within_element
(
:milestone_block
)
do
wait_until
(
reload:
false
,
max_duration:
10
,
sleep_interval:
1
)
do
...
...
qa/qa/specs/features/ee/browser_ui/2_plan/scoped_labels/editing_scoped_labels_spec.rb
View file @
e8a2a4e3
# frozen_string_literal: true
module
QA
RSpec
.
describe
'Plan'
,
:reliable
do
# TODO: Remove :requires_admin when the `Runtime::Feature.enable` method call is removed
RSpec
.
describe
'Plan'
,
:reliable
,
:requires_admin
do
describe
'Editing scoped labels on issues'
do
let
(
:initial_label
)
{
'animal::fox'
}
let
(
:new_label_same_scope
)
{
'animal::dolphin'
}
...
...
@@ -11,12 +12,16 @@ module QA
let
(
:new_label_same_scope_multi_colon
)
{
'group::car::porsche'
}
let
(
:new_label_different_scope_multi_colon
)
{
'group::truck::mercedes-bens'
}
before
do
Flow
::
Login
.
sign_in
issue
=
Resource
::
Issue
.
fabricate_via_api!
do
|
issue
|
let!
(
:issue
)
do
Resource
::
Issue
.
fabricate_via_api!
do
|
issue
|
issue
.
labels
=
[
initial_label
,
initial_label_multi_colon
]
end
end
before
do
Runtime
::
Feature
.
enable
(
:labels_widget
,
project:
issue
.
project
)
Flow
::
Login
.
sign_in
[
new_label_same_scope
,
...
...
@@ -38,7 +43,7 @@ module QA
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1181'
)
do
Page
::
Project
::
Issue
::
Show
.
perform
do
|
show
|
show
.
select_labels
_and_refresh
(
show
.
select_labels
(
[
new_label_same_scope
,
new_label_different_scope
,
...
...
qa/qa/support/matchers/have_matcher.rb
View file @
e8a2a4e3
...
...
@@ -19,6 +19,7 @@ module QA
related_issue_item
snippet_description
tag
label
]
.
each
do
|
predicate
|
RSpec
::
Matchers
.
define
"have_
#{
predicate
}
"
do
|*
args
,
**
kwargs
|
match
do
|
page_object
|
...
...
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