| Server IP : 104.21.80.248 / Your IP : 162.159.115.42 Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586 User : SYSTEM ( 0) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Inetpub/www/myschool/triamudom/tuprblearn/blocks/badges/tests/behat/ |
Upload File : |
@block @block_badges @core_badges @_file_upload @javascript
Feature: Enable Block Badges on the frontpage and view awarded badges
In order to enable the badges block on the frontpage
As a admin
I can add badges block to the frontpage
Scenario: Add the recent badges block on the frontpage and view recent badges
Given the following "users" exist:
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | [email protected] | T1 |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin"
And I am on site homepage
And I navigate to "Turn editing on" in current page administration
And I add the "Latest badges" block
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
# Issue badge 1 of 2
And I navigate to "Badges > Add a new badge" in current page administration
And I set the following fields to these values:
| id_name | Badge 1 |
| id_description | Badge 1 |
| id_issuername | Teacher 1 |
And I upload "blocks/badges/tests/fixtures/badge.png" file to "Image" filemanager
And I press "Create badge"
And I select "Manual issue by role" from the "Add badge criteria" singleselect
And I set the field "Teacher" to "1"
And I press "Save"
And I press "Enable access"
And I press "Continue"
And I follow "Recipients (0)"
And I press "Award badge"
And I set the field "potentialrecipients[]" to "Teacher 1 ([email protected])"
And I press "Award badge"
And I log out
When I log in as "teacher1"
And I am on site homepage
Then I should see "Badge 1" in the "Latest badges" "block"