1 |
efrain |
1 |
@editor @core_h5p @_file_upload
|
|
|
2 |
Feature: Upload and list H5P libraries and content types installed
|
|
|
3 |
|
|
|
4 |
@javascript
|
|
|
5 |
Scenario: No library installed in new installations.
|
|
|
6 |
Given I log in as "admin"
|
|
|
7 |
When I navigate to "H5P > Manage H5P content types" in site administration
|
|
|
8 |
Then I should see "Upload H5P content types"
|
|
|
9 |
And I should not see "Installed H5P"
|
|
|
10 |
|
|
|
11 |
@javascript
|
|
|
12 |
Scenario: Upload an invalid content type.
|
|
|
13 |
Given I log in as "admin"
|
|
|
14 |
And I navigate to "H5P > Manage H5P content types" in site administration
|
|
|
15 |
When I upload "h5p/tests/fixtures/h5ptest.zip" file to "H5P content type" filemanager
|
|
|
16 |
And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
|
|
|
17 |
And I wait until the page is ready
|
|
|
18 |
Then I should see "Invalid H5P content type"
|
|
|
19 |
And I should not see "Installed H5P"
|
|
|
20 |
|
|
|
21 |
@javascript
|
|
|
22 |
Scenario: Upload a valid content type.
|
|
|
23 |
Given I log in as "admin"
|
|
|
24 |
And I navigate to "H5P > Manage H5P content types" in site administration
|
|
|
25 |
When I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "H5P content type" filemanager
|
|
|
26 |
And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
|
|
|
27 |
And I wait until the page is ready
|
|
|
28 |
Then I should see "H5P content types uploaded successfully"
|
|
|
29 |
And I should see "Installed H5P"
|
|
|
30 |
And I should see "Installed H5P content types"
|
|
|
31 |
And I should see "Fill in the Blanks"
|
|
|
32 |
And I should not see "Essay"
|
|
|
33 |
And I should see "Installed H5P libraries"
|
|
|
34 |
And I click on "Installed H5P libraries" "link"
|
|
|
35 |
And I should see "Question"
|
|
|
36 |
And I should see "1.4" in the "Question" "table_row"
|
|
|
37 |
And I should not see "1.3" in the "Question" "table_row"
|
|
|
38 |
And I upload "h5p/tests/fixtures/essay.zip" file to "H5P content type" filemanager
|
|
|
39 |
And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
|
|
|
40 |
And I wait until the page is ready
|
|
|
41 |
# Existing content types are kept and new added
|
|
|
42 |
And I should see "Fill in the Blanks"
|
|
|
43 |
And I should see "Essay"
|
|
|
44 |
And I click on "Installed H5P libraries" "link"
|
|
|
45 |
And I should see "1.3" in the "Question" "table_row"
|
|
|
46 |
And I should see "1.4"
|
|
|
47 |
|
|
|
48 |
@javascript
|
|
|
49 |
Scenario: Delete H5P library.
|
|
|
50 |
Given I log in as "admin"
|
|
|
51 |
And I navigate to "H5P > Manage H5P content types" in site administration
|
|
|
52 |
And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "H5P content type" filemanager
|
|
|
53 |
And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
|
|
|
54 |
And I wait until the page is ready
|
|
|
55 |
And I click on "Installed H5P libraries" "link"
|
|
|
56 |
When I click on "Delete version" "link" in the "H5P.FontIcons" "table_row"
|
|
|
57 |
And I press "Continue"
|
|
|
58 |
And I click on "Installed H5P content types" "link"
|
|
|
59 |
Then I should not see "Fill in the Blanks"
|
|
|
60 |
And I click on "Installed H5P libraries" "link"
|
|
|
61 |
And I should not see "H5P.FontIcons"
|
|
|
62 |
And I should not see "Joubel UI"
|
|
|
63 |
And I should see "Transition"
|
|
|
64 |
|
|
|
65 |
@javascript
|
|
|
66 |
Scenario: Enable/disable H5P library
|
|
|
67 |
Given I log in as "admin"
|
|
|
68 |
And I navigate to "H5P > Manage H5P content types" in site administration
|
|
|
69 |
And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "H5P content type" filemanager
|
|
|
70 |
And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
|
|
|
71 |
When I click on "Disable" "link" in the "Fill in the Blanks" "table_row"
|
|
|
72 |
Then "Enable" "icon" should exist in the "Fill in the Blanks" "table_row"
|
|
|
73 |
And "Disable" "icon" should not exist in the "Fill in the Blanks" "table_row"
|
|
|
74 |
And I click on "Enable" "link" in the "Fill in the Blanks" "table_row"
|
|
|
75 |
And "Disable" "icon" should exist in the "Fill in the Blanks" "table_row"
|
|
|
76 |
And "Enable" "icon" should not exist in the "Fill in the Blanks" "table_row"
|