block_badges.feature 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. @block @block_badges
  2. Feature: Enable Block Badges in a course without badges
  3. In order to view the badges block in a course
  4. As a teacher
  5. I can add badges block to a course and view the contents
  6. Background:
  7. Given the following "users" exist:
  8. | username | firstname | lastname | email | idnumber |
  9. | teacher1 | Teacher | 1 | teacher1@example.com | T1 |
  10. And the following "courses" exist:
  11. | fullname | shortname | category |
  12. | Course 1 | C1 | 0 |
  13. And the following "course enrolments" exist:
  14. | user | course | role |
  15. | teacher1 | C1 | editingteacher |
  16. Scenario: Add the block to a the course when badges are disabled
  17. Given I log in as "admin"
  18. And the following config values are set as admin:
  19. | enablebadges | 0 |
  20. And I log out
  21. And I log in as "teacher1"
  22. And I follow "Course 1"
  23. And I turn editing mode on
  24. When I add the "Latest badges" block
  25. Then I should see "Badges are not enabled on this site." in the "Latest badges" "block"
  26. Scenario: Add the block to a the course when badges are enabled
  27. Given I log in as "teacher1"
  28. And I follow "Course 1"
  29. And I turn editing mode on
  30. When I add the "Latest badges" block
  31. Then I should see "You have no badges to display" in the "Latest badges" "block"