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
ae532993
Commit
ae532993
authored
Nov 06, 2018
by
Sanad Liaquat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added admin test
parent
a225a849
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
5 deletions
+29
-5
qa/qa/page/main/menu.rb
qa/qa/page/main/menu.rb
+6
-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
+23
-5
No files found.
qa/qa/page/main/menu.rb
View file @
ae532993
...
...
@@ -68,6 +68,12 @@ module QA
end
end
def
has_admin_area_link?
(
wait:
Capybara
.
default_max_wait_time
)
using_wait_time
(
wait
)
do
page
.
has_selector?
(
element_selector_css
(
:admin_area_link
))
end
end
private
def
within_top_menu
...
...
qa/qa/specs/features/browser_ui/1_manage/ee_group/group_ldap_sync_spec.rb
View file @
ae532993
# frozen_string_literal: true
module
QA
# context 'Manage', :orchestrated, :ldap_tls do
context
'Manage'
do
describe
'LDAP Group Sync'
do
context
'Manage'
,
:orchestrated
,
:ldap_tls
,
:ldap_no_tls
do
describe
'LDAP Sync'
do
it
'syncs admin users'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
perform
do
|
login_page
|
login_page
.
sign_in_using_ldap_credentials
(
username:
'adminuser1'
,
password:
'password'
)
end
Page
::
Main
::
Menu
.
perform
do
|
menu
|
expect
(
menu
).
to
have_personal_area
# The ldap_sync_worker_cron job is set to run every minute
admin_synchronised
=
menu
.
wait
(
max:
65
,
time:
1
,
reload:
true
)
do
menu
.
has_admin_area_link?
end
expect
(
admin_synchronised
).
to
be_truthy
end
end
it
'Has LDAP user synced using group cn method'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
...
...
@@ -74,15 +93,14 @@ module QA
end
def
verify_users_synched
(
expected_users
)
users_synchronised
=
false
EE
::
Page
::
Group
::
Members
.
perform
do
|
page
|
page
.
click_sync_now
users_synchronised
=
page
.
with_retry
(
reload:
true
)
do
expected_users
.
map
{
|
user
|
page
.
has_content?
(
user
)
}.
reduce
(
true
)
{
|
a
,
b
|
a
&&
b
}
end
expect
(
users_synchronised
).
to
be_truthy
end
expect
(
users_synchronised
).
to
be_truthy
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