Proyectos de Subversion Moodle

Rev

Ir a la última revisión | | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_contentbank @core_h5p @contentbank_h5p @_file_upload @_switch_iframe @javascript
2
Feature: Confirm content bank events are triggered
3
  In order to log content bank actions
4
  As an admin
5
  I need to be able to check triggered events
6
 
7
  Background:
8
    Given the following "blocks" exist:
9
      | blockname     | contextlevel | reference | pagetypepattern | defaultregion |
10
      | private_files | System       | 1         | my-index        | side-post     |
11
    And I log in as "admin"
12
    And I navigate to "H5P > Manage H5P content types" in site administration
13
    And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "H5P content type" filemanager
14
    And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
15
    And the following "courses" exist:
16
      | fullname | shortname | category |
17
      | Course 1 | C1        | 0        |
18
    And the following "contentbank content" exist:
19
      | contextlevel | reference | contenttype     | user  | contentname | filepath                                   |
20
      | Course       | C1        | contenttype_h5p | admin | Existing    | /h5p/tests/fixtures/filltheblanks.h5p      |
21
    And I follow "Dashboard"
22
    And I follow "Manage private files..."
23
    And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "Files" filemanager
24
    And I click on "Save changes" "button"
25
    And I am on "Course 1" course homepage with editing mode on
26
    And the following config values are set as admin:
27
      | unaddableblocks | | theme_boost|
28
    And I add the "Navigation" block if not present
29
 
30
  Scenario: Content created and uploaded events when uploading a content file
31
    Given I navigate to "Reports > Live logs" in site administration
32
    And I should not see "Content uploaded"
33
    And I should not see "Content created"
34
    And I am on "Course 1" course homepage
35
    And I expand "Site pages" node
36
    And I click on "Content bank" "link"
37
    When I click on "Upload" "link"
38
    And I click on "Choose a file..." "button"
39
    And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
40
    And I click on "filltheblanks.h5p" "link"
41
    And I click on "Select this file" "button"
42
    And I click on "Save changes" "button"
43
    And I navigate to "Reports > Live logs" in site administration
44
    Then I should see "Content uploaded"
45
    And I should see "Content created"
46
 
47
  Scenario: Content viewed event
48
    Given I navigate to "Reports > Live logs" in site administration
49
    And I should not see "Content viewed"
50
    And I am on "Course 1" course homepage
51
    And I expand "Site pages" node
52
    And I click on "Content bank" "link"
53
    When I click on "Existing" "link"
54
    And I navigate to "Reports > Live logs" in site administration
55
    Then I should see "Content viewed"
56
 
57
  Scenario: Content deleted event
58
    Given I navigate to "Reports > Live logs" in site administration
59
    And I should not see "Content deleted"
60
    And I am on "Course 1" course homepage
61
    And I expand "Site pages" node
62
    And I click on "Content bank" "link"
63
    And I click on "Existing" "link"
64
    And  I click on "More" "button"
65
    When I click on "Delete" "link"
66
    And I click on "Delete" "button" in the "Delete content" "dialogue"
67
    And I navigate to "Reports > Live logs" in site administration
68
    Then I should see "Content deleted"
69
 
70
  Scenario: Content updated event when renaming
71
    Given I navigate to "Reports > Live logs" in site administration
72
    And I should not see "Content updated"
73
    And I am on "Course 1" course homepage
74
    And I expand "Site pages" node
75
    And I click on "Content bank" "link"
76
    And I click on "Existing" "link"
77
    And  I click on "More" "button"
78
    When I click on "Rename" "link"
79
    And I set the field "Content name" to "New name"
80
    And I click on "Rename" "button"
81
    And I navigate to "Reports > Live logs" in site administration
82
    Then I should see "Content updated"