Skip to content

Commit

Permalink
Merge branch 'MDL-77695-400' of https://github.com/lameze/moodle into…
Browse files Browse the repository at this point in the history
… MOODLE_400_STABLE
  • Loading branch information
andrewnicols committed Aug 16, 2023
2 parents c9682df + 750da4a commit d796157
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions badges/tests/behat/award_badge.feature
Expand Up @@ -229,12 +229,19 @@ Feature: Award badges

@javascript
Scenario: Award badge on course completion
Given I log in as "teacher1"
Given the following "activity" exists:
| activity | chat |
| course | C1 |
| name | Music history |
| section | 1 |
| completion | 2 |
| completionview | 1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I navigate to "Course completion" in current page administration
And I set the field "id_overall_aggregation" to "2"
And I click on "Condition: Activity completion" "link"
And I set the field "Assignment - Test assignment name" to "1"
And I set the field "Chat - Music history" to "1"
And I press "Save changes"
And I am on "Course 1" course homepage
And I navigate to "Badges > Add a new badge" in current page administration
Expand All @@ -253,8 +260,7 @@ Feature: Award badges
And I follow "Profile" in the user menu
And I click on "Course 1" "link" in the "region-main" "region"
Then I should not see "badges"
And I am on "Course 1" course homepage
And I toggle the manual completion state of "Test assignment name"
When I am on the "Music history" "chat activity" page
And I log out
# Completion cron won't mark the whole course completed unless the
# individual criteria was marked completed more than a second ago. So
Expand All @@ -265,6 +271,7 @@ Feature: Award badges
# The student should now see their badge.
And I log in as "student1"
And I follow "Profile" in the user menu
And I click on "Course 1" "link" in the "region-main" "region"
Then I should see "Course Badge"

@javascript
Expand Down

0 comments on commit d796157

Please sign in to comment.