Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
@core @core_contentbank @core_h5p @contentbank_h5p @_file_upload @javascriptFeature: Make content public or unlistedIn order to make content public or unlistedAs a userI need to be able to access the edition optionsBackground:Given I log in as "admin"And I am on site homepageAnd I turn editing mode onAnd the following config values are set as admin:| unaddableblocks | | theme_boost|And 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/filltheblanks.h5p" file to "H5P content type" filemanagerAnd I click on "Upload H5P content types" "button" in the "#fitem_id_uploadlibraries" "css_element"Scenario: Users can make their content public or unlistedGiven the following "contentbank content" exist:| contextlevel | reference | contenttype | user | contentname | filepath | visibility || System | | contenttype_h5p | admin | filltheblanks.h5p | /h5p/tests/fixtures/filltheblanks.h5p | 1 |And I click on "Site pages" "list_item" in the "Navigation" "block"And I click on "Content bank" "link" in the "Navigation" "block"And I click on "filltheblanks.h5p" "link"And I wait until the page is readyAnd "filltheblanks.h5p (Unlisted)" "heading" should not existAnd I click on "More" "button"And I should see "Make unlisted"And I click on "Make unlisted" "link"And I wait until the page is readyThen "filltheblanks.h5p (Unlisted)" "heading" should existAnd I click on "More" "button"And I should see "Make public"Scenario: Unlisted content cannot be seen by other usersGiven the following "users" exist:| username | firstname | lastname | email || teacher1 | Teacher | 1 | teacher1@example.com || teacher2 | Teacher | 2 | teacher2@example.com |And the following "courses" exist:| fullname | shortname || Course 1 | C1 |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher || teacher2 | C1 | editingteacher |And the following "contentbank content" exist:| contextlevel | reference | contenttype | user | contentname | filepath | visibility || Course | C1 | contenttype_h5p | teacher1 | filltheblanks.h5p | /h5p/tests/fixtures/filltheblanks.h5p | 2 |And I log outAnd I log in as "teacher1"And I am on "Course 1" course homepageAnd I click on "Site pages" "list_item" in the "Navigation" "block"And I click on "Content bank" "link" in the "Navigation" "block"Then I should see "filltheblanks.h5p (Unlisted)"And I log outAnd I log in as "teacher2"And I am on "Course 1" course homepageAnd I click on "Site pages" "list_item" in the "Navigation" "block"And I click on "Content bank" "link" in the "Navigation" "block"Then I should not see "filltheblanks.h5p"Scenario: Unlisted content is not found through search by other usersGiven the following "users" exist:| username | firstname | lastname | email || teacher1 | Teacher | 1 | teacher1@example.com || teacher2 | Teacher | 2 | teacher2@example.com |And the following "courses" exist:| fullname | shortname || Course 1 | C1 |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher || teacher2 | C1 | editingteacher |And the following "contentbank content" exist:| contextlevel | reference | contenttype | user | contentname | filepath | visibility || Course | C1 | contenttype_h5p | teacher1 | filltheblanks.h5p | /h5p/tests/fixtures/filltheblanks.h5p | 2 |And I log outAnd I log in as "teacher1"And I am on "Course 1" course homepageAnd I click on "Site pages" "list_item" in the "Navigation" "block"And I click on "Content bank" "link" in the "Navigation" "block"And I set the field "Search" to "filltheblanks.h5p"And I should see "filltheblanks.h5p"And I log outAnd I log in as "teacher2"And I am on "Course 1" course homepageAnd I click on "Site pages" "list_item" in the "Navigation" "block"And I click on "Content bank" "link" in the "Navigation" "block"When I set the field "Search" to "filltheblanks.h5p"Then I should not see "filltheblanks.h5p"Scenario: Managers can see other users' unlisted contentGiven the following "users" exist:| username | firstname | lastname | email || teacher1 | Teacher | 1 | teacher1@example.com || manager1 | Manager | 1 | manager1@example.com |And the following "courses" exist:| fullname | shortname || Course 1 | C1 |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher || manager1 | C1 | manager |And the following "contentbank content" exist:| contextlevel | reference | contenttype | user | contentname | filepath | visibility || Course | C1 | contenttype_h5p | teacher1 | filltheblanks.h5p | /h5p/tests/fixtures/filltheblanks.h5p | 2 |And I log outAnd I log in as "manager1"And I am on "Course 1" course homepageAnd I click on "Site pages" "list_item" in the "Navigation" "block"And I click on "Content bank" "link" in the "Navigation" "block"And I should see "filltheblanks.h5p (Unlisted)"And I set the field "Search" to "filltheblanks.h5p"And I should see "filltheblanks.h5p (Unlisted)"@_file_uploadScenario: Default content visibility can be set to unlistedGiven the following "courses" exist:| fullname | shortname || Course 1 | C1 |And I set the following administration settings values:| Default content visibility | 2 |And I am on "Course 1" course homepageAnd I click on "Site pages" "list_item" in the "Navigation" "block"And I click on "Content bank" "link" in the "Navigation" "block"And I click on "Upload" "link"And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "Upload content" filemanagerAnd I click on "Save changes" "button"Then "filltheblanks.h5p (Unlisted)" "heading" should exist@_file_uploadScenario: User preference concerning content visibility overrides site-wide default content visibilityGiven the following "courses" exist:| fullname | shortname || Course 1 | C1 |And I set the following administration settings values:| Default content visibility | 2 |And the following "user preferences" exist:| user | preference | value || admin | core_contentbank_visibility | 1 |And I am on "Course 1" course homepageAnd I click on "Site pages" "list_item" in the "Navigation" "block"And I click on "Content bank" "link" in the "Navigation" "block"And I click on "Upload" "link"And I upload "h5p/tests/fixtures/filltheblanks.h5p" file to "Upload content" filemanagerAnd I click on "Save changes" "button"Then "filltheblanks.h5p" "heading" should existAnd "filltheblanks.h5p (Unlisted)" "heading" should not exist