[java-idp-integration-tests] branch master updated: IDP-1323 - Tests for ToU and IsPassive
Tom Zeller
tzeller at dragonacea.biz
Thu Sep 27 11:53:31 EDT 2018
This is an automated email from the git hooks/post-receive script.
tzeller pushed a commit to branch master
in repository java-idp-integration-tests.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-integration-tests.git;a=commit;h=049e0fd4e4d43822dce3b7ebf7d40a499ce7740d
The following commit(s) were added to refs/heads/master by this push:
new 049e0fd IDP-1323 - Tests for ToU and IsPassive
049e0fd is described below
commit 049e0fd4e4d43822dce3b7ebf7d40a499ce7740d
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Thu Sep 27 10:52:01 2018 -0500
IDP-1323 - Tests for ToU and IsPassive
https://issues.shibboleth.net/jira/browse/IDP-1323
---
.../test/saml2/AbstractSAML2IntegrationTest.java | 99 +++++++++++++++++++++-
.../saml2/SAML2SSORedirectIntegrationTest.java | 10 +++
2 files changed, 106 insertions(+), 3 deletions(-)
diff --git a/src/test/java/net/shibboleth/idp/test/saml2/AbstractSAML2IntegrationTest.java b/src/test/java/net/shibboleth/idp/test/saml2/AbstractSAML2IntegrationTest.java
index f2cf2b3..f26d741 100644
--- a/src/test/java/net/shibboleth/idp/test/saml2/AbstractSAML2IntegrationTest.java
+++ b/src/test/java/net/shibboleth/idp/test/saml2/AbstractSAML2IntegrationTest.java
@@ -447,6 +447,99 @@ public abstract class AbstractSAML2IntegrationTest extends BaseIntegrationTest {
}
/**
+ * Test IsPassive SAML 2 SSO terms of use flow.
+ *
+ * @param browserData browser/os/version triplet provided by data provider
+ * @throws Exception if an error occurs
+ */
+ public void testSSOTermsOfUsePassive(@Nullable final BrowserData browserData) throws Exception {
+
+ startSeleniumClient(browserData);
+
+ enableCustomRelyingPartyConfiguration();
+
+ // startServer();
+
+ startFlow();
+
+ waitForLoginPage();
+
+ login();
+
+ // terms of use
+
+ waitForTermsOfUsePage();
+
+ acceptTermsOfUse();
+
+ submitForm();
+
+ // attribute release
+
+ waitForAttributeReleasePage();
+
+ releaseAllAttributes();
+
+ rememberConsent();
+
+ submitForm();
+
+ // response
+
+ waitForResponsePage();
+
+ validateResponse();
+
+ // isPassive
+
+ driver.get(getBaseURL() + isPassiveRequestURLPath);
+
+ waitForResponsePage();
+
+ validateResponse();
+ }
+
+ /**
+ * Test IsPassive SAML 2 SSO terms of use flow with no previous consent.
+ *
+ * @param browserData browser/os/version triplet provided by data provider
+ * @throws Exception if an error occurs
+ */
+ public void testSSOTermsOfUsePassiveNoConsent(@Nullable final BrowserData browserData) throws Exception {
+
+ startSeleniumClient(browserData);
+
+ enableCustomRelyingPartyConfiguration();
+
+ // startServer();
+
+ startFlow();
+
+ waitForLoginPage();
+
+ login();
+
+ // terms of use
+
+ waitForTermsOfUsePage();
+
+ // do not accept ToU
+
+ // isPassive
+ driver.get(getBaseURL() + isPassiveRequestURLPath);
+
+ waitForResponsePage();
+
+ final SAML2TestResponseValidator passiveValidator = new SAML2TestResponseValidator();
+ passiveValidator.spCredential = getSPCredential();
+ passiveValidator.statusCode = StatusCode.REQUESTER;
+ passiveValidator.statusCodeNested = StatusCode.NO_PASSIVE;
+ passiveValidator.statusMessage = "An error occurred.";
+
+ passiveValidator.validateResponse(unmarshallResponse(getPageSource()));
+ }
+
+ /**
* Test SAML 2 SSO ForceAuthn.
*
* @param browserData browser/os/version triplet provided by data provider
@@ -494,7 +587,7 @@ public abstract class AbstractSAML2IntegrationTest extends BaseIntegrationTest {
}
/**
- * Test SSO isPasive without a session.
+ * Test SSO IsPassive without a session.
*
* @param browserData browser/os/version triplet provided by data provider
* @throws Exception if an error occurs
@@ -520,7 +613,7 @@ public abstract class AbstractSAML2IntegrationTest extends BaseIntegrationTest {
}
/**
- * Test SSO isPassive with a pre-existing session.
+ * Test SSO IsPassive with a pre-existing session.
*
* @param browserData browser/os/version triplet provided by data provider
* @throws Exception if an error occurs
@@ -565,7 +658,7 @@ public abstract class AbstractSAML2IntegrationTest extends BaseIntegrationTest {
}
/**
- * Test SSO isPassive with a pre-existing session.
+ * Test SSO IsPassive with a pre-existing session.
*
* @param browserData browser/os/version triplet provided by data provider
* @throws Exception if an error occurs
diff --git a/src/test/java/net/shibboleth/idp/test/saml2/SAML2SSORedirectIntegrationTest.java b/src/test/java/net/shibboleth/idp/test/saml2/SAML2SSORedirectIntegrationTest.java
index 25a7298..659801e 100644
--- a/src/test/java/net/shibboleth/idp/test/saml2/SAML2SSORedirectIntegrationTest.java
+++ b/src/test/java/net/shibboleth/idp/test/saml2/SAML2SSORedirectIntegrationTest.java
@@ -73,6 +73,16 @@ public class SAML2SSORedirectIntegrationTest extends AbstractSAML2IntegrationTes
}
@Test(dataProvider = "sauceOnDemandBrowserDataProvider")
+ public void testSSOTermsOfUsePassive(@Nullable final BrowserData browserData) throws Exception {
+ super.testSSOTermsOfUsePassive(browserData);
+ }
+
+ @Test(dataProvider = "sauceOnDemandBrowserDataProvider")
+ public void testSSOTermsOfUsePassiveNoConsent(@Nullable final BrowserData browserData) throws Exception {
+ super.testSSOTermsOfUsePassiveNoConsent(browserData);
+ }
+
+ @Test(dataProvider = "sauceOnDemandBrowserDataProvider")
public void testSSOForceAuthn(@Nullable final BrowserData browserData) throws Exception {
super.testSSOForceAuthn(browserData);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list