Skip to content

Commit

Permalink
Add stepup pagination test
Browse files Browse the repository at this point in the history
  • Loading branch information
pablothedude committed Dec 11, 2024
1 parent 76e921b commit 568376c
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 0 deletions.
16 changes: 16 additions & 0 deletions stepup/tests/behat/features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,22 @@ public function theUserHasTheRole($nameId, $role, $institution)
$this->apiContext->iRequest('POST', '/command');
}

/**
* @Given /^I click on link "([^"]*)"$/
*/
public function iClickOnLink($name)
{
$this->minkContext->clickLink($name);
}

/**
* @Given /^I should be on page "([^"]*)"$/
*/
public function iShouldBeOnPage($url)
{
$this->minkContext->assertPageAddress($url);
}

private function proveYubikeyPossession($identityData)
{
// 1.1 prove possession of a yubikey token
Expand Down
2 changes: 2 additions & 0 deletions stepup/tests/behat/features/bootstrap/RaContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ public function openFirstAuditLogForInstitution($institution)
);
}
$searchResult->clickLink('Audit log');

$this->minkContext->assertPageContainsText('Audit log');
}

/**
Expand Down
69 changes: 69 additions & 0 deletions stepup/tests/behat/features/mw_paging.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
Feature: The paging should work for the token audit log
In order to see a log trace
As a SRAA
I must be able to see the next page of the token audit log

Scenario: A user registers a SMS token in selfservice using RA vetting
Given a user "jane-a1" identified by "urn:collab:person:institution-a.example.com:jane-a1" from institution "institution-a.example.com" with UUID "00000000-0000-4000-a000-000000000010"
And the user "urn:collab:person:institution-a.example.com:jane-a1" has a vetted "yubikey" with identifier "00000010"
And institution "institution-a.example.com" can "select_raa" from institution "institution-a.example.com"
And institution "institution-a.example.com" can "use_ra" from institution "institution-a.example.com"
And institution "institution-a.example.com" can "use_raa" from institution "institution-a.example.com"
And I am logged in into the ra portal as "admin" with a "yubikey" token
And I visit the RA promotion page
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
And I visit the RA Management page
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
And I visit the RA promotion page
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
And I visit the RA Management page
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
And I visit the RA promotion page
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
And I visit the RA Management page
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
And I visit the RA promotion page
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
And I visit the RA Management page
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
And I visit the RA promotion page
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
And I visit the RA Management page
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
And I visit the RA promotion page
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
And I visit the RA Management page
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
And I visit the RA promotion page
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
And I visit the RA Management page
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
And I visit the RA promotion page
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
And I visit the RA Management page
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
And I visit the RA promotion page
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
And I visit the RA Management page
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
And I visit the RA promotion page
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
And I visit the RA Management page
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
And I visit the RA promotion page
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
And I visit the RA Management page
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
And I visit the RA promotion page
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
And I visit the RA Management page
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
And I visit the RA promotion page
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
And I visit the RA Management page
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
When I visit the Tokens page
And I open the audit log for a user of "institution-a.example.com"
And I click on link "Next"
Then I should be on page "/second-factors/00000000-0000-4000-a000-000000000010/auditlog?p=2"
And I should see "Admin"
File renamed without changes.

0 comments on commit 568376c

Please sign in to comment.