log_entries.feature 3.36 KB
Newer Older
1
2
3
4
5
6
@mod @mod_book
Feature: In a book, verify log entries
  In order to create log entries
  As an admin
  I need to perform various actions in a book.

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