AutorÃa | Ultima modificación | Ver Log |
@core @core_course @core_tag @javascriptFeature: Tagging coursesIn order to search coursesAs a teacherI need to be able to tag coursesBackground:Given the following "users" exist:| username | firstname | lastname | email || teacher1 | Teacher | 1 | teacher1@example.com || teacher2 | Teacher | 2 | teacher2@example.com || user1 | User | 1 | user1@example.com |And the following "courses" exist:| fullname | shortname || Course 1 | c1 || Course 2 | c2 |And the following "tags" exist:| name | isstandard || Neverusedtag | 1 |And the following "course enrolments" exist:| user | course | role || teacher1 | c1 | editingteacher || teacher2 | c1 | teacher || teacher1 | c2 | editingteacher || teacher2 | c2 | teacher |And I log in as "teacher1"And I am on "Course 1" course homepageAnd I navigate to "Settings" in current page administrationAnd I set the following fields to these values:| Tags | Mathematics |And I press "Save and display"And I log outScenario: Set course tags using the course edit formWhen I log in as "teacher1"And I am on "Course 1" course homepageAnd I navigate to "Settings" in current page administrationAnd I expand all fieldsetsThen "Mathematics" "autocomplete_suggestions" should existAnd I set the following fields to these values:| Tags | Mathematics, Algebra |And I press "Save and display"And I am on "Course 2" course homepageAnd I navigate to "Settings" in current page administrationAnd I set the following fields to these values:| Tags | Mathematics, Geometry |And I press "Save and display"And I log outAnd I log in as "user1"And I turn editing mode onAnd the following config values are set as admin:| unaddableblocks | | theme_boost|# TODO MDL-57120 "Tags" link not accessible without navigation block.And I add the "Navigation" block if not presentAnd I click on "Site pages" "list_item" in the "Navigation" "block"And I click on "Tags" "link" in the "Navigation" "block"And I follow "Mathematics"Then I should see "Course 1"And I should see "Course 2"And I follow "Tags"And I follow "Algebra"And I should see "Course 1"And I should not see "Course 2"And I follow "Tags"And I follow "Geometry"And I should not see "Course 1"And I should see "Course 2"And I log outScenario: User can set course tags using separate formGiven the following "role capability" exists:| role | teacher || moodle/course:tag | allow |When I log in as "teacher2"And I am on "Course 1" course homepageAnd I navigate to "Course tags" in current page administrationThen I should see "Mathematics" in the ".form-autocomplete-selection" "css_element"And I set the following fields to these values:| Tags | Mathematics, Algebra |And I press "Save changes"And I am on "Course 2" course homepageAnd I navigate to "Course tags" in current page administrationAnd I set the following fields to these values:| Tags | Mathematics, Geometry |And I press "Save changes"And I log outAnd I log in as "user1"And I turn editing mode onAnd the following config values are set as admin:| unaddableblocks | | theme_boost|# TODO MDL-57120 "Tags" link not accessible without navigation block.And I add the "Navigation" block if not presentAnd I click on "Site pages" "list_item" in the "Navigation" "block"And I click on "Tags" "link" in the "Navigation" "block"And I follow "Mathematics"Then I should see "Course 1"And I should see "Course 2"And I follow "Tags"And I follow "Algebra"And I should see "Course 1"And I should not see "Course 2"And I follow "Tags"And I follow "Geometry"And I should not see "Course 1"And I should see "Course 2"And I log out