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 in a course
3
  In order to enable the badges block in a course
4
  As a teacher
5
  I can add badges block to a course
6
 
7
  Background:
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 |
1441 ariadna 17
    And the following "core_badges > Badges" exist:
18
      | name    | course | description | image                        | status | type |
19
      | Badge 1 | C1     | Badge 1     | badges/tests/behat/badge.png | active | 2    |
20
      | Badge 2 | C1     | Badge 2     | badges/tests/behat/badge.png | active | 2    |
21
    And the following "core_badges > Criterias" exist:
22
      | badge   | role           |
23
      | Badge 1 | editingteacher |
24
      | Badge 2 | editingteacher |
25
    And I am on the "Course 1" "course" page logged in as "teacher1"
26
    And I navigate to "Badges" in current page administration
27
    And I follow "Badge 1"
1 efrain 28
    And I select "Recipients (0)" from the "jump" singleselect
29
    And I press "Award badge"
30
    And I set the field "potentialrecipients[]" to "Teacher 1 (teacher1@example.com)"
31
    And I press "Award badge"
32
    # Issue Badge 2 of 2
33
    And I am on "Course 1" course homepage
1441 ariadna 34
    And I navigate to "Badges" in current page administration
35
    And I follow "Badge 2"
1 efrain 36
    And I select "Recipients (0)" from the "jump" singleselect
37
    And I press "Award badge"
38
    And I set the field "potentialrecipients[]" to "Teacher 1 (teacher1@example.com)"
39
    And I press "Award badge"
40
    And I log out
41
 
42
  Scenario: Add the recent badges block to a course.
43
    Given I log in as "teacher1"
44
    And I am on "Course 1" course homepage with editing mode on
45
    When I add the "Latest badges" block
46
    Then I should see "Badge 1" in the "Latest badges" "block"
47
    And I should see "Badge 2" in the "Latest badges" "block"
48
 
49
  Scenario: Add the recent badges block to a course and limit it to only display 1 badge.
50
    Given I log in as "teacher1"
51
    And I am on "Course 1" course homepage with editing mode on
52
    When I add the "Latest badges" block
53
    And I configure the "Latest badges" block
54
    And I set the following fields to these values:
55
      | Number of latest badges to display | 1 |
56
    And I press "Save changes"
57
    Then I should see "Badge 2" in the "Latest badges" "block"
58
    And I should not see "Badge 1" in the "Latest badges" "block"