1 |
efrain |
1 |
@mod @mod_book
|
|
|
2 |
Feature: In a book, verify log entries
|
|
|
3 |
In order to create log entries
|
|
|
4 |
As an admin
|
|
|
5 |
I need to perform various actions in a book.
|
|
|
6 |
|
|
|
7 |
@javascript @_switch_window
|
|
|
8 |
Scenario: perform various book actions and verify log entries.
|
|
|
9 |
Given the following "courses" exist:
|
|
|
10 |
| fullname | shortname | category | groupmode |
|
|
|
11 |
| Course 1 | C1 | 0 | 1 |
|
|
|
12 |
And the following "activity" exists:
|
|
|
13 |
| course | C1 |
|
|
|
14 |
| activity | book |
|
|
|
15 |
| name | Test book |
|
|
|
16 |
And I am on the "Course 1" course page logged in as admin
|
|
|
17 |
And I turn editing mode on
|
|
|
18 |
And I am on the "Test book" "book activity" page
|
|
|
19 |
And I set the following fields to these values:
|
|
|
20 |
| Chapter title | First chapter |
|
|
|
21 |
| Content | First chapter |
|
|
|
22 |
And I press "Save changes"
|
|
|
23 |
And I click on "Add new chapter" "link" in the "Table of contents" "block"
|
|
|
24 |
And I set the following fields to these values:
|
|
|
25 |
| Chapter title | Second chapter |
|
|
|
26 |
| Content | Second chapter |
|
|
|
27 |
And I press "Save changes"
|
|
|
28 |
And I click on "Edit" "link" in the "Table of contents" "block"
|
|
|
29 |
And I set the following fields to these values:
|
|
|
30 |
| Chapter title | First chapter edited |
|
|
|
31 |
| Content | First chapter edited |
|
|
|
32 |
And I press "Save changes"
|
|
|
33 |
And I click on "Next" "link"
|
|
|
34 |
And I click on "Previous" "link"
|
|
|
35 |
And I navigate to "Print book" in current page administration
|
|
|
36 |
And I am on the "Test book" "book activity" page
|
|
|
37 |
And I navigate to "Download IMS CP" in current page administration
|
|
|
38 |
And I navigate to "Reports > Logs" in site administration
|
|
|
39 |
And I set the field "menuid" to "Course 1"
|
|
|
40 |
And I press "Get these logs"
|
|
|
41 |
Then I should see "Book exported"
|
|
|
42 |
And I should see "Book printed"
|
|
|
43 |
And I should see "Chapter viewed" in the "#report_log_r4_c5" "css_element"
|
|
|
44 |
And I should see "Chapter viewed" in the "#report_log_r5_c5" "css_element"
|
|
|
45 |
And I should see "Chapter viewed" in the "#report_log_r6_c5" "css_element"
|
|
|
46 |
And I should see "Chapter updated" in the "#report_log_r7_c5" "css_element"
|
|
|
47 |
And I should see "Chapter viewed" in the "#report_log_r8_c5" "css_element"
|
|
|
48 |
And I should see "Chapter created" in the "#report_log_r9_c5" "css_element"
|
|
|
49 |
And I click on "Chapter viewed" "link" in the "#report_log_r4_c5" "css_element"
|
|
|
50 |
And I switch to "action" window
|
|
|
51 |
And I change window size to "large"
|
|
|
52 |
And I should see "1. First chapter edited" in the ".book_content" "css_element"
|
|
|
53 |
And I switch to the main window
|
|
|
54 |
And I click on "Chapter viewed" "link" in the "#report_log_r5_c5" "css_element"
|
|
|
55 |
And I switch to "action" window
|
|
|
56 |
And I should see "2. Second chapter" in the ".book_content" "css_element"
|
|
|
57 |
And I switch to the main window
|
|
|
58 |
And I click on "Chapter updated" "link" in the "#report_log_r7_c5" "css_element"
|
|
|
59 |
And I switch to "action" window
|
|
|
60 |
And I should see "1. First chapter edited" in the ".book_content" "css_element"
|
|
|
61 |
And I switch to the main window
|
|
|
62 |
And I click on "Chapter created" "link" in the "#report_log_r9_c5" "css_element"
|
|
|
63 |
And I switch to "action" window
|
|
|
64 |
And I should see "2. Second chapter" in the ".book_content" "css_element"
|
|
|
65 |
And I switch to the main window
|
|
|
66 |
And I click on "Chapter created" "link" in the "#report_log_r11_c5" "css_element"
|
|
|
67 |
And I switch to "action" window
|
|
|
68 |
And I should see "1. First chapter edited" in the ".book_content" "css_element"
|
|
|
69 |
And I switch to the main window
|