mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
MDL-71817 calendar: behat changes for calendar block
This commit does few things: 1) Remove unnecessary "I hover over today in the calendar" steps as it's not necessary to hover onto the day to see the events any more. 2) Replace "I follow This month" steps to "I follow Full calendar" 3) Update i_create_a_calendar_event_with_form_data() to use the new fullcalendar lang string.
This commit is contained in:
parent
73a14b1075
commit
b0133904bf
@ -35,7 +35,6 @@ Feature: Enable the calendar block in a course and test it's functionality
|
||||
When I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I add the "Calendar" block
|
||||
And I hover over today in the calendar
|
||||
Then I should see "Site Event"
|
||||
|
||||
@javascript
|
||||
@ -53,7 +52,6 @@ Feature: Enable the calendar block in a course and test it's functionality
|
||||
| id_name | Course Event |
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Hide site events"
|
||||
And I hover over today in the calendar
|
||||
Then I should not see "Site Event"
|
||||
And I should see "Course Event"
|
||||
|
||||
@ -66,7 +64,6 @@ Feature: Enable the calendar block in a course and test it's functionality
|
||||
| id_eventtype | Course |
|
||||
| id_name | Course Event |
|
||||
When I am on "Course 1" course homepage
|
||||
And I hover over today in the calendar
|
||||
Then I should see "Course Event"
|
||||
|
||||
@javascript
|
||||
@ -83,7 +80,6 @@ Feature: Enable the calendar block in a course and test it's functionality
|
||||
| id_name | User Event |
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Hide course events"
|
||||
And I hover over today in the calendar
|
||||
Then I should not see "Course Event"
|
||||
And I should see "User Event"
|
||||
|
||||
@ -96,7 +92,6 @@ Feature: Enable the calendar block in a course and test it's functionality
|
||||
| id_eventtype | User |
|
||||
| id_name | User Event |
|
||||
When I am on "Course 1" course homepage
|
||||
And I hover over today in the calendar
|
||||
Then I should see "User Event"
|
||||
|
||||
@javascript
|
||||
@ -113,7 +108,6 @@ Feature: Enable the calendar block in a course and test it's functionality
|
||||
| id_name | User Event |
|
||||
When I am on "Course 1" course homepage
|
||||
And I follow "Hide user events"
|
||||
And I hover over today in the calendar
|
||||
Then I should not see "User Event"
|
||||
And I should see "Course Event"
|
||||
|
||||
@ -136,7 +130,7 @@ Feature: Enable the calendar block in a course and test it's functionality
|
||||
And I press "Save and display"
|
||||
And I turn editing mode on
|
||||
And I add the "Calendar" block
|
||||
And I click on "This month" "link"
|
||||
And I click on "Full calendar" "link"
|
||||
And I click on "New event" "button"
|
||||
And I set the following fields to these values:
|
||||
| id_eventtype | Group |
|
||||
@ -147,12 +141,10 @@ Feature: Enable the calendar block in a course and test it's functionality
|
||||
And I log out
|
||||
Then I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I hover over today in the calendar
|
||||
And I should see "Group Event"
|
||||
And I log out
|
||||
And I log in as "student2"
|
||||
And I am on "Course 1" course homepage
|
||||
And I hover over today in the calendar
|
||||
And I should not see "Group Event"
|
||||
|
||||
@javascript
|
||||
@ -178,7 +170,7 @@ Feature: Enable the calendar block in a course and test it's functionality
|
||||
| id_eventtype | Course |
|
||||
| id_name | Course Event 1 |
|
||||
And I am on "Course 1" course homepage
|
||||
And I click on "This month" "link"
|
||||
And I click on "Full calendar" "link"
|
||||
And I click on "New event" "button"
|
||||
And I set the following fields to these values:
|
||||
| id_eventtype | Group |
|
||||
@ -190,6 +182,5 @@ Feature: Enable the calendar block in a course and test it's functionality
|
||||
Then I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Hide group events"
|
||||
And I hover over today in the calendar
|
||||
And I should not see "Group Event 1"
|
||||
And I should see "Course Event 1"
|
||||
|
@ -23,5 +23,4 @@ Feature: Enable the calendar block in a course
|
||||
Then I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage with editing mode on
|
||||
And I add the "Calendar" block
|
||||
And I hover over today in the calendar
|
||||
And I should see "Site Event"
|
||||
|
@ -15,5 +15,4 @@ Feature: View a site event on the dashboard
|
||||
| id_name | Site Event |
|
||||
And I log out
|
||||
When I log in as "student1"
|
||||
And I hover over today in the calendar
|
||||
Then I should see "Site Event"
|
||||
|
@ -19,5 +19,4 @@ Feature: Enable the calendar block on the site front page
|
||||
And I log out
|
||||
When I log in as "student1"
|
||||
And I am on site homepage
|
||||
And I hover over today in the calendar
|
||||
Then I should see "Site Event"
|
||||
|
@ -46,7 +46,7 @@ class behat_calendar extends behat_base {
|
||||
*/
|
||||
public function i_create_a_calendar_event_with_form_data($data) {
|
||||
// Go to current month page.
|
||||
$this->execute("behat_general::click_link", get_string('monththis', 'calendar'));
|
||||
$this->execute("behat_general::click_link", get_string('fullcalendar', 'calendar'));
|
||||
|
||||
// Create event.
|
||||
$this->i_create_a_calendar_event($data);
|
||||
|
@ -43,11 +43,11 @@ Feature: Perform basic calendar functionality
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "This month"
|
||||
And I follow "Full calendar"
|
||||
And I should see "Really awesome event!"
|
||||
And I log out
|
||||
And I log in as "student2"
|
||||
And I follow "This month"
|
||||
And I follow "Full calendar"
|
||||
And I should see "Really awesome event!"
|
||||
|
||||
@javascript
|
||||
@ -61,13 +61,13 @@ Feature: Perform basic calendar functionality
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
When I am on "Course 1" course homepage
|
||||
And I follow "This month"
|
||||
And I follow "Full calendar"
|
||||
And I click on "Really awesome event!" "link"
|
||||
And "Course 1" "link" should exist in the "Really awesome event!" "dialogue"
|
||||
And I click on "Close" "button"
|
||||
And I log out
|
||||
And I log in as "student2"
|
||||
And I follow "This month"
|
||||
And I follow "Full calendar"
|
||||
Then I should not see "Really awesome event!"
|
||||
|
||||
@javascript
|
||||
@ -82,7 +82,7 @@ Feature: Perform basic calendar functionality
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
When I am on "Course 1" course homepage
|
||||
And I follow "This month"
|
||||
And I follow "Full calendar"
|
||||
Then I follow "Really awesome event!"
|
||||
|
||||
@javascript
|
||||
@ -95,7 +95,7 @@ Feature: Perform basic calendar functionality
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
When I am on "Course 1" course homepage
|
||||
And I follow "This month"
|
||||
And I follow "Full calendar"
|
||||
Then I should not see "Really awesome event!"
|
||||
|
||||
@javascript
|
||||
@ -106,7 +106,7 @@ Feature: Perform basic calendar functionality
|
||||
| Event title | Really awesome event! |
|
||||
| Description | Come join this awesome event, sucka! |
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "This month"
|
||||
When I follow "Full calendar"
|
||||
And I click on "Really awesome event!" "link"
|
||||
And I click on "Delete" "button" in the "Really awesome event!" "dialogue"
|
||||
And I click on "Delete event" "button"
|
||||
@ -122,7 +122,7 @@ Feature: Perform basic calendar functionality
|
||||
| Description | Come join this awesome event, sucka! |
|
||||
| Location | Cube office |
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "This month"
|
||||
When I follow "Full calendar"
|
||||
And I click on "Really awesome event!" "link"
|
||||
And ".location-content" "css_element" should exist
|
||||
And I should see "Cube office"
|
||||
@ -144,7 +144,7 @@ Feature: Perform basic calendar functionality
|
||||
And the following "activities" exist:
|
||||
| activity | course | idnumber | name | intro | timeopen | timeclose |
|
||||
| choice | C1 | choice1 | Test choice | Test choice description | ##today## | ##today## |
|
||||
When I follow "This month"
|
||||
When I follow "Full calendar"
|
||||
Then I should see "Test choice opens"
|
||||
And I should see "Test choice closes"
|
||||
When I click on "Test choice opens" "link"
|
||||
@ -155,7 +155,7 @@ Feature: Perform basic calendar functionality
|
||||
And I wait to be redirected
|
||||
Then I should see "Test choice"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "This month"
|
||||
And I follow "Full calendar"
|
||||
When I click on "Test choice closes" "link"
|
||||
Then "Delete" "button" should not exist in the "Test choice closes" "dialogue"
|
||||
And "Edit" "button" should not exist in the "Test choice closes" "dialogue"
|
||||
@ -168,12 +168,12 @@ Feature: Perform basic calendar functionality
|
||||
Scenario: Attempt to create event without fill required fields should display validation errors
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "This month"
|
||||
And I follow "Full calendar"
|
||||
And I click on "New event" "button"
|
||||
When I click on "Save" "button"
|
||||
Then I should see "Required" in the "Event title" "form_row"
|
||||
And I am on homepage
|
||||
And I follow "This month"
|
||||
And I follow "Full calendar"
|
||||
And I click on "New event" "button"
|
||||
And I set the field "Event title" to "Really awesome event!"
|
||||
And I set the field "Type of event" to "Course"
|
||||
@ -187,7 +187,7 @@ Feature: Perform basic calendar functionality
|
||||
And I click on "New event" "button"
|
||||
Then the field "Type of event" matches value "User"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "This month"
|
||||
And I follow "Full calendar"
|
||||
When I click on "New event" "button"
|
||||
Then the field "Type of event" matches value "Course"
|
||||
|
||||
@ -223,7 +223,7 @@ Feature: Perform basic calendar functionality
|
||||
When I click on "New event" "button"
|
||||
Then I should see "User" in the "div#fitem_id_staticeventtype" "css_element"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "This month"
|
||||
And I follow "Full calendar"
|
||||
When I click on "New event" "button"
|
||||
Then I should see "User" in the "div#fitem_id_staticeventtype" "css_element"
|
||||
And I click on "Close" "button"
|
||||
@ -235,7 +235,7 @@ Feature: Perform basic calendar functionality
|
||||
And I log out
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "This month"
|
||||
And I follow "Full calendar"
|
||||
When I click on "New event" "button"
|
||||
Then I should see "User" in the "div#fitem_id_staticeventtype" "css_element"
|
||||
|
||||
@ -243,7 +243,7 @@ Feature: Perform basic calendar functionality
|
||||
Scenario: The calendar page must be accessible
|
||||
Given I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I follow "This month"
|
||||
When I follow "Full calendar"
|
||||
Then the page should meet accessibility standards
|
||||
And the page should meet "wcag131, wcag143, wcag412" accessibility standards
|
||||
And the page should meet accessibility standards with "wcag131, wcag143, wcag412" extra tests
|
||||
|
@ -20,7 +20,7 @@ Feature: Limit displayed upcoming events
|
||||
Given I am on "Course 1" course homepage with editing mode on
|
||||
And I add the "Calendar" block
|
||||
And I add the "Upcoming events" block
|
||||
And I follow "This month"
|
||||
And I follow "Full calendar"
|
||||
And I click on "a.next" "css_element"
|
||||
And I click on "a.next" "css_element"
|
||||
When I create a calendar event:
|
||||
|
@ -17,7 +17,7 @@ Feature: Export calendar events
|
||||
And I log in as "student1"
|
||||
|
||||
Scenario: Viewing calendar export options
|
||||
Given I follow "This month"
|
||||
Given I follow "Full calendar"
|
||||
When I click on "Export calendar" "link"
|
||||
Then I should see "All events"
|
||||
And I should see "Events related to courses"
|
||||
@ -25,7 +25,7 @@ Feature: Export calendar events
|
||||
And I should see "My personal events"
|
||||
|
||||
Scenario: Generating calendar URL for all events
|
||||
Given I follow "This month"
|
||||
Given I follow "Full calendar"
|
||||
And I click on "Export calendar" "link"
|
||||
And I set the field "All events" to "1"
|
||||
And I set the field "Recent and next 60 days" to "1"
|
||||
@ -33,7 +33,7 @@ Feature: Export calendar events
|
||||
Then the "value" attribute of "Calendar URL" "field" should contain "&preset_what=all&"
|
||||
|
||||
Scenario: Generating calendar URL for course events
|
||||
Given I follow "This month"
|
||||
Given I follow "Full calendar"
|
||||
And I click on "Export calendar" "link"
|
||||
And I set the field "Events related to courses" to "1"
|
||||
And I set the field "Recent and next 60 days" to "1"
|
||||
@ -41,7 +41,7 @@ Feature: Export calendar events
|
||||
Then the "value" attribute of "Calendar URL" "field" should contain "&preset_what=courses&"
|
||||
|
||||
Scenario: Generating calendar URL for group events
|
||||
Given I follow "This month"
|
||||
Given I follow "Full calendar"
|
||||
And I click on "Export calendar" "link"
|
||||
And I set the field "Events related to groups" to "1"
|
||||
And I set the field "Recent and next 60 days" to "1"
|
||||
@ -49,7 +49,7 @@ Feature: Export calendar events
|
||||
Then the "value" attribute of "Calendar URL" "field" should contain "&preset_what=groups&"
|
||||
|
||||
Scenario: Generating calendar URL for category events
|
||||
Given I follow "This month"
|
||||
Given I follow "Full calendar"
|
||||
And I click on "Export calendar" "link"
|
||||
And I set the field "Events related to categories" to "1"
|
||||
And I set the field "Recent and next 60 days" to "1"
|
||||
@ -57,7 +57,7 @@ Feature: Export calendar events
|
||||
Then the "value" attribute of "Calendar URL" "field" should contain "&preset_what=categories&"
|
||||
|
||||
Scenario: Generating calendar URL for user events
|
||||
Given I follow "This month"
|
||||
Given I follow "Full calendar"
|
||||
And I click on "Export calendar" "link"
|
||||
And I set the field "My personal events" to "1"
|
||||
And I set the field "Recent and next 60 days" to "1"
|
||||
|
@ -18,7 +18,7 @@ Feature: Open calendar popup
|
||||
|
||||
@javascript
|
||||
Scenario: I view calendar details of a day with multiple events
|
||||
Given I follow "This month"
|
||||
Given I follow "Full calendar"
|
||||
And I create a calendar event:
|
||||
| Type of event | site |
|
||||
| Event title | Event 1:1 |
|
||||
@ -27,23 +27,19 @@ Feature: Open calendar popup
|
||||
| Type of event | site |
|
||||
| Event title | Event 1:2 |
|
||||
| timestart[day] | 1 |
|
||||
And I reload the page
|
||||
When I hover over day "1" of this month in the calendar
|
||||
When I reload the page
|
||||
Then I should see "Event 1:1"
|
||||
And I should see "Event 1:2"
|
||||
And I follow "Home"
|
||||
And I hover over day "1" of this month in the calendar
|
||||
And I should see "Event 1:1"
|
||||
And I should see "Event 1:2"
|
||||
|
||||
@javascript
|
||||
Scenario: I view calendar details for today
|
||||
Given I follow "This month"
|
||||
And I create a calendar event:
|
||||
Given I follow "Full calendar"
|
||||
When I create a calendar event:
|
||||
| Type of event | site |
|
||||
| Event title | Today's event |
|
||||
When I hover over today in the calendar
|
||||
Then I should see "Today's event"
|
||||
And I follow "Home"
|
||||
And I hover over today in the calendar
|
||||
And I should see "Today's event"
|
||||
|
@ -24,7 +24,7 @@ Feature: Close modals by clicking outside them
|
||||
@javascript
|
||||
Scenario: The popup closes when clicked on dead space - Modal
|
||||
Given I log in as "admin"
|
||||
And I follow "This month"
|
||||
And I follow "Full calendar"
|
||||
And I press "New event"
|
||||
When I click on "[data-region='modal-container']" "css_element"
|
||||
# The modal does not close becaue it contains a form.
|
||||
|
@ -62,7 +62,7 @@ Feature: Set availability dates for an assignment
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "This month"
|
||||
And I follow "Full calendar"
|
||||
When I hover over day "2" of this month in the calendar
|
||||
Then I should see "C1: Assignment name is due"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user