weekly release 3.6dev
[moodle.git] / blocks / myoverview / tests / behat / block_myoverview_dashboard.feature
CommitLineData
1dc764a6 1@block @block_myoverview @javascript
44eb44e4 2Feature: The my overview block allows users to easily access their courses
1dc764a6
SL
3 In order to enable the my overview block in a course
4 As a student
5 I can add the my overview block to my dashboard
6
7 Background:
8 Given the following "users" exist:
9 | username | firstname | lastname | email | idnumber |
10 | student1 | Student | 1 | student1@example.com | S1 |
11 | student2 | Student | 2 | student2@example.com | S2 |
12 And the following "courses" exist:
13 | fullname | shortname | category | startdate | enddate |
14 | Course 1 | C1 | 0 | ##1 month ago## | ##15 days ago## |
15 | Course 2 | C2 | 0 | ##yesterday## | ##tomorrow## |
16 | Course 3 | C3 | 0 | ##first day of next month## | ##last day of next month## |
1dc764a6
SL
17 And the following "course enrolments" exist:
18 | user | course | role |
19 | student1 | C1 | student |
20 | student1 | C2 | student |
21 | student1 | C3 | student |
22
1dc764a6
SL
23 Scenario: See the courses I am enrolled by their status on courses view
24 Given I log in as "student1"
4671ae63 25 And I should see "Course 2" in the "Course overview" "block"
4671ae63 26 And I should not see "Course 1" in the "Course overview" "block"
44eb44e4 27 And I click on "In progress" "button" in the "Course overview" "block"
4671ae63
RW
28 And I click on "Future" "link" in the "Course overview" "block"
29 And I should see "Course 3" in the "Course overview" "block"
4671ae63 30 And I should not see "Course 1" in the "Course overview" "block"
44eb44e4 31 And I click on "Future" "button" in the "Course overview" "block"
4671ae63
RW
32 When I click on "Past" "link" in the "Course overview" "block"
33 Then I should see "Course 1" in the "Course overview" "block"
34 And I should not see "Course 2" in the "Course overview" "block"
35 And I should not see "Course 3" in the "Course overview" "block"
1dc764a6 36 And I log out