1 |
efrain |
1 |
@block @block_myoverview @javascript
|
|
|
2 |
Feature: The my overview block allows users to persistence of their page limits
|
|
|
3 |
|
|
|
4 |
Background:
|
|
|
5 |
Given the following "users" exist:
|
|
|
6 |
| username | firstname | lastname | email | idnumber |
|
|
|
7 |
| student1 | Student | X | student1@example.com | S1 |
|
|
|
8 |
And the following "courses" exist:
|
|
|
9 |
| fullname | shortname | category |
|
|
|
10 |
| Course 1 | C01 | 0 |
|
|
|
11 |
| Course 2 | C02 | 0 |
|
|
|
12 |
| Course 3 | C03 | 0 |
|
|
|
13 |
| Course 4 | C04 | 0 |
|
|
|
14 |
| Course 5 | C05 | 0 |
|
|
|
15 |
| Course 6 | C06 | 0 |
|
|
|
16 |
| Course 7 | C07 | 0 |
|
|
|
17 |
| Course 8 | C08 | 0 |
|
|
|
18 |
| Course 9 | C09 | 0 |
|
|
|
19 |
| Course 10 | C10 | 0 |
|
|
|
20 |
| Course 11 | C11 | 0 |
|
|
|
21 |
| Course 12 | C12 | 0 |
|
|
|
22 |
| Course 13 | C13 | 0 |
|
|
|
23 |
And the following "course enrolments" exist:
|
|
|
24 |
| user | course | role |
|
|
|
25 |
| student1 | C01 | student |
|
|
|
26 |
| student1 | C02 | student |
|
|
|
27 |
| student1 | C03 | student |
|
|
|
28 |
| student1 | C04 | student |
|
|
|
29 |
| student1 | C05 | student |
|
|
|
30 |
| student1 | C06 | student |
|
|
|
31 |
| student1 | C07 | student |
|
|
|
32 |
| student1 | C08 | student |
|
|
|
33 |
| student1 | C09 | student |
|
|
|
34 |
| student1 | C10 | student |
|
|
|
35 |
| student1 | C11 | student |
|
|
|
36 |
| student1 | C12 | student |
|
|
|
37 |
| student1 | C13 | student |
|
|
|
38 |
|
|
|
39 |
Scenario: Toggle the page limit between page reloads
|
|
|
40 |
Given I am on the "My courses" page logged in as "student1"
|
|
|
41 |
When I click on "[data-action='limit-toggle']" "css_element" in the "Course overview" "block"
|
|
|
42 |
And I click on "All" "link" in the ".dropdown-menu.show" "css_element"
|
|
|
43 |
Then I should see "Course 13"
|
|
|
44 |
And I reload the page
|
|
|
45 |
Then I should see "Course 13"
|
|
|
46 |
And I should see "All" in the ".block-myoverview [data-action='limit-toggle']" "css_element"
|
|
|
47 |
|
|
|
48 |
Scenario: Toggle the page limit between grouping changes
|
|
|
49 |
Given I am on the "My courses" page logged in as "student1"
|
|
|
50 |
When I click on "[data-action='limit-toggle']" "css_element" in the "Course overview" "block"
|
|
|
51 |
And I click on "All" "link" in the ".dropdown-menu.show" "css_element"
|
|
|
52 |
And I click on "All" "button" in the "Course overview" "block"
|
|
|
53 |
And I click on "In progress" "link" in the "Course overview" "block"
|
|
|
54 |
Then I should see "Course 13"
|
|
|
55 |
And I should see "All" in the ".block-myoverview [data-action='limit-toggle']" "css_element"
|