Skip to content

Commit 568376c

Browse files
committed
Add stepup pagination test
1 parent 76e921b commit 568376c

File tree

4 files changed

+87
-0
lines changed

4 files changed

+87
-0
lines changed

stepup/tests/behat/features/bootstrap/FeatureContext.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,22 @@ public function theUserHasTheRole($nameId, $role, $institution)
332332
$this->apiContext->iRequest('POST', '/command');
333333
}
334334

335+
/**
336+
* @Given /^I click on link "([^"]*)"$/
337+
*/
338+
public function iClickOnLink($name)
339+
{
340+
$this->minkContext->clickLink($name);
341+
}
342+
343+
/**
344+
* @Given /^I should be on page "([^"]*)"$/
345+
*/
346+
public function iShouldBeOnPage($url)
347+
{
348+
$this->minkContext->assertPageAddress($url);
349+
}
350+
335351
private function proveYubikeyPossession($identityData)
336352
{
337353
// 1.1 prove possession of a yubikey token

stepup/tests/behat/features/bootstrap/RaContext.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,8 @@ public function openFirstAuditLogForInstitution($institution)
354354
);
355355
}
356356
$searchResult->clickLink('Audit log');
357+
358+
$this->minkContext->assertPageContainsText('Audit log');
357359
}
358360

359361
/**
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
Feature: The paging should work for the token audit log
2+
In order to see a log trace
3+
As a SRAA
4+
I must be able to see the next page of the token audit log
5+
6+
Scenario: A user registers a SMS token in selfservice using RA vetting
7+
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"
8+
And the user "urn:collab:person:institution-a.example.com:jane-a1" has a vetted "yubikey" with identifier "00000010"
9+
And institution "institution-a.example.com" can "select_raa" from institution "institution-a.example.com"
10+
And institution "institution-a.example.com" can "use_ra" from institution "institution-a.example.com"
11+
And institution "institution-a.example.com" can "use_raa" from institution "institution-a.example.com"
12+
And I am logged in into the ra portal as "admin" with a "yubikey" token
13+
And I visit the RA promotion page
14+
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
15+
And I visit the RA Management page
16+
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
17+
And I visit the RA promotion page
18+
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
19+
And I visit the RA Management page
20+
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
21+
And I visit the RA promotion page
22+
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
23+
And I visit the RA Management page
24+
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
25+
And I visit the RA promotion page
26+
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
27+
And I visit the RA Management page
28+
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
29+
And I visit the RA promotion page
30+
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
31+
And I visit the RA Management page
32+
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
33+
And I visit the RA promotion page
34+
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
35+
And I visit the RA Management page
36+
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
37+
And I visit the RA promotion page
38+
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
39+
And I visit the RA Management page
40+
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
41+
And I visit the RA promotion page
42+
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
43+
And I visit the RA Management page
44+
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
45+
And I visit the RA promotion page
46+
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
47+
And I visit the RA Management page
48+
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
49+
And I visit the RA promotion page
50+
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
51+
And I visit the RA Management page
52+
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
53+
And I visit the RA promotion page
54+
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
55+
And I visit the RA Management page
56+
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
57+
And I visit the RA promotion page
58+
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
59+
And I visit the RA Management page
60+
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
61+
And I visit the RA promotion page
62+
And I change the role of "jane-a1" to become "RA" for institution "institution-a.example.com"
63+
And I visit the RA Management page
64+
And I relieve "jane-a1" from "institution-a.example.com" of his "RA" role
65+
When I visit the Tokens page
66+
And I open the audit log for a user of "institution-a.example.com"
67+
And I click on link "Next"
68+
Then I should be on page "/second-factors/00000000-0000-4000-a000-000000000010/auditlog?p=2"
69+
And I should see "Admin"
File renamed without changes.

0 commit comments

Comments
 (0)