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
03bc47fc
Commit
03bc47fc
authored
Oct 18, 2018
by
Sanad Liaquat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce duplication, use .or on assertions
parent
1255b3dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
10 deletions
+12
-10
qa/qa/specs/features/browser_ui/1_manage/ee_group/group_saml_sso_spec.rb
...tures/browser_ui/1_manage/ee_group/group_saml_sso_spec.rb
+10
-9
qa/qa/specs/features/browser_ui/1_manage/login/login_via_instance_wide_saml_sso_spec.rb
...i/1_manage/login/login_via_instance_wide_saml_sso_spec.rb
+1
-1
qa/qa/specs/runner.rb
qa/qa/specs/runner.rb
+1
-0
No files found.
qa/qa/specs/features/browser_ui/1_manage/ee_group/group_saml_sso_spec.rb
View file @
03bc47fc
...
@@ -23,14 +23,7 @@ module QA
...
@@ -23,14 +23,7 @@ module QA
EE
::
Page
::
Group
::
SamlSSOSignIn
.
act
{
click_signin
}
EE
::
Page
::
Group
::
SamlSSOSignIn
.
act
{
click_signin
}
Vendor
::
SAMLIdp
::
Page
::
Login
.
perform
do
|
login_page
|
login_to_idp_if_required_and_expect_success
if
login_page
.
login_required?
login_page
.
login
expect
(
page
).
to
have_content
(
"SAML for
#{
Runtime
::
Env
.
sandbox_name
}
was added to your connected accounts"
)
else
expect
(
page
).
to
have_content
(
"Signed in with SAML for
#{
Runtime
::
Env
.
sandbox_name
}
"
)
end
end
EE
::
Page
::
Group
::
Menu
.
act
{
go_to_saml_sso_group_settings
}
EE
::
Page
::
Group
::
Menu
.
act
{
go_to_saml_sso_group_settings
}
...
@@ -52,10 +45,18 @@ module QA
...
@@ -52,10 +45,18 @@ module QA
click_test_button
click_test_button
end
end
Vendor
::
SAMLIdp
::
Page
::
Login
.
act
{
login_if_required
}
login_to_idp_if_required_and_expect_success
expect
(
page
).
to
have_content
(
"Test SAML SSO"
)
expect
(
page
).
to
have_content
(
"Test SAML SSO"
)
end
end
end
end
def
login_to_idp_if_required_and_expect_success
Vendor
::
SAMLIdp
::
Page
::
Login
.
act
{
login_if_required
}
expect
(
page
).
to
have_content
(
"SAML for
#{
Runtime
::
Env
.
sandbox_name
}
was added to your connected accounts"
)
.
or
have_content
(
"Signed in with SAML for
#{
Runtime
::
Env
.
sandbox_name
}
"
)
end
end
end
end
end
qa/qa/specs/features/browser_ui/1_manage/login/login_via_instance_wide_saml_sso_spec.rb
View file @
03bc47fc
...
@@ -8,7 +8,7 @@ module QA
...
@@ -8,7 +8,7 @@ module QA
Page
::
Main
::
Login
.
act
{
sign_in_with_saml
}
Page
::
Main
::
Login
.
act
{
sign_in_with_saml
}
Vendor
::
SAMLIdp
::
Page
::
Login
.
act
{
login
_if_required
}
Vendor
::
SAMLIdp
::
Page
::
Login
.
act
{
login
}
expect
(
page
).
to
have_content
(
'Welcome to GitLab'
)
expect
(
page
).
to
have_content
(
'Welcome to GitLab'
)
end
end
...
...
qa/qa/specs/runner.rb
View file @
03bc47fc
require
'rspec/core'
require
'rspec/core'
require
'rspec/expectations'
module
QA
module
QA
module
Specs
module
Specs
...
...
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