Línea 17... |
Línea 17... |
17 |
| student1 | C1 | student |
|
17 |
| student1 | C1 | student |
|
Línea 18... |
Línea 18... |
18 |
|
18 |
|
19 |
@javascript
|
19 |
@javascript
|
20 |
Scenario Outline: Delete course badge already awarded to student
|
20 |
Scenario Outline: Delete course badge already awarded to student
|
21 |
Given the following "core_badges > Badges" exist:
|
21 |
Given the following "core_badges > Badges" exist:
|
22 |
| name | course | description | image | status | type |
|
22 |
| name | course | description | image | status | type |
|
23 |
| <badgename> | C1 | <badgename> description | badges/tests/behat/badge.png | active | 2 |
|
23 |
| Testing badge 1 | C1 | Testing badge 1 description | badges/tests/behat/badge.png | active | 2 |
|
24 |
And the following "core_badges > Criterias" exist:
|
24 |
And the following "core_badges > Criterias" exist:
|
25 |
| badge | role |
|
25 |
| badge | role |
|
26 |
| <badgename> | editingteacher |
|
26 |
| Testing badge 1 | editingteacher |
|
27 |
And the following "core_badges > Issued badges" exist:
|
27 |
And the following "core_badges > Issued badges" exist:
|
28 |
| badge | user |
|
28 |
| badge | user |
|
29 |
| <badgename> | student1 |
|
29 |
| Testing badge 1 | student1 |
|
30 |
When I am on the "Course 1" "enrolled users" page logged in as "teacher1"
|
30 |
When I am on the "Course 1" "enrolled users" page logged in as "teacher1"
|
31 |
And I click on "Student 1" "link"
|
31 |
And I click on "Student 1" "link"
|
32 |
Then I should see "<badgename>"
|
32 |
Then I should see "Testing badge 1"
|
33 |
And I am on the "Course 1" course page
|
33 |
And I am on the "Course 1" course page
|
34 |
# Navigate to Manage Badges page in order to delete the badge
|
34 |
# Navigate to Badges page in order to delete the badge
|
35 |
And I navigate to "Badges > Manage badges" in current page administration
|
35 |
And I navigate to "Badges" in current page administration
|
36 |
# Delete the badge
|
36 |
# Delete the badge
|
37 |
And I press "Delete" action in the "<badgename>" report row
|
37 |
And I press "Delete" action in the "Testing badge 1" report row
|
- |
|
38 |
And I press "<deleteoption>"
|
- |
|
39 |
And the following <shouldtable> exist in the "reportbuilder-table" table:
|
- |
|
40 |
| Name | Badge status |
|
- |
|
41 |
| Testing badge 1 | Archived |
|
- |
|
42 |
And I <shouldmsg> see "There are no matching badges available for users to earn."
|
38 |
And I press "<deleteoption>"
|
43 |
# Confirm that badge is retained in the first case as awarded badge but not in the second.
|
39 |
And I am on the "Course 1" "enrolled users" page
|
44 |
And I am on the "Course 1" "enrolled users" page
|
40 |
And I click on "Student 1" "link"
|
- |
|
41 |
# Confirm that Badge 1 is retained as awarded badge but Badge 2 is not
|
45 |
And I click on "Student 1" "link"
|
42 |
And I <visibility> see "<badgename>"
|
- |
|
43 |
And I am on the "Course 1" course page
|
- |
|
44 |
# Navigate to Badges page to confirm that no badges exist, hence, Manage badges would not exist
|
- |
|
45 |
And I navigate to "Badges" in current page administration
|
- |
|
46 |
# Confirm that badges are sucessfully deleted
|
- |
|
Línea 47... |
Línea 46... |
47 |
And I should see "There are currently no badges available for users to earn."
|
46 |
And I <shouldtable> see "Testing badge 1"
|
48 |
|
47 |
|
49 |
Examples:
|
48 |
Examples:
|
50 |
| badgename | deleteoption | visibility |
|
49 |
| deleteoption | shouldtable | shouldmsg |
|