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
@core @core_contentbank @core_h5p @contenttype_h5p @_file_upload @_switch_iframe @javascript
1
@core @core_contentbank @core_h5p @contenttype_h5p @_switch_iframe @javascript
2
Feature: H5P file upload to content bank for admins
2
Feature: H5P file upload to content bank for admins
3
  In order import new H5P content to content bank
3
  In order import new H5P content to content bank
4
  As an admin
4
  As an admin
5
  I need to be able to upload a new .h5p file to content bank
5
  I need to be able to upload a new .h5p file to content bank
Línea 6... Línea 6...
6
 
6
 
7
  Background:
7
  Background:
8
    Given the following "blocks" exist:
8
    Given the following "user private file" exists:
9
      | blockname     | contextlevel | reference | pagetypepattern | defaultregion |
9
      | user     | admin                                |
10
      | private_files | System       | 1         | my-index        | side-post     |
10
      | filepath | h5p/tests/fixtures/filltheblanks.h5p |
11
    And I log in as "admin"
-
 
12
    And I follow "Manage private files..."
-
 
13
    And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "Files" filemanager
-
 
14
    And I click on "Save changes" "button"
11
    And I log in as "admin"
15
    And I turn editing mode on
12
    And I turn editing mode on
16
    And the following config values are set as admin:
13
    And the following config values are set as admin:
17
      | unaddableblocks | | theme_boost|
14
      | unaddableblocks | | theme_boost|
18
    And I add the "Navigation" block if not present
15
    And I add the "Navigation" block if not present
Línea 97... Línea 94...
97
    And I switch to the main frame
94
    And I switch to the main frame
98
    And I navigate to "H5P > Manage H5P content types" in site administration
95
    And I navigate to "H5P > Manage H5P content types" in site administration
99
    And I should see "Fill in the Blanks"
96
    And I should see "Fill in the Blanks"
Línea 100... Línea 97...
100
 
97
 
101
  Scenario: Uploading invalid packages throws error
98
  Scenario: Uploading invalid packages throws error
102
    Given I follow "Dashboard"
99
    Given the following "user private files" exist:
103
    And I follow "Manage private files..."
100
      | user  | filepath                            |
104
    And I upload "h5p/tests/fixtures/no-json-file.h5p" file to "Files" filemanager
-
 
105
    And I click on "Save changes" "button"
-
 
106
    And I follow "Manage private files..."
101
      | admin | h5p/tests/fixtures/no-json-file.h5p |
107
    And I upload "h5p/tests/fixtures/unzippable.h5p" file to "Files" filemanager
102
      | admin | h5p/tests/fixtures/unzippable.h5p   |
108
    And I click on "Save changes" "button"
103
    And I follow "Dashboard"
109
    And I expand "Site pages" node
104
    And I expand "Site pages" node
110
    And I click on "Content bank" "link"
105
    And I click on "Content bank" "link"
111
    When I click on "Upload" "link"
106
    When I click on "Upload" "link"
112
    And I click on "Choose a file..." "button"
107
    And I click on "Choose a file..." "button"