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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
9638ecbc
Commit
9638ecbc
authored
Feb 04, 2018
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add QA specs for LDAP login
parent
5aea8dc1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
0 deletions
+44
-0
qa/qa.rb
qa/qa.rb
+1
-0
qa/qa/page/main/login.rb
qa/qa/page/main/login.rb
+17
-0
qa/qa/scenario/test/integration/ldap.rb
qa/qa/scenario/test/integration/ldap.rb
+11
-0
qa/qa/specs/features/login/ldap_spec.rb
qa/qa/specs/features/login/ldap_spec.rb
+15
-0
No files found.
qa/qa.rb
View file @
9638ecbc
...
@@ -64,6 +64,7 @@ module QA
...
@@ -64,6 +64,7 @@ module QA
autoload
:Instance
,
'qa/scenario/test/instance'
autoload
:Instance
,
'qa/scenario/test/instance'
module
Integration
module
Integration
autoload
:Ldap
,
'qa/scenario/test/integration/ldap'
autoload
:Mattermost
,
'qa/scenario/test/integration/mattermost'
autoload
:Mattermost
,
'qa/scenario/test/integration/mattermost'
end
end
...
...
qa/qa/page/main/login.rb
View file @
9638ecbc
...
@@ -14,12 +14,27 @@ module QA
...
@@ -14,12 +14,27 @@ module QA
element
:sign_in_button
,
'submit "Sign in"'
element
:sign_in_button
,
'submit "Sign in"'
end
end
view
'app/views/devise/sessions/_new_ldap.html.haml'
do
element
:username_field
,
'text_field_tag :username'
element
:password_field
,
'password_field_tag :password'
element
:sign_in_button
,
'submit_tag "Sign in"'
end
def
initialize
def
initialize
wait
(
max:
500
)
do
wait
(
max:
500
)
do
page
.
has_css?
(
'.application'
)
page
.
has_css?
(
'.application'
)
end
end
end
end
def
sign_in_using_ldap_credentials
click_link
'LDAP'
fill_in
:username
,
with:
Runtime
::
User
.
name
fill_in
:password
,
with:
Runtime
::
User
.
password
click_button
'Sign in'
end
def
sign_in_using_credentials
def
sign_in_using_credentials
using_wait_time
0
do
using_wait_time
0
do
if
page
.
has_content?
(
'Change your password'
)
if
page
.
has_content?
(
'Change your password'
)
...
@@ -28,6 +43,8 @@ module QA
...
@@ -28,6 +43,8 @@ module QA
click_button
'Change your password'
click_button
'Change your password'
end
end
click_link
'Standard'
if
page
.
has_content?
(
'LDAP'
)
fill_in
:user_login
,
with:
Runtime
::
User
.
name
fill_in
:user_login
,
with:
Runtime
::
User
.
name
fill_in
:user_password
,
with:
Runtime
::
User
.
password
fill_in
:user_password
,
with:
Runtime
::
User
.
password
click_button
'Sign in'
click_button
'Sign in'
...
...
qa/qa/scenario/test/integration/ldap.rb
0 → 100644
View file @
9638ecbc
module
QA
module
Scenario
module
Test
module
Integration
class
Ldap
<
Test
::
Instance
tags
:ldap
end
end
end
end
end
qa/qa/specs/features/login/ldap_spec.rb
0 → 100644
View file @
9638ecbc
module
QA
feature
'LDAP user login'
,
:ldap
do
scenario
'user logs in using LDAP credentials'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_ldap_credentials
}
# TODO, since `Signed in successfully` message was removed
# this is the only way to tell if user is signed in correctly.
#
Page
::
Menu
::
Main
.
perform
do
|
menu
|
expect
(
menu
).
to
have_personal_area
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