Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@block @block_badges @core_badges @_file_upload @javascript
2
Feature: Enable Block Badges on the dashboard and view awarded badges
3
  In order to view recent badges on the dashboard
4
  As a teacher
5
  I can add badges block to the dashboard
6
 
7
  Scenario: Add the recent badges block to a course.
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email | idnumber |
10
      | teacher1 | Teacher | 1 | teacher1@example.com | T1 |
11
    And the following "courses" exist:
12
      | fullname | shortname | category |
13
      | Course 1 | C1 | 0 |
14
    And the following "course enrolments" exist:
15
      | user | course | role |
16
      | teacher1 | C1 | editingteacher |
17
    And the following "blocks" exist:
18
      | blockname  | contextlevel | reference | pagetypepattern | defaultregion |
19
      | badges     | System       | 1         | my-index        | side-post     |
1441 ariadna 20
    And the following "core_badges > Badge" exists:
21
      | name        | Badge 1                      |
22
      | course      | C1                           |
23
      | description | Badge 1                      |
24
      | image       | badges/tests/behat/badge.png |
25
      | status      | active                       |
26
      | type        | 2                            |
27
    And the following "core_badges > Criteria" exists:
28
      | badge  | Badge 1       |
29
      | role   | editingteacher |
30
    And I am on the "Course 1" "course" page logged in as "teacher1"
31
    And I navigate to "Badges" in current page administration
32
    And I follow "Badge 1"
1 efrain 33
    And I select "Recipients (0)" from the "jump" singleselect
34
    And I press "Award badge"
35
    And I set the field "potentialrecipients[]" to "Teacher 1 (teacher1@example.com)"
36
    And I press "Award badge"
37
    And I log out
38
    When I log in as "teacher1"
39
    Then I should see "Badge 1" in the "Latest badges" "block"