mirror of
https://github.com/moodle/moodle.git
synced 2025-04-25 10:26:17 +02:00
MDL-63794 block_myoverview: Add behat tests
This commit is contained in:
parent
33a388eff7
commit
d657d80db0
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user