1441 |
ariadna |
1 |
@report @report_log
|
|
|
2 |
Feature: In a activity page, navigate through the More / Logs menu, test for report log page
|
|
|
3 |
In order to navigate through report page
|
|
|
4 |
As an admin
|
|
|
5 |
Go to the activity page, click on More / Logs menu, and check for the report log page
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname | category | groupmode |
|
|
|
10 |
| Course 1 | C1 | 0 | 1 |
|
|
|
11 |
And the following "activities" exist:
|
|
|
12 |
| activity | name | course | section |
|
|
|
13 |
| page | Test page 1 | C1 | 1 |
|
|
|
14 |
| page | Test page 2 | C1 | 1 |
|
|
|
15 |
And the following "users" exist:
|
|
|
16 |
| username | firstname | lastname | email |
|
|
|
17 |
| student1 | Student | 1 | student1@example.com |
|
|
|
18 |
| student2 | Student | 2 | student2@example.com |
|
|
|
19 |
And the following "course enrolments" exist:
|
|
|
20 |
| user | course | role |
|
|
|
21 |
| admin | C1 | editingteacher |
|
|
|
22 |
| student1 | C1 | student |
|
|
|
23 |
| student2 | C1 | student |
|
|
|
24 |
And I log in as "student1"
|
|
|
25 |
And I am on "Course 1" course homepage
|
|
|
26 |
And I follow "Test page 1"
|
|
|
27 |
And I am on "Course 1" course homepage
|
|
|
28 |
And I follow "Test page 2"
|
|
|
29 |
And I log out
|
|
|
30 |
And I log in as "student2"
|
|
|
31 |
And I am on "Course 1" course homepage
|
|
|
32 |
And I follow "Test page 1"
|
|
|
33 |
And I log out
|
|
|
34 |
|
|
|
35 |
Scenario: Report selectors should be targeted toward course module
|
|
|
36 |
Given I am on the "Test page 1" Activity page logged in as "admin"
|
|
|
37 |
And I navigate to "Logs" in current page administration
|
|
|
38 |
And "menuid" "select" should not exist
|
|
|
39 |
And "modid" "select" should not exist
|
|
|
40 |
And I should see "All participants" in the "user" "select"
|
|
|
41 |
And I should see "All days" in the "date" "select"
|
|
|
42 |
And I should see "All sources" in the "origin" "select"
|
|
|
43 |
And I should see "All events" in the "edulevel" "select"
|
|
|
44 |
And I should see "Test page 1" in the "#page-header" "css_element"
|
|
|
45 |
And I should see "Student 1" in the "user" "select"
|
|
|
46 |
When I set the field "user" to "Student 1"
|
|
|
47 |
And I click on "Get these logs" "button"
|
|
|
48 |
Then I should see "Test page 1" in the "#page-header" "css_element"
|
|
|
49 |
And I should not see "Student 2" in the "table.reportlog" "css_element"
|
|
|
50 |
And I should see "Page: Test page 1" in the "table.reportlog" "css_element"
|
|
|
51 |
|
|
|
52 |
Scenario: Report submission stays in the same course module page
|
|
|
53 |
Given I am on the "Test page 1" Activity page logged in as "admin"
|
|
|
54 |
When I navigate to "Logs" in current page administration
|
|
|
55 |
And I click on "Get these logs" "button"
|
|
|
56 |
Then I should see "Test page 1" in the "#page-header" "css_element"
|