1 |
efrain |
1 |
@report @report_outline
|
|
|
2 |
Feature: View the user page for the outline report
|
|
|
3 |
In order to ensure the user page for the outline report works as expected
|
|
|
4 |
As a student
|
|
|
5 |
I need to log in as a student and view the user page for the outline report
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname | format | showreports |
|
|
|
10 |
| Course 1 | C1 | topics | 1 |
|
|
|
11 |
And the following "users" exist:
|
|
|
12 |
| username | firstname | lastname | email |
|
|
|
13 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
14 |
| student1 | Student | 1 | student1@example.com |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| teacher1 | C1 | editingteacher |
|
|
|
18 |
| student1 | C1 | student |
|
|
|
19 |
And the following "activities" exist:
|
|
|
20 |
| activity | name | description | course | idnumber |
|
|
|
21 |
| folder | Folder name | Folder description | C1 | folder1 |
|
|
|
22 |
And the following "activities" exist:
|
|
|
23 |
| activity | name | description | course | idnumber | externalurl |
|
|
|
24 |
| url | URL name | URL description | C1 | folder1 | http://www.google.com |
|
|
|
25 |
When I log in as "admin"
|
|
|
26 |
|
|
|
27 |
Scenario: View the user page when only the standard log reader is enabled
|
|
|
28 |
Given I navigate to "Plugins > Logging > Manage log stores" in site administration
|
|
|
29 |
And "Disable" "link" should exist in the "Standard log" "table_row"
|
|
|
30 |
And I log out
|
|
|
31 |
And I log in as "student1"
|
|
|
32 |
And I am on "Course 1" course homepage
|
|
|
33 |
# We want to view this multiple times, to make sure the count is working.
|
|
|
34 |
And I follow "Folder name"
|
|
|
35 |
And I reload the page
|
|
|
36 |
And I reload the page
|
|
|
37 |
And I reload the page
|
|
|
38 |
And I am on "Course 1" course homepage
|
|
|
39 |
# We want to view this multiple times, to make sure the count is working.
|
|
|
40 |
And I follow "URL name"
|
|
|
41 |
And I reload the page
|
|
|
42 |
And I reload the page
|
|
|
43 |
And I follow "Profile" in the user menu
|
|
|
44 |
And I click on "Course 1" "link" in the "region-main" "region"
|
|
|
45 |
When I follow "Outline report"
|
|
|
46 |
Then I should see "4 views" in the "Folder name" "table_row"
|
|
|
47 |
And I should see "3 views" in the "URL name" "table_row"
|
|
|
48 |
And I follow "Profile" in the user menu
|
|
|
49 |
And I click on "Course 1" "link" in the "region-main" "region"
|
|
|
50 |
When I follow "Complete report"
|
|
|
51 |
And I should see "4 views"
|
|
|
52 |
And I should see "3 views"
|
|
|
53 |
|
|
|
54 |
Scenario: View the user complete report page when there is a no-grade forum
|
|
|
55 |
Given the following "activities" exist:
|
|
|
56 |
| activity | name | course | idnumber |
|
|
|
57 |
| forum | forum1 | C1 | forum1 |
|
|
|
58 |
And I am on "Course 1" course homepage
|
|
|
59 |
When I follow "Participants"
|
|
|
60 |
And I follow "Student 1"
|
|
|
61 |
And I follow "Outline report"
|
|
|
62 |
Then I should see "Activity report"
|
|
|
63 |
When I follow "Participants"
|
|
|
64 |
And I follow "Student 1"
|
|
|
65 |
And I follow "Complete report"
|
|
|
66 |
Then I should see "Activity report"
|