MDL-71817 calendar: behat changes for calendar block
[moodle.git] / calendar / tests / behat / minicalendar.feature
blobfaf0987b7b7db962f0e3647bcf554f0d092564e8
1 @core @core_calendar
2 Feature: Open calendar popup
3   In order to view calendar information
4   As a user
5   I need to interact with the calendar
7   Background:
8     Given the following "users" exist:
9       | username | firstname | lastname | email |
10       | student1 | Student | 1 | student1@example.com |
11     And the following "courses" exist:
12       | fullname | shortname | format |
13       | Course 1 | C1 | topics |
14     And the following "course enrolments" exist:
15       | user | course | role |
16       | student1 | C1 | student |
17     And I log in as "admin"
19   @javascript
20   Scenario: I view calendar details of a day with multiple events
21     Given I follow "Full calendar"
22     And I create a calendar event:
23       | Type of event     | site |
24       | Event title       | Event 1:1 |
25       | timestart[day]    | 1  |
26     And I create a calendar event:
27       | Type of event     | site |
28       | Event title       | Event 1:2 |
29       | timestart[day]    | 1  |
30     When I reload the page
31     Then I should see "Event 1:1"
32     And I should see "Event 1:2"
33     And I follow "Home"
34     And I should see "Event 1:1"
35     And I should see "Event 1:2"
37   @javascript
38   Scenario: I view calendar details for today
39     Given I follow "Full calendar"
40     When I create a calendar event:
41       | Type of event     | site |
42       | Event title       | Today's event |
43     Then I should see "Today's event"
44     And I follow "Home"
45     And I should see "Today's event"