Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 1... Línea 1...
1
@editor @editor_atto @atto @atto_h5p @core_h5p @_file_upload @_switch_iframe
1
@editor @editor_atto @atto @atto_h5p @core_h5p @_switch_iframe
2
Feature: Add h5ps to Atto
2
Feature: Use the Atto editor to upload an h5p package
3
  To write rich text - I need to add h5ps.
3
  To write rich text - I need to add h5ps.
Línea 4... Línea 4...
4
 
4
 
5
  Background:
5
  Background:
6
    Given the following "courses" exist:
6
    Given the following "courses" exist:
Línea 16... Línea 16...
16
      | activity | name       | intro      | introformat | course | content  | contentformat | idnumber |
16
      | activity | name       | intro      | introformat | course | content  | contentformat | idnumber |
17
      | page     | PageName1  | PageDesc1  | 1           | C1     | H5Ptest  | 1             | 1        |
17
      | page     | PageName1  | PageDesc1  | 1           | C1     | H5Ptest  | 1             | 1        |
18
    And the "displayh5p" filter is "on"
18
    And the "displayh5p" filter is "on"
19
    And the following config values are set as admin:
19
    And the following config values are set as admin:
20
      | allowedsources | https://moodle.h5p.com/content/[id] | filter_displayh5p |
20
      | allowedsources | https://moodle.h5p.com/content/[id] | filter_displayh5p |
21
    And the following "blocks" exist:
-
 
22
      | blockname     | contextlevel | reference | pagetypepattern | defaultregion |
-
 
23
      | private_files | System       | 1         | my-index        | side-post     |
-
 
Línea 24... Línea 21...
24
 
21
 
25
  @javascript @external
22
  @javascript @external
26
  Scenario: Insert an embedded h5p
23
  Scenario: Insert an embedded h5p
27
    Given I change window size to "large"
24
    Given I change window size to "large"
Línea 36... Línea 33...
36
    And I switch to "h5pcontent" iframe
33
    And I switch to "h5pcontent" iframe
37
    And I should see "Lorum ipsum"
34
    And I should see "Lorum ipsum"
Línea 38... Línea 35...
38
 
35
 
39
  @javascript
36
  @javascript
40
  Scenario: Insert an h5p file
37
  Scenario: Insert an h5p file
41
    Given I log in as "admin"
38
    Given the following "user private file" exists:
42
    And I follow "Manage private files..."
39
      | user     | admin                                   |
43
    And I upload "h5p/tests/fixtures/guess-the-answer.h5p" file to "Files" filemanager
-
 
44
    And I click on "Save changes" "button"
40
      | filepath | h5p/tests/fixtures/guess-the-answer.h5p |
45
    And I am on the PageName1 "page activity editing" page
41
    And I am on the "PageName1" "page activity editing" page logged in as "admin"
46
    And I click on "Insert H5P" "button" in the "#fitem_id_page" "css_element"
42
    And I click on "Insert H5P" "button" in the "#fitem_id_page" "css_element"
47
    And I click on "Browse repositories..." "button" in the "Insert H5P" "dialogue"
43
    And I click on "Browse repositories..." "button" in the "Insert H5P" "dialogue"
48
    And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
44
    And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
49
    And I click on "guess-the-answer.h5p" "link"
45
    And I click on "guess-the-answer.h5p" "link"
Línea 95... Línea 91...
95
    And I should see "H5P URL" in the "Insert H5P" "dialogue"
91
    And I should see "H5P URL" in the "Insert H5P" "dialogue"
96
    And I should not see "H5P options" in the "Insert H5P" "dialogue"
92
    And I should not see "H5P options" in the "Insert H5P" "dialogue"
Línea 97... Línea 93...
97
 
93
 
98
  @javascript @external
94
  @javascript @external
99
  Scenario: Edit H5P content
95
  Scenario: Edit H5P content
100
    Given I log in as "admin"
96
    Given the following "user private file" exists:
101
    And I follow "Manage private files..."
97
      | user     | admin                       |
102
    And I upload "lib/editor/atto/tests/fixtures/drag.h5p" file to "Files" filemanager
-
 
103
    And I click on "Save changes" "button"
98
      | filepath | h5p/tests/fixtures/drag.h5p |
104
    And I am on the PageName1 "page activity editing" page
99
    And I am on the "PageName1" "page activity editing" page logged in as "admin"
105
    And I click on "Insert H5P" "button" in the "#fitem_id_page" "css_element"
100
    And I click on "Insert H5P" "button" in the "#fitem_id_page" "css_element"
106
#   H5P file content
101
#   H5P file content
107
    And I click on "Browse repositories..." "button" in the "Insert H5P" "dialogue"
102
    And I click on "Browse repositories..." "button" in the "Insert H5P" "dialogue"
108
    And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
103
    And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
Línea 129... Línea 124...
129
    And I should see "Lorum ipsum"
124
    And I should see "Lorum ipsum"
130
    And I should not see "Cloudberries"
125
    And I should not see "Cloudberries"
Línea 131... Línea 126...
131
 
126
 
132
  @javascript
127
  @javascript
133
  Scenario: Enable/disable H5P options atto
128
  Scenario: Enable/disable H5P options atto
134
    Given I log in as "admin"
129
    Given the following "user private file" exists:
135
    And I follow "Manage private files..."
130
      | user     | admin                                   |
136
    And I upload "h5p/tests/fixtures/guess-the-answer.h5p" file to "Files" filemanager
-
 
137
    And I click on "Save changes" "button"
131
      | filepath | h5p/tests/fixtures/guess-the-answer.h5p |
138
    And I am on the PageName1 "page activity editing" page
132
    And I am on the "PageName1" "page activity editing" page logged in as "admin"
139
    And I click on "Insert H5P" "button" in the "#fitem_id_page" "css_element"
133
    And I click on "Insert H5P" "button" in the "#fitem_id_page" "css_element"
140
    And I click on "Browse repositories..." "button" in the "Insert H5P" "dialogue"
134
    And I click on "Browse repositories..." "button" in the "Insert H5P" "dialogue"
141
    And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
135
    And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
142
    And I click on "guess-the-answer.h5p" "link"
136
    And I click on "guess-the-answer.h5p" "link"
Línea 205... Línea 199...
205
      | username | firstname | lastname | email |
199
      | username | firstname | lastname | email |
206
      | student1 | Student   | 1 | student1@example.com |
200
      | student1 | Student   | 1 | student1@example.com |
207
    And the following "course enrolments" exist:
201
    And the following "course enrolments" exist:
208
      | user | course | role |
202
      | user | course | role |
209
      | student1 | C1 | student |
203
      | student1 | C1 | student |
210
    And I log in as "admin"
204
    And the following "user private file" exists:
211
    And I follow "Manage private files..."
205
      | user     | admin                                   |
212
    And I upload "h5p/tests/fixtures/guess-the-answer.h5p" file to "Files" filemanager
206
      | filepath | h5p/tests/fixtures/guess-the-answer.h5p |
213
    And I click on "Save changes" "button"
-
 
214
    And I am on the PageName1 "page activity editing" page
207
    And I am on the "PageName1" "page activity editing" page logged in as "admin"
215
    And I click on "Insert H5P" "button" in the "#fitem_id_page" "css_element"
208
    And I click on "Insert H5P" "button" in the "#fitem_id_page" "css_element"
216
    And I click on "Browse repositories..." "button" in the "Insert H5P" "dialogue"
209
    And I click on "Browse repositories..." "button" in the "Insert H5P" "dialogue"
217
    And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
210
    And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
218
    And I click on "guess-the-answer.h5p" "link"
211
    And I click on "guess-the-answer.h5p" "link"
219
    And I click on "Select this file" "button"
212
    And I click on "Select this file" "button"