diff --git a/blocks/myoverview/tests/behat/block_myoverview_dashboard.feature b/blocks/myoverview/tests/behat/block_myoverview_dashboard.feature index 0e9e623c917..175d4173e20 100644 --- a/blocks/myoverview/tests/behat/block_myoverview_dashboard.feature +++ b/blocks/myoverview/tests/behat/block_myoverview_dashboard.feature @@ -8,12 +8,15 @@ Feature: The my overview block allows users to easily access their courses Given the following "users" exist: | username | firstname | lastname | email | idnumber | | student1 | Student | X | student1@example.com | S1 | + And the following "categories" exist: + | name | category | idnumber | + | Category 1 | 0 | CAT1 | And the following "courses" exist: | fullname | shortname | category | startdate | enddate | | Course 1 | C1 | 0 | ##1 month ago## | ##15 days ago## | | Course 2 | C2 | 0 | ##yesterday## | ##tomorrow## | | Course 3 | C3 | 0 | ##yesterday## | ##tomorrow## | - | Course 4 | C4 | 0 | ##yesterday## | ##tomorrow## | + | Course 4 | C4 | CAT1 | ##yesterday## | ##tomorrow## | | Course 5 | C5 | 0 | ##first day of next month## | ##last day of next month## | And the following "course enrolments" exist: | user | course | role | @@ -200,3 +203,21 @@ Feature: The my overview block allows users to easily access their courses And I should not see "Course 3" in the "Course overview" "block" And I should not see "Course 4" in the "Course overview" "block" And I log out + + Scenario: Show course category in cards display + Given I log in as "student1" + And I click on "Display dropdown" "button" in the "Course overview" "block" + When I click on "Card" "link" in the "Course overview" "block" + Then I should see "Category 1" in the "Course overview" "block" + + Scenario: Show course category in list display + Given I log in as "student1" + And I click on "Display dropdown" "button" in the "Course overview" "block" + When I click on "List" "link" in the "Course overview" "block" + Then I should see "Category 1" in the "Course overview" "block" + + Scenario: Show course category in summary display + Given I log in as "student1" + And I click on "Display dropdown" "button" in the "Course overview" "block" + When I click on "Summary" "link" in the "Course overview" "block" + Then I should see "Category 1" in the "Course overview" "block"