-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add activation flow preference test #17
Open
pablothedude
wants to merge
2
commits into
main
Choose a base branch
from
feature/add-activation-flow-preference-test
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
stepup/tests/behat/features/selfservice_activation_flow.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
Feature: A user manages his tokens in the SelfService portal | ||
In order to use a second factor token | ||
As a user | ||
I must be able to manage my second factor tokens | ||
|
||
Scenario: A user registers a Yubikey token in selfservice using RA vetting preference | ||
Given I receive the following attributes for "joe-a4" from the IdP: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Awesome test!! Suggestion: maybe create a dedicated step definition to indicate you expect the IdP to release no attributes? Perhaps a bit more expressive than the empty table? |
||
| name | value | | ||
And I log into the selfservice portal as "joe-a4" with activation preference "ra" | ||
When I register a new "Yubikey" token | ||
And I verify my e-mail address | ||
And I visit the "overview" page in the selfservice portal | ||
And I activate my token | ||
Then I should see "Activation code" | ||
|
||
Scenario: A user registers a Yubikey token in selfservice using self vetting preference | ||
Given I receive the following attributes for "joe-a5" from the IdP: | ||
| name | value | | ||
And I log into the selfservice portal as "joe-a5" with activation preference "self" | ||
When I register a new "Yubikey" token | ||
And I verify my e-mail address | ||
And I visit the "overview" page in the selfservice portal | ||
And I activate my token | ||
Then I should see "Add recovery method" | ||
|
||
Scenario: A user registers a Yubikey token in selfservice using RA vetting preference set through eduPersonEntitlement attribute | ||
Given I receive the following attributes for "jane-a4" from the IdP: | ||
| name | value | | ||
| urn:mace:dir:attribute-def:eduPersonEntitlement | urn:mace:surf.nl:surfsecureid:activation:ra | | ||
And I am logged in into the selfservice portal as "jane-a4" | ||
When I register a new "Yubikey" token | ||
And I verify my e-mail address | ||
And I visit the "overview" page in the selfservice portal | ||
And I activate my token | ||
Then I should see "Activation code" | ||
|
||
Scenario: A user registers a Yubikey token in selfservice using self vetting preference set through eduPersonEntitlement attribute | ||
Given I receive the following attributes for "jane-a5" from the IdP: | ||
| name | value | | ||
| urn:mace:dir:attribute-def:eduPersonEntitlement | urn:mace:surf.nl:surfsecureid:activation:self | | ||
And I am logged in into the selfservice portal as "jane-a5" | ||
When I register a new "Yubikey" token | ||
And I verify my e-mail address | ||
And I visit the "overview" page in the selfservice portal | ||
And I activate my token | ||
Then I should see "Add recovery method" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome to cover these vetting nudging flows in the behat tests.
IRL you mentioned that the new feature to express the preference via a entitlement attribute was hard to test in this test suite right? OpenConext/Stepup-SelfService#336. It might be possible to collaborate with Pieter and create a new feature in the SSP SP.php test page. And let the SP notify the demo IdP to release a certain attribute if this is requested in the relay state. Just a wild idea that might be usefull in other situations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: https://www.pivotaltracker.com/story/show/188537157