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
9bba7322
Commit
9bba7322
authored
Jan 05, 2022
by
Valerie Burton
Committed by
Sanad Liaquat
Jan 05, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
E2E: Invite Group to Project Spec
parent
b1bd94cd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
94 additions
and
1 deletion
+94
-1
qa/qa/page/component/invite_members_modal.rb
qa/qa/page/component/invite_members_modal.rb
+4
-1
qa/qa/page/project/members.rb
qa/qa/page/project/members.rb
+5
-0
qa/qa/specs/features/browser_ui/1_manage/project/invite_group_to_project_spec.rb
...owser_ui/1_manage/project/invite_group_to_project_spec.rb
+85
-0
No files found.
qa/qa/page/component/invite_members_modal.rb
View file @
9bba7322
...
...
@@ -68,7 +68,10 @@ module QA
fill_element
:access_level_dropdown
,
with:
group_access
click_button
'Select a group'
fill_element
:group_select_dropdown_search_field
,
group_name
# Helps stabilize race condition with concurrent group API calls while searching
# TODO: Replace with `fill_element :group_select_dropdown_search_field, group_name` when this bug is resolved: https://gitlab.com/gitlab-org/gitlab/-/issues/349379
send_keys_to_element
(
:group_select_dropdown_search_field
,
group_name
)
Support
::
WaitForRequests
.
wait_for_requests
...
...
qa/qa/page/project/members.rb
View file @
9bba7322
...
...
@@ -41,6 +41,11 @@ module QA
click_button
'Remove group'
end
end
def
has_group?
(
group_name
)
click_element
:groups_list_tab
has_element?
(
:group_row
,
text:
group_name
)
end
end
end
end
...
...
qa/qa/specs/features/browser_ui/1_manage/project/invite_group_to_project_spec.rb
0 → 100644
View file @
9bba7322
# frozen_string_literal: true
module
QA
# Tagging with issue for a transient invite group modal search bug, but does not require quarantine at this time
RSpec
.
describe
'Manage'
,
:requires_admin
,
:transient
,
issue:
'https://gitlab.com/gitlab-org/gitlab/-/issues/349379'
do
describe
'Invite group'
do
shared_examples
'invites group to project'
do
it
'verifies group is added and members can access project'
do
Page
::
Project
::
Menu
.
perform
(
&
:click_members
)
Page
::
Project
::
Members
.
perform
do
|
project_members
|
project_members
.
invite_group
(
group
.
path
)
expect
(
project_members
).
to
have_group
(
group
.
path
)
end
Flow
::
Login
.
sign_in
(
as:
@user
)
Page
::
Dashboard
::
Projects
.
perform
do
|
projects
|
expect
(
projects
).
to
have_project_with_access_role
(
project
.
name
,
'Guest'
)
end
project
.
visit!
Page
::
Project
::
Show
.
perform
do
|
project_page
|
expect
(
project_page
).
to
have_name
(
project
.
name
)
end
end
end
before
(
:context
)
do
@user
=
Resource
::
User
.
fabricate_or_use
(
Runtime
::
Env
.
gitlab_qa_username_1
,
Runtime
::
Env
.
gitlab_qa_password_1
)
end
before
do
Runtime
::
Feature
.
enable
(
:invite_members_group_modal
)
Flow
::
Login
.
sign_in
group
.
add_member
(
@user
,
Resource
::
Members
::
AccessLevel
::
GUEST
)
project
.
visit!
end
context
'to personal namespace project'
,
testcase:
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/349223'
do
let
(
:group
)
do
Resource
::
Group
.
fabricate_via_api!
do
|
group
|
group
.
path
=
"group-for-personal-project-
#{
SecureRandom
.
hex
(
8
)
}
"
end
end
let
(
:project
)
do
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
name
=
'personal-namespace-project'
project
.
personal_namespace
=
Runtime
::
User
.
username
project
.
visibility
=
:private
project
.
description
=
'test personal namespace project'
end
end
it_behaves_like
'invites group to project'
end
context
'to group project'
,
testcase:
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/349340'
do
let
(
:group
)
do
Resource
::
Group
.
fabricate_via_api!
do
|
group
|
group
.
path
=
"group-for-group-project-
#{
SecureRandom
.
hex
(
8
)
}
"
end
end
let
(
:project
)
do
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
name
=
'group-project'
project
.
visibility
=
:private
project
.
description
=
'test group project'
end
end
it_behaves_like
'invites group to project'
end
after
do
project
&
.
remove_via_api!
group
&
.
remove_via_api!
Runtime
::
Feature
.
disable
(
:invite_members_group_modal
)
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