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
f4c0abd5
Commit
f4c0abd5
authored
Nov 05, 2018
by
Sanad Liaquat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test is complete
parent
4ef33e00
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
161 additions
and
10 deletions
+161
-10
app/views/layouts/nav/sidebar/_group.html.haml
app/views/layouts/nav/sidebar/_group.html.haml
+1
-1
ee/app/views/groups/ee/_settings_nav.html.haml
ee/app/views/groups/ee/_settings_nav.html.haml
+1
-1
ee/app/views/groups/group_members/_sync_button.html.haml
ee/app/views/groups/group_members/_sync_button.html.haml
+1
-1
ee/app/views/ldap_group_links/_form.html.haml
ee/app/views/ldap_group_links/_form.html.haml
+2
-2
qa/qa.rb
qa/qa.rb
+1
-0
qa/qa/ee.rb
qa/qa/ee.rb
+2
-0
qa/qa/ee/page/group/members.rb
qa/qa/ee/page/group/members.rb
+19
-0
qa/qa/ee/page/group/menu.rb
qa/qa/ee/page/group/menu.rb
+16
-0
qa/qa/ee/page/group/settings/ldap_sync.rb
qa/qa/ee/page/group/settings/ldap_sync.rb
+33
-0
qa/qa/page/component/select2_search.rb
qa/qa/page/component/select2_search.rb
+18
-0
qa/qa/page/main/login.rb
qa/qa/page/main/login.rb
+5
-5
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
+62
-0
No files found.
app/views/layouts/nav/sidebar/_group.html.haml
View file @
f4c0abd5
...
...
@@ -108,7 +108,7 @@
=
link_to
group_group_members_path
(
@group
)
do
.nav-icon-container
=
sprite_icon
(
'users'
)
%span
.nav-item-name
%span
.nav-item-name
.qa-group-members-item
=
_
(
'Members'
)
%ul
.sidebar-sub-level-items.is-fly-out-only
=
nav_link
(
path:
'group_members#index'
,
html_options:
{
class:
"fly-out-top-item"
}
)
do
...
...
ee/app/views/groups/ee/_settings_nav.html.haml
View file @
f4c0abd5
-
if
Gitlab
::
Auth
::
LDAP
::
Config
.
group_sync_enabled?
&&
can?
(
current_user
,
:admin_ldap_group_links
,
@group
)
=
nav_link
(
path:
'ldap_group_links#index'
)
do
=
link_to
group_ldap_group_links_path
(
@group
),
title:
'LDAP Group'
do
=
link_to
group_ldap_group_links_path
(
@group
),
title:
'LDAP Group'
,
class:
'qa-ldap-synchronization-link'
do
%span
LDAP Synchronization
...
...
ee/app/views/groups/group_members/_sync_button.html.haml
View file @
f4c0abd5
...
...
@@ -7,7 +7,7 @@
=
icon
(
"refresh spin"
)
Pending sync
…
-
else
=
link_to
sync_group_ldap_path
(
@group
),
method: :put
,
class:
'btn'
do
=
link_to
sync_group_ldap_path
(
@group
),
method: :put
,
class:
'btn
qa-sync-now-button
'
do
=
icon
(
"refresh"
)
Sync now
-
if
@group
.
ldap_sync_ready?
&&
@group
.
ldap_sync_last_successful_update_at
...
...
ee/app/views/ldap_group_links/_form.html.haml
View file @
f4c0abd5
...
...
@@ -25,7 +25,7 @@
=
f
.
label
:cn
,
class:
'col-form-label col-sm-2'
do
LDAP Group cn
.col-sm-10
=
f
.
hidden_field
:cn
,
placeholder:
'Ex. QA group'
,
class:
'xxlarge ajax-ldap-groups-select input-mn-300'
=
f
.
hidden_field
:cn
,
placeholder:
'Ex. QA group'
,
class:
'xxlarge ajax-ldap-groups-select input-mn-300
qa-ldap-group-cn-select
'
.form-text.text-muted
Synchronize
#{
group
.
name
}
's members with this LDAP group.
%br
...
...
@@ -54,4 +54,4 @@
You can manage permission levels for individual group members in the Members tab.
.form-actions
=
f
.
submit
'Add synchronization'
,
class:
'btn btn-success'
=
f
.
submit
'Add synchronization'
,
class:
'btn btn-success
qa-add-sync-button
'
qa/qa.rb
View file @
f4c0abd5
...
...
@@ -276,6 +276,7 @@ module QA
autoload
:GroupsFilter
,
'qa/page/component/groups_filter'
autoload
:Select2
,
'qa/page/component/select2'
autoload
:DropdownFilter
,
'qa/page/component/dropdown_filter'
autoload
:Select2Search
,
'qa/page/component/select2_search'
autoload
:UsersSelect
,
'qa/page/component/users_select'
module
Issuable
...
...
qa/qa/ee.rb
View file @
f4c0abd5
...
...
@@ -17,9 +17,11 @@ module QA
module
Group
autoload
:Menu
,
'qa/ee/page/group/menu'
autoload
:SamlSSOSignIn
,
'qa/ee/page/group/saml_sso_sign_in'
autoload
:Members
,
'qa/ee/page/group/members'
module
Settings
autoload
:SamlSSO
,
'qa/ee/page/group/settings/saml_sso'
autoload
:LDAPSync
,
'qa/ee/page/group/settings/ldap_sync'
end
end
...
...
qa/qa/ee/page/group/members.rb
0 → 100644
View file @
f4c0abd5
# frozen_string_literal: true
module
QA
module
EE
module
Page
module
Group
class
Members
<
QA
::
Page
::
Base
view
'ee/app/views/groups/group_members/_sync_button.html.haml'
do
element
:sync_now_button
end
def
click_sync_now
click_element
:sync_now_button
end
end
end
end
end
end
qa/qa/ee/page/group/menu.rb
View file @
f4c0abd5
...
...
@@ -7,12 +7,14 @@ module QA
class
Menu
<
::
QA
::
Page
::
Base
view
'ee/app/views/groups/ee/_settings_nav.html.haml'
do
element
:group_saml_sso_link
element
:ldap_synchronization_link
end
view
'app/views/layouts/nav/sidebar/_group.html.haml'
do
element
:group_sidebar
element
:group_sidebar_submenu
element
:group_settings_item
element
:group_members_item
end
view
'ee/app/views/layouts/nav/ee/_epic_link.html.haml'
do
...
...
@@ -27,6 +29,20 @@ module QA
end
end
def
go_to_ldap_sync_settings
hover_settings
do
within_submenu
do
click_element
(
:ldap_synchronization_link
)
end
end
end
def
go_to_members
within_sidebar
do
click_element
(
:group_members_item
)
end
end
def
go_to_group_epics
within_sidebar
do
click_element
(
:group_epics_link
)
...
...
qa/qa/ee/page/group/settings/ldap_sync.rb
0 → 100644
View file @
f4c0abd5
# frozen_string_literal: true
module
QA
module
EE
module
Page
module
Group
module
Settings
class
LDAPSync
<
::
QA
::
Page
::
Base
include
QA
::
Page
::
Component
::
Select2Search
view
'ee/app/views/ldap_group_links/_form.html.haml'
do
element
:ldap_group_cn_select
element
:add_sync_button
end
def
set_sync_method
(
method
)
choose
method
end
def
set_group_cn
(
group_cn
)
click_element
:ldap_group_cn_select
search_and_select
(
group_cn
)
end
def
click_add_sync_button
click_element
:add_sync_button
end
end
end
end
end
end
end
qa/qa/page/component/select2_search.rb
0 → 100644
View file @
f4c0abd5
# frozen_string_literal: true
module
QA
module
Page
module
Component
module
Select2Search
def
search_and_select
(
item
)
wait
(
reload:
false
)
do
page
.
has_css?
(
'.select2-input'
)
end
find
(
'.select2-input'
).
set
(
item
)
find
(
'.select2-result-label'
,
text:
item
).
click
end
end
end
end
end
qa/qa/page/main/login.rb
View file @
f4c0abd5
...
...
@@ -124,16 +124,16 @@ module QA
click_element
:standard_tab
end
private
def
sign_in_using_ldap_credentials
def
sign_in_using_ldap_credentials
(
username:
Runtime
::
User
.
ldap_username
,
password:
Runtime
::
User
.
ldap_password
)
switch_to_ldap_tab
fill_element
:username_field
,
Runtime
::
User
.
ldap_
username
fill_element
:password_field
,
Runtime
::
User
.
ldap_
password
fill_element
:username_field
,
username
fill_element
:password_field
,
password
click_element
:sign_in_button
end
private
def
sign_in_with_saml
set_initial_password_if_present
click_element
:saml_login_button
...
...
qa/qa/specs/features/browser_ui/1_manage/ee_group/group_ldap_sync_spec.rb
0 → 100644
View file @
f4c0abd5
# frozen_string_literal: true
module
QA
context
'Manage'
,
:orchestrated
,
:ldap_tls
do
describe
'LDAP Group Sync'
do
it
'Has LDAP user synced with group'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
# Login and Logout enguser3
Page
::
Main
::
Login
.
perform
do
|
login_page
|
login_page
.
sign_in_using_ldap_credentials
(
username:
'enguser3'
,
password:
'password'
)
end
Page
::
Main
::
Menu
.
perform
do
|
menu
|
expect
(
menu
).
to
have_personal_area
end
Page
::
Main
::
Menu
.
perform
(
&
:sign_out
)
# Login and Logout enguser2
Page
::
Main
::
Login
.
perform
do
|
login_page
|
login_page
.
sign_in_using_ldap_credentials
(
username:
'enguser2'
,
password:
'password'
)
end
Page
::
Main
::
Menu
.
perform
do
|
menu
|
expect
(
menu
).
to
have_personal_area
end
Page
::
Main
::
Menu
.
perform
(
&
:sign_out
)
# Login enguser1
Page
::
Main
::
Login
.
perform
do
|
login_page
|
login_page
.
sign_in_using_ldap_credentials
(
username:
'enguser1'
,
password:
'password'
)
end
Page
::
Main
::
Menu
.
perform
do
|
menu
|
expect
(
menu
).
to
have_personal_area
end
# Create a sand box group
Factory
::
Resource
::
Sandbox
.
fabricate_via_browser_ui!
do
|
resource
|
resource
.
path
=
"Synched-engineering-group-
#{
SecureRandom
.
hex
(
4
)
}
"
end
EE
::
Page
::
Group
::
Menu
.
perform
(
&
:go_to_ldap_sync_settings
)
EE
::
Page
::
Group
::
Settings
::
LDAPSync
.
perform
do
|
page
|
page
.
set_sync_method
(
'LDAP Group cn'
)
page
.
set_group_cn
(
'Engineering'
)
page
.
click_add_sync_button
end
EE
::
Page
::
Group
::
Menu
.
perform
(
&
:go_to_members
)
EE
::
Page
::
Group
::
Members
.
perform
(
&
:click_sync_now
)
expect
(
page
).
to
have_content
(
'ENG User 2'
)
expect
(
page
).
to
have_content
(
'ENG User 3'
)
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