Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
@core @core_badgesFeature: Add badges to the systemIn order to give badges to users for their achievementsAs an adminI need to manage badges in the systemBackground:Given I am on homepageAnd I log in as "admin"@javascriptScenario: Accessing the badgesAnd I turn editing mode onAnd the following config values are set as admin:| unaddableblocks | | theme_boost|# TODO MDL-57120 site "Badges" 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"Given I click on "Site badges" "link" in the "Navigation" "block"Then I should see "There are currently no badges available for users to earn."@javascript @_file_uploadScenario: Add a badgeGiven I navigate to "Badges > Badges settings" in site administrationAnd I set the field "Badge issuer name" to "Test Badge Site"And I set the field "Badge issuer email address" to "testuser@example.com"And I press "Save changes"And I navigate to "Badges > Add a new badge" in site administrationAnd I set the following fields to these values:| Name | Test badge with 'apostrophe' and other friends (<>&@#) || Version | v1 || Language | English || Description | Test badge description || Image author | http://author.example.com || Image caption | Test caption image || Tags | Math, Physics |And I upload "badges/tests/behat/badge.png" file to "Image" filemanagerWhen I press "Create badge"Then I should see "Edit details"And I should see "Test badge with 'apostrophe' and other friends (&@#)"And I should see "Endorsement"And I should see "Related badges (0)"And I should see "Alignments (0)"And I should not see "Create badge"And I should not see "Issuer details"And I select "Overview" from the "jump" singleselectAnd I should see "Issuer details"And I should see "Test Badge Site"And I should see "testuser@example.com"And I should see "Tags"And I should see "Math"And I should see "Physics"And I navigate to "Badges > Manage badges" in site administrationAnd I should not see "There are currently no badges available for users to earn."@javascript @_file_uploadScenario: Add a badge relatedGiven I navigate to "Badges > Add a new badge" in site administrationAnd I set the following fields to these values:| Name | Test Badge 1 || Version | v1 || Language | French || Description | Test badge related description || Image author | http://author.example.com || Image caption | Test caption image |And I upload "badges/tests/behat/badge.png" file to "Image" filemanagerAnd I press "Create badge"And I wait until the page is readyAnd I navigate to "Badges > Manage badges" in site administrationAnd I press "Add a new badge"And I set the following fields to these values:| Name | Test Badge 2 || Version | v2 || Language | English || Description | Test badge description || Image author | http://author.example.com || Image caption | Test caption image |And I upload "badges/tests/behat/badge.png" file to "Image" filemanagerAnd I press "Create badge"And I select "Related badges (0)" from the "jump" singleselectAnd I should see "This badge does not have any related badges."And I press "Add related badge"And I follow "Related badges"And I wait until the page is readyAnd I follow "Related badges"And I set the field "relatedbadgeids[]" to "Test Badge 1 (version: v1, language: French, Site badges)"When I press "Save changes"Then I should see "Related badges (1)"@javascript @_file_uploadScenario: Endorsement for BadgeGiven I navigate to "Badges > Add a new badge" in site administrationAnd I set the following fields to these values:| Name | Test Badge Enrolment || Version | v1 || Language | English || Description | Test badge description || Image author | http://author.example.com || Image caption | Test caption image |And I upload "badges/tests/behat/badge.png" file to "Image" filemanagerWhen I press "Create badge"Then I should see "Edit details"And I should see "Endorsement"And I select "Endorsement" from the "jump" singleselectAnd I set the following fields to these values:| Endorser name | Endorser || Email | endorsement@example.com || Issuer URL | http://example.com || Claim URL | http://claimurl.example.com || Endorsement comment | Test Endorsement comment |And I press "Save changes"Then I should see "Changes saved"@javascript @_file_uploadScenario: Alignments for BadgeGiven I navigate to "Badges > Add a new badge" in site administrationAnd I set the following fields to these values:| Name | Test Badge || Version | v1 || Language | English || Description | Test badge description || Image author | http://author.example.com || Image caption | Test caption image |And I upload "badges/tests/behat/badge.png" file to "Image" filemanagerWhen I press "Create badge"Then I should see "Test Badge"And I should see "Endorsement"And I select "Alignments (0)" from the "jump" singleselectAnd I should see "This badge does not have any external skills or standards specified."And I press "Add external skill or standard"And I set the following fields to these values:| Name | Test Badge Alignments || URL | https://alignments.example.com || Description | Test Badge Alignments description |When I press "Save changes"And I should see "Alignments (1)"@javascript @_file_uploadScenario: Add a badge from Site badges sectionGiven I turn editing mode onAnd the following config values are set as admin:| unaddableblocks | | theme_boost|# TODO MDL-57120 site "Badges" link not accessible without navigation block.And I add the "Navigation" block if not presentWhen I click on "Site pages" "list_item" in the "Navigation" "block"And I click on "Site badges" "link" in the "Navigation" "block"Then I should see "Add a new badge"# Add a badge.When I press "Add a new badge"And I set the following fields to these values:| Name | Test badge with 'apostrophe' and other friends (<>&@#) 2 || Version | v1 || Language | English || Description | Test badge description || Image author | http://author.example.com || Image caption | Test caption image |And I upload "badges/tests/behat/badge.png" file to "Image" filemanagerAnd I press "Create badge"Then I should see "Edit details"And I should see "Test badge with 'apostrophe' and other friends (&@#) 2"And I should see "Endorsement"And I should see "Related badges (0)"And I should see "Alignments (0)"And I should not see "Create badge"And I navigate to "Badges > Manage badges" in site administrationAnd I should not see "There are currently no badges available for users to earn."# See buttons from the "Site badges" page.And I am on homepageWhen I click on "Site pages" "list_item" in the "Navigation" "block"And I click on "Site badges" "link" in the "Navigation" "block"Then I should see "Manage badges"And I should see "Add a new badge"@javascript @_file_uploadScenario: Edit a badgeGiven I navigate to "Badges > Badges settings" in site administrationAnd I set the field "Badge issuer name" to "Test Badge Site"And I set the field "Badge issuer email address" to "testuser@example.com"And I press "Save changes"And I navigate to "Badges > Add a new badge" in site administrationAnd I set the following fields to these values:| Name | Test badge with 'apostrophe' and other friends (<>&@#) || Version | firstversion || Language | English || Description | Test badge description || Image author | http://author.example.com || Image caption | Test caption image || Tags | Math, Physics |And I upload "badges/tests/behat/badge.png" file to "Image" filemanagerAnd I press "Create badge"When I select "Edit details" from the "jump" singleselectAnd I should see "Test badge with 'apostrophe' and other friends (&@#)"And I should not see "Issuer details"And I should see "Math"And I should see "Physics"And I set the following fields to these values:| Name | Test badge renamed || Version | secondversion || Tags | Math, History |And I press "Save changes"And I select "Overview" from the "jump" singleselectThen I should not see "Test badge with 'apostrophe' and other friends (&@#)"And I should not see "firstversion"And I should not see "Math, Physics"And I should see "Test badge renamed"And I should see "secondversion"And I should see "Math"And I should see "History"