AutorÃa | Ultima modificación | Ver Log |
@core @core_backup @core_contentbank @core_h5p @contenttype_h5p @_file_upload @javascriptFeature: Import course content bank contentIn order to import content from a course contentbankAs a teacherI need to confirm that errors will not happenBackground:Given I log in as "admin"And the following config values are set as admin:| unaddableblocks | | theme_boost|And I am on site homepageAnd I turn editing mode onAnd I add the "Navigation" block if not presentAnd I configure the "Navigation" blockAnd I set the following fields to these values:| Page contexts | Display throughout the entire site |And I press "Save changes"And I navigate to "H5P > Manage H5P content types" in site administrationAnd I upload "h5p/tests/fixtures/ipsums.h5p" file to "H5P content type" filemanagerAnd I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"And the following "courses" exist:| fullname | shortname | category || Course 1 | C1 | 0 || Course 2 | C2 | 0 |And the following "users" exist:| username | firstname | lastname | email || teacher1 | Teacher | 1 | teacher1@example.com |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher || teacher1 | C2 | editingteacher |And the following "contentbank content" exist:| contextlevel | reference | contenttype | user | contentname | filepath || Course | C1 | contenttype_h5p | teacher1 | ipsums.h5p | /h5p/tests/fixtures/ipsums.h5p |And I log outAnd I log in as "teacher1"Scenario: Import content bank content to another courseGiven I am on "Course 2" course homepageAnd I expand "Site pages" nodeAnd I click on "Content bank" "link"And I should not see "ipsums.h5p"When I import "Course 1" course into "Course 2" course using this options:And I expand "Site pages" nodeAnd I click on "Content bank" "link"Then I should see "ipsums.h5p"And I am on "Course 1" course homepageAnd I expand "Site pages" nodeAnd I click on "Content bank" "link"And I should see "ipsums.h5p"Scenario: User could configure not to import content bankGiven I am on "Course 2" course homepageAnd I expand "Site pages" nodeAnd I click on "Content bank" "link"And I should not see "ipsums.h5p"When I import "Course 1" course into "Course 2" course using this options:| Initial | Include content bank content | 0 |And I expand "Site pages" nodeAnd I click on "Content bank" "link"Then I should not see "ipsums.h5p"And I am on "Course 1" course homepageAnd I expand "Site pages" nodeAnd I click on "Content bank" "link"And I should see "ipsums.h5p"