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
d85adbac
Commit
d85adbac
authored
Nov 13, 2018
by
Sanad Liaquat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Now using API to create group
parent
588ff19a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
4 deletions
+22
-4
qa/qa/page/main/login.rb
qa/qa/page/main/login.rb
+10
-0
qa/qa/resource/api_fabricator.rb
qa/qa/resource/api_fabricator.rb
+4
-0
qa/qa/specs/features/browser_ui/1_manage/ee_group/group_ldap_sync_spec.rb
...ures/browser_ui/1_manage/ee_group/group_ldap_sync_spec.rb
+8
-4
No files found.
qa/qa/page/main/login.rb
View file @
d85adbac
...
...
@@ -65,6 +65,16 @@ module QA
end
def
sign_in_using_admin_credentials
# Don't try to log-in if we're already logged-in as admin
return
if
Page
::
Main
::
Menu
.
perform
do
|
menu
|
menu
.
has_admin_area_link?
(
wait:
0
)
end
# If already logged in as non admin, logout first
Page
::
Main
::
Menu
.
perform
do
|
menu
|
menu
.
sign_out
if
menu
.
has_personal_area?
(
wait:
0
)
end
admin
=
QA
::
Resource
::
User
.
new
.
tap
do
|
user
|
user
.
username
=
QA
::
Runtime
::
User
.
admin_username
user
.
password
=
QA
::
Runtime
::
User
.
admin_password
...
...
qa/qa/resource/api_fabricator.rb
View file @
d85adbac
...
...
@@ -101,6 +101,8 @@ module QA
url:
url
,
payload:
payload
,
verify_ssl:
false
)
rescue
RestClient
::
ExceptionWithResponse
=>
e
e
.
response
end
def
get
(
url
)
...
...
@@ -108,6 +110,8 @@ module QA
method: :get
,
url:
url
,
verify_ssl:
false
)
rescue
RestClient
::
ExceptionWithResponse
=>
e
e
.
response
end
end
end
...
...
qa/qa/specs/features/browser_ui/1_manage/ee_group/group_ldap_sync_spec.rb
View file @
d85adbac
...
...
@@ -23,7 +23,7 @@ module QA
create_users_via_api
(
users
)
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
create_
sandbox_group_with_user
(
user:
'enguser1'
,
group_name:
'Synched-engineering-group'
)
create_
group_with_user_via_api
(
user:
'enguser1'
,
group_name:
'Synched-engineering-group'
)
EE
::
Page
::
Group
::
Menu
.
perform
(
&
:go_to_ldap_sync_settings
)
...
...
@@ -60,7 +60,7 @@ module QA
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
create_
sandbox_group_with_user
(
user:
'hruser1'
,
group_name:
'Synched-human-resources-group'
)
create_
group_with_user_via_api
(
user:
'hruser1'
,
group_name:
'Synched-human-resources-group'
)
EE
::
Page
::
Group
::
Menu
.
perform
(
&
:go_to_ldap_sync_settings
)
...
...
@@ -86,7 +86,7 @@ module QA
end
end
def
create_
sandbox_group_with_user
(
user:
nil
,
group_name:
nil
)
def
create_
group_with_user_via_api
(
user:
nil
,
group_name:
nil
)
Page
::
Main
::
Login
.
perform
do
|
login_page
|
login_page
.
sign_in_using_ldap_credentials
(
username:
user
,
password:
'password'
)
end
...
...
@@ -95,9 +95,13 @@ module QA
expect
(
menu
).
to
have_personal_area
end
Resource
::
Sandbox
.
fabricate_via_browser_ui!
do
|
resource
|
Runtime
::
Env
.
personal_access_token
=
Resource
::
PersonalAccessToken
.
fabricate!
.
access_token
group
=
Resource
::
Sandbox
.
fabricate_via_api!
do
|
resource
|
resource
.
path
=
"
#{
group_name
}
-
#{
SecureRandom
.
hex
(
4
)
}
"
end
group
.
visit!
end
def
verify_users_synched
(
expected_users
)
...
...
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