Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
11 efrain 1
@core @core_contentbank @core_h5p @contentbank_h5p @_switch_iframe @javascript
1 efrain 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:
11 efrain 8
    Given the following "courses" exist:
1 efrain 9
      | fullname | shortname | category |
10
      | Course 1 | C1        | 0        |
11
    And the following "contentbank content" exist:
12
      | contextlevel | reference | contenttype     | user  | contentname | filepath                                   |
13
      | Course       | C1        | contenttype_h5p | admin | Existing    | /h5p/tests/fixtures/filltheblanks.h5p      |
11 efrain 14
    And the following "user private file" exists:
15
      | user     | admin                                |
16
      | filepath | h5p/tests/fixtures/filltheblanks.h5p |
1 efrain 17
    And the following config values are set as admin:
18
      | unaddableblocks | | theme_boost|
11 efrain 19
    And I log in as "admin"
20
    And I am on "Course 1" course homepage with editing mode on
1 efrain 21
    And I add the "Navigation" block if not present
22
 
23
  Scenario: Content created and uploaded events when uploading a content file
24
    Given I navigate to "Reports > Live logs" in site administration
25
    And I should not see "Content uploaded"
26
    And I should not see "Content created"
27
    And I am on "Course 1" course homepage
28
    And I expand "Site pages" node
29
    And I click on "Content bank" "link"
30
    When I click on "Upload" "link"
31
    And I click on "Choose a file..." "button"
32
    And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
33
    And I click on "filltheblanks.h5p" "link"
34
    And I click on "Select this file" "button"
35
    And I click on "Save changes" "button"
36
    And I navigate to "Reports > Live logs" in site administration
37
    Then I should see "Content uploaded"
38
    And I should see "Content created"
39
 
40
  Scenario: Content viewed event
41
    Given I navigate to "Reports > Live logs" in site administration
42
    And I should not see "Content viewed"
43
    And I am on "Course 1" course homepage
44
    And I expand "Site pages" node
45
    And I click on "Content bank" "link"
46
    When I click on "Existing" "link"
47
    And I navigate to "Reports > Live logs" in site administration
48
    Then I should see "Content viewed"
49
 
50
  Scenario: Content deleted event
51
    Given I navigate to "Reports > Live logs" in site administration
52
    And I should not see "Content deleted"
53
    And I am on "Course 1" course homepage
54
    And I expand "Site pages" node
55
    And I click on "Content bank" "link"
56
    And I click on "Existing" "link"
57
    And  I click on "More" "button"
58
    When I click on "Delete" "link"
59
    And I click on "Delete" "button" in the "Delete content" "dialogue"
60
    And I navigate to "Reports > Live logs" in site administration
61
    Then I should see "Content deleted"
62
 
63
  Scenario: Content updated event when renaming
64
    Given I navigate to "Reports > Live logs" in site administration
65
    And I should not see "Content updated"
66
    And I am on "Course 1" course homepage
67
    And I expand "Site pages" node
68
    And I click on "Content bank" "link"
69
    And I click on "Existing" "link"
70
    And  I click on "More" "button"
71
    When I click on "Rename" "link"
72
    And I set the field "Content name" to "New name"
73
    And I click on "Rename" "button"
74
    And I navigate to "Reports > Live logs" in site administration
75
    Then I should see "Content updated"