mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-68641 contenttype_h5p: Libraries permissions tests
This commit is contained in:
parent
2721dd3a63
commit
747f6012e4
@ -70,3 +70,23 @@ Feature: H5P file upload to content bank for admins
|
||||
And I expand "Site pages" node
|
||||
And I click on "Content bank" "link"
|
||||
And I should not see "filltheblanks.h5p"
|
||||
|
||||
Scenario: Admins can upload and deployed content types when libraries are not installed
|
||||
Given I navigate to "H5P > Manage H5P content types" in site administration
|
||||
And I should not see "Fill in the Blanks"
|
||||
And I follow "Dashboard" in the user menu
|
||||
And I expand "Site pages" node
|
||||
And I click on "Content bank" "link"
|
||||
And I should not see "filltheblanks.h5p"
|
||||
When I click on "Upload" "link"
|
||||
And I click on "Choose a file..." "button"
|
||||
And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
|
||||
And I click on "filltheblanks.h5p" "link"
|
||||
And I click on "Select this file" "button"
|
||||
And I click on "Save changes" "button"
|
||||
And I switch to "h5p-player" class iframe
|
||||
And I switch to "h5p-iframe" class iframe
|
||||
Then I should see "Of which countries"
|
||||
And I switch to the main frame
|
||||
And I navigate to "H5P > Manage H5P content types" in site administration
|
||||
And I should see "Fill in the Blanks"
|
||||
|
@ -71,3 +71,75 @@ Feature: H5P file upload to content bank for non admins
|
||||
And I expand "Site pages" node
|
||||
And I click on "Content bank" "link"
|
||||
Then I should see "filltheblanks.h5p"
|
||||
|
||||
Scenario: Teachers can not upload and deployed content types when libraries are not installed
|
||||
Given I log out
|
||||
And I log in as "admin"
|
||||
And I navigate to "H5P > Manage H5P content types" in site administration
|
||||
And I should not see "Fill in the Blanks"
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I add the "Navigation" block if not present
|
||||
And I expand "Site pages" node
|
||||
And I click on "Content bank" "link"
|
||||
When I click on "Upload" "link"
|
||||
And I click on "Choose a file..." "button"
|
||||
And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
|
||||
And I click on "filltheblanks.h5p" "link"
|
||||
And I click on "Select this file" "button"
|
||||
And I click on "Save changes" "button"
|
||||
And I switch to "h5p-player" class iframe
|
||||
Then I should not see "Of which countries"
|
||||
And I should see "missing-required-library"
|
||||
And I switch to the main frame
|
||||
And I log out
|
||||
And I log in as "admin"
|
||||
And I navigate to "H5P > Manage H5P content types" in site administration
|
||||
And I should not see "Fill in the Blanks"
|
||||
|
||||
Scenario: Teachers can not see existing contents when libraries are not installed
|
||||
Given I log out
|
||||
And I log in as "admin"
|
||||
And I follow "Manage private files..."
|
||||
And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "Files" filemanager
|
||||
And I click on "Save changes" "button"
|
||||
And I navigate to "H5P > Manage H5P content types" in site administration
|
||||
And I should not see "Fill in the Blanks"
|
||||
When I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "H5P content type" filemanager
|
||||
And I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"
|
||||
And I wait until the page is ready
|
||||
And I should see "Fill in the Blanks"
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
Given I am on "Course 1" course homepage with editing mode on
|
||||
And I add the "Navigation" block if not present
|
||||
When I expand "Site pages" node
|
||||
And I click on "Content bank" "link"
|
||||
And I click on "Upload" "link"
|
||||
And I click on "Choose a file..." "button"
|
||||
And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
|
||||
And I click on "filltheblanks.h5p" "link"
|
||||
And I click on "Select this file" "button"
|
||||
And I click on "Save changes" "button"
|
||||
And I switch to "h5p-player" class iframe
|
||||
And I switch to "h5p-iframe" class iframe
|
||||
Then I should see "Of which countries"
|
||||
Then I should not see "missing-required-library"
|
||||
And I switch to the main frame
|
||||
Given I log out
|
||||
And I log in as "admin"
|
||||
And I navigate to "H5P > Manage H5P content types" in site administration
|
||||
When I click on "Delete version" "link" in the "Fill in the Blanks" "table_row"
|
||||
And I press "Continue"
|
||||
Then I should not see "Fill in the Blanks"
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
Given I am on "Course 1" course homepage
|
||||
When I expand "Site pages" node
|
||||
And I click on "Content bank" "link"
|
||||
And I should see "filltheblanks.h5p"
|
||||
And I click on "filltheblanks.h5p" "link"
|
||||
And I switch to "h5p-player" class iframe
|
||||
Then I should not see "Of which countries"
|
||||
Then I should see "missing-required-library"
|
||||
|
Loading…
x
Reference in New Issue
Block a user