1 |
efrain |
1 |
@block @block_recentlyaccesseditems @javascript
|
|
|
2 |
Feature: The recently accessed items block allows users to easily access their most recently visited items
|
|
|
3 |
In order to access the most recent items accessed
|
|
|
4 |
As a user
|
|
|
5 |
I can use the recently accessed items block in my dashboard
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| student1 | Student | 1 | student1@example.com |
|
|
|
11 |
And the following "courses" exist:
|
|
|
12 |
| fullname | shortname |
|
|
|
13 |
| Course 1 | C1 |
|
|
|
14 |
| Course 2 | C2 |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| student1 | C1 | student |
|
|
|
18 |
| student1 | C2 | student |
|
|
|
19 |
And the following "activity" exists:
|
|
|
20 |
| course | C1 |
|
|
|
21 |
| activity | forum |
|
|
|
22 |
| idnumber | Test forum name |
|
|
|
23 |
| name | Test forum name |
|
|
|
24 |
And I log in as "student1"
|
|
|
25 |
|
|
|
26 |
@accessibility
|
|
|
27 |
Scenario: User has not accessed any item
|
|
|
28 |
Then I should see "No recent items" in the "Recently accessed items" "block"
|
|
|
29 |
And the page should meet accessibility standards
|
|
|
30 |
|
|
|
31 |
@accessibility
|
|
|
32 |
Scenario: User has accessed some items
|
|
|
33 |
Given I change window size to "large"
|
|
|
34 |
When I am on the "Test forum name" "forum activity" page
|
|
|
35 |
And I follow "Dashboard"
|
|
|
36 |
Then I should see "Test forum name" in the "Recently accessed items" "block"
|
|
|
37 |
And I should not see "Show more items" in the "Recently accessed items" "block"
|
|
|
38 |
And the page should meet accessibility standards
|
|
|
39 |
|
|
|
40 |
Scenario: User has accessed more than 3 items
|
|
|
41 |
Given the following "activities" exist:
|
|
|
42 |
| activity | name | intro | course | idnumber |
|
|
|
43 |
| assign | Test assignment name | Test assignment description | C1 | assign1 |
|
|
|
44 |
| book | Test book name | | C1 | book1 |
|
|
|
45 |
| choice | Test choice name | Test choice description | C1 | choice1 |
|
|
|
46 |
| data | Test database name | Test database description | C1 | data1 |
|
|
|
47 |
And I change window size to "large"
|
|
|
48 |
And I am on the "Test forum name" "forum activity" page
|
|
|
49 |
And I am on the "Test database name" "data activity" page
|
|
|
50 |
And I am on the "Test assignment name" "assign activity" page
|
|
|
51 |
And I am on the "Test book name" "book activity" page
|
|
|
52 |
And I am on the "Test choice name" "choice activity" page
|
|
|
53 |
When I follow "Dashboard"
|
|
|
54 |
Then I should see "Show more items" in the "Recently accessed items" "block"
|
|
|
55 |
And I should not see "Test forum name" in the "Recently accessed items" "block"
|
|
|
56 |
And I click on "Show more items" "button" in the "Recently accessed items" "block"
|
|
|
57 |
And I should see "Test forum name" in the "Recently accessed items" "block"
|
|
|
58 |
And I turn editing mode on
|
|
|
59 |
And I am on homepage
|
|
|
60 |
And I configure the "Recently accessed items" block
|
|
|
61 |
And I set the following fields to these values:
|
|
|
62 |
| Region | content |
|
|
|
63 |
And I press "Save changes"
|
|
|
64 |
And I turn editing mode off
|
|
|
65 |
And I should not see "Show more items" in the "Recently accessed items" "block"
|