Skip to content

Commit

Permalink
simplify sildisco integration tests, removing equivalent scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Jul 22, 2024
1 parent dc91be4 commit e995c89
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 109 deletions.
10 changes: 3 additions & 7 deletions behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' ]
22 changes: 0 additions & 22 deletions features/Sp1Idp2Sp2Sp3Idp1.feature

This file was deleted.

24 changes: 0 additions & 24 deletions features/Sp2Idp2Sp1Idp1Sp3.feature

This file was deleted.

22 changes: 0 additions & 22 deletions features/Sp2Idp2Sp1Idp2Sp3.feature

This file was deleted.

22 changes: 0 additions & 22 deletions features/Sp3Idp1Sp1Idp1Sp2Idp2.feature

This file was deleted.

31 changes: 19 additions & 12 deletions features/Sp1Idp1Sp2Idp2Sp3.feature → features/sildisco.feature
Original file line number Diff line number Diff line change
@@ -1,33 +1,40 @@
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"
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 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"
And I should see "to continue to SP3"
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."

0 comments on commit e995c89

Please sign in to comment.