diff --git a/behat.yml b/behat.yml index 0e4f8ff..9ca6977 100644 --- a/behat.yml +++ b/behat.yml @@ -19,14 +19,10 @@ default: paths: [ '%paths.base%//features//profilereview.feature' ] contexts: [ 'ProfileReviewContext' ] sildisco_features: - contexts: ['SilDiscoContext'] + contexts: [ 'SilDiscoContext' ] paths: - - '%paths.base%//features//Sp1Idp1Sp2Idp2Sp3.feature' - - '%paths.base%//features//Sp1Idp2Sp2Sp3Idp1.feature' - - '%paths.base%//features//Sp2Idp2Sp1Idp1Sp3.feature' - - '%paths.base%//features//Sp2Idp2Sp1Idp2Sp3.feature' - - '%paths.base%//features//Sp3Idp1Sp1Idp1Sp2Idp2.feature' -# - '%paths.base%//features//WwwMetadataCept.feature' + - '%paths.base%//features//sildisco.feature' + # - '%paths.base%//features//WwwMetadataCept.feature' status_features: paths: [ '%paths.base%//features//status.feature' ] contexts: [ 'StatusContext' ] diff --git a/features/Sp1Idp2Sp2Sp3Idp1.feature b/features/Sp1Idp2Sp2Sp3Idp1.feature deleted file mode 100644 index fa32dcc..0000000 --- a/features/Sp1Idp2Sp2Sp3Idp1.feature +++ /dev/null @@ -1,22 +0,0 @@ -Feature: Ensure I can login to Sp1 through Idp2, am already logged in for Sp2, and must login to Sp3 through Idp1. - - Scenario: Login to SP1 through IDP2 - When I go to the SP1 login page - And the url should match "sildisco/disco.php" - And I should see "to continue to SP1" - And I click on the "IDP 2" tile - And I log in using my "IDP 2" credentials - Then I should see my attributes on SP1 - - Scenario: After IDP2 login, go directly to SP2 without credentials - Given I have authenticated with IDP2 for SP1 - When I go to the SP2 login page - Then I should see my attributes on SP2 - - Scenario: After IDP2 login, go to SP3 through IDP1 - Given I have authenticated with IDP2 for SP1 - When I go to the SP3 login page - And I should see "to continue to SP3" - And I click on the "IDP 1" tile - And I log in using my "IDP 1" credentials - Then I should see my attributes on SP3 diff --git a/features/Sp2Idp2Sp1Idp1Sp3.feature b/features/Sp2Idp2Sp1Idp1Sp3.feature deleted file mode 100644 index 26d54bc..0000000 --- a/features/Sp2Idp2Sp1Idp1Sp3.feature +++ /dev/null @@ -1,24 +0,0 @@ -Feature: Ensure I can login to Sp2 through Idp2, must login to Sp1 if I choose Idp1, and don't need to login for Sp3. - - Scenario: Login to SP2 through IDP2 - When I go to the SP2 login page - And I log in using my "IDP 2" credentials - Then I should see my attributes on SP2 - - Scenario: Login to SP1 through IDP1 - Given I have authenticated with IDP2 for SP2 - When I go to the SP1 login page - And the url should match "sildisco/disco.php" - And I click on the "IDP 1" tile - And I log in using my "IDP 1" credentials - Then I should see my attributes on SP1 - - Scenario: After IDP2 login, go directly to SP3 without credentials - Given I have authenticated with IDP2 for SP2 - And I have authenticated with IDP1 for SP1 - And I go to the SP3 login page - And the url should match "sildisco/disco.php" - And I should see "to continue to SP3" - And I click on the "IDP 1" tile - Then I should see my attributes on SP3 - diff --git a/features/Sp2Idp2Sp1Idp2Sp3.feature b/features/Sp2Idp2Sp1Idp2Sp3.feature deleted file mode 100644 index 7c73a54..0000000 --- a/features/Sp2Idp2Sp1Idp2Sp3.feature +++ /dev/null @@ -1,22 +0,0 @@ -Feature: Ensure I can login to Sp2 through Idp2, get discovery page for Sp1, and must login to Sp3 through Idp1. - - Scenario: Login to SP2 through IDP2 - When I go to the SP2 login page - And I log in using my "IDP 2" credentials - Then I should see my attributes on SP2 - - Scenario: Get discovery page for SP1 - Given I have authenticated with IDP2 for SP2 - When I go to the SP1 login page - And the url should match "sildisco/disco.php" - And I click on the "IDP 2" tile - Then I should see my attributes on SP1 - - Scenario: Must login to SP3 through IDP1 - Given I have authenticated with IDP2 for SP2 - When I go to the SP3 login page - And the url should match "sildisco/disco.php" - And I click on the "IDP 1" tile - And I log in using my "IDP 1" credentials - Then I should see my attributes on SP3 - diff --git a/features/Sp3Idp1Sp1Idp1Sp2Idp2.feature b/features/Sp3Idp1Sp1Idp1Sp2Idp2.feature deleted file mode 100644 index 2db76fa..0000000 --- a/features/Sp3Idp1Sp1Idp1Sp2Idp2.feature +++ /dev/null @@ -1,22 +0,0 @@ -Feature: Ensure I can login to Sp3 through Idp1, get the discovery page for Sp1 and must login to Sp2 through Idp2. - - Scenario: login to SP3 using IDP1 - When I go to the SP3 login page - And the url should match "sildisco/disco.php" - And I should see "to continue to SP3" - And I click on the "IDP 1" tile - And I log in using my "IDP 1" credentials - Then I should see my attributes on SP3 - - Scenario: having authenticated with IDP1 for SP3, go to SP1 via the discovery page - Given I have authenticated with IDP1 for SP3 - When I go to the SP1 login page - And the url should match "sildisco/disco.php" - And I click on the "IDP 1" tile - Then I should see my attributes on SP1 - - Scenario: having authenticated with IDP1 for SP3, login to SP2 using IDP2 - Given I have authenticated with IDP1 for SP3 - When I go to the SP2 login page - And I log in using my "IDP 2" credentials - Then I should see my attributes on SP2 diff --git a/features/Sp1Idp1Sp2Idp2Sp3.feature b/features/sildisco.feature similarity index 50% rename from features/Sp1Idp1Sp2Idp2Sp3.feature rename to features/sildisco.feature index aaf4ee9..b0705fa 100644 --- a/features/Sp1Idp1Sp2Idp2Sp3.feature +++ b/features/sildisco.feature @@ -1,6 +1,6 @@ -Feature: Ensure I can login to Sp1 through Idp1, must login to Sp2 through Idp2 and am already logged in for Sp3. +Feature: SIL IdP discovery (sildisco) module - Scenario: Login to SP1 through IDP1 + Scenario: Expect discovery page and login prompt When I go to the SP1 login page And the url should match "sildisco/disco.php" And I should see "to continue to SP1" @@ -8,13 +8,12 @@ Feature: Ensure I can login to Sp1 through Idp1, must login to Sp2 through Idp2 And I log in using my "IDP 1" credentials Then I should see my attributes on SP1 - Scenario: After IDP1 login, go to SP2 through IDP2 - Given I have authenticated with IDP1 for SP1 - When I go to the SP2 login page + Scenario: Skip discovery page with only one approved IdP + Given I go to the SP2 login page And I log in using my "IDP 2" credentials Then I should see my attributes on SP2 - Scenario: After IDP1 login, go directly to SP3 without credentials + Scenario: Skip login prompt with existing authentication session Given I have authenticated with IDP1 for SP1 When I go to the SP3 login page And the url should match "sildisco/disco.php" @@ -22,12 +21,20 @@ Feature: Ensure I can login to Sp1 through Idp1, must login to Sp2 through Idp2 And I click on the "IDP 1" tile Then I should see my attributes on SP3 - Scenario: Logout of IDP1 + Scenario: Skip discovery and login prompt + Given I have authenticated with IDP2 for SP1 + When I go to the SP2 login page + Then I should see my attributes on SP2 + + Scenario: Show discovery AND login prompt with existing session on different IdP + Given I have authenticated with IDP2 for SP1 + When I go to the SP3 login page + And I should see "to continue to SP3" + And I click on the "IDP 1" tile + And I log in using my "IDP 1" credentials + Then I should see my attributes on SP3 + + Scenario: IdP Logout Given I have authenticated with IDP1 for SP1 When I log out of IDP1 Then I should see "You have now been logged out." - - Scenario: Logout of IDP2 - Given I have authenticated with IDP2 for SP2 - When I log out of IDP2 - Then I should see "You have now been logged out."