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
eea44869
Commit
eea44869
authored
Oct 26, 2020
by
Désirée Chevalier
Committed by
Mark Lapierre
Oct 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add e2e test for real time assignee updates
Adds an e2e test for real time updates of issue assignees
parent
0cb47b23
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
1 deletion
+75
-1
qa/qa/page/component/issuable/sidebar.rb
qa/qa/page/component/issuable/sidebar.rb
+7
-1
qa/qa/resource/issue.rb
qa/qa/resource/issue.rb
+15
-0
qa/qa/specs/features/browser_ui/2_plan/issue/real_time_assignee_spec.rb
...atures/browser_ui/2_plan/issue/real_time_assignee_spec.rb
+53
-0
No files found.
qa/qa/page/component/issuable/sidebar.rb
View file @
eea44869
...
...
@@ -64,11 +64,17 @@ module QA
end
def
has_assignee?
(
username
)
page
.
within
(
element_selector_css
(
:assignee_block
)
)
do
within_element
(
:assignee_block
)
do
has_text?
(
username
)
end
end
def
has_no_assignee_named?
(
username
)
within_element
(
:assignee_block
)
do
has_no_text?
(
username
)
end
end
def
has_avatar_image_count?
(
count
)
wait_assignees_block_finish_loading
do
all_elements
(
:avatar_image
,
count:
count
)
...
...
qa/qa/resource/issue.rb
View file @
eea44869
...
...
@@ -57,6 +57,21 @@ module QA
hash
[
:weight
]
=
@weight
if
@weight
end
end
def
api_put_path
"/projects/
#{
project
.
id
}
/issues/
#{
iid
}
"
end
def
set_issue_assignees
(
assignee_ids
:)
put_body
=
{
assignee_ids:
assignee_ids
}
response
=
put
Runtime
::
API
::
Request
.
new
(
api_client
,
api_put_path
).
url
,
put_body
unless
response
.
code
==
HTTP_STATUS_OK
raise
ResourceUpdateFailedError
,
"Could not update issue assignees to
#{
assignee_ids
}
. Request returned (
#{
response
.
code
}
): `
#{
response
}
`."
end
QA
::
Runtime
::
Logger
.
debug
(
"Successfully updated issue assignees to
#{
assignee_ids
}
"
)
end
end
end
end
qa/qa/specs/features/browser_ui/2_plan/issue/real_time_assignee_spec.rb
0 → 100644
View file @
eea44869
# frozen_string_literal: true
module
QA
RSpec
.
describe
'Plan'
,
:requires_admin
,
:actioncable
,
:orchestrated
do
describe
'Assignees'
do
let
(
:user1
)
{
Resource
::
User
.
fabricate_or_use
(
Runtime
::
Env
.
gitlab_qa_username_1
,
Runtime
::
Env
.
gitlab_qa_password_1
)
}
let
(
:user2
)
{
Resource
::
User
.
fabricate_or_use
(
Runtime
::
Env
.
gitlab_qa_username_2
,
Runtime
::
Env
.
gitlab_qa_password_2
)
}
let
(
:project
)
do
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
name
=
'project-to-test-assignees'
end
end
before
do
Runtime
::
Feature
.
enable
(
'real_time_issue_sidebar'
,
project:
project
)
Runtime
::
Feature
.
enable
(
'broadcast_issue_updates'
,
project:
project
)
Flow
::
Login
.
sign_in
project
.
add_member
(
user1
)
project
.
add_member
(
user2
)
end
after
do
Runtime
::
Feature
.
disable
(
'real_time_issue_sidebar'
,
project:
project
)
Runtime
::
Feature
.
disable
(
'broadcast_issue_updates'
,
project:
project
)
end
it
'update without refresh'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1048'
do
issue
=
Resource
::
Issue
.
fabricate_via_api!
do
|
issue
|
issue
.
project
=
project
issue
.
assignee_ids
=
[
user1
.
id
]
end
issue
.
visit!
Page
::
Project
::
Issue
::
Show
.
perform
do
|
show
|
expect
(
show
).
to
have_assignee
(
user1
.
name
)
issue
.
set_issue_assignees
(
assignee_ids:
[
user2
.
id
])
expect
(
show
).
to
have_assignee
(
user2
.
name
)
expect
(
show
).
to
have_no_assignee_named
(
user1
.
name
)
issue
.
set_issue_assignees
(
assignee_ids:
[])
expect
(
show
).
to
have_no_assignee_named
(
user1
.
name
)
expect
(
show
).
to
have_no_assignee_named
(
user2
.
name
)
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