mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
MDL-65707 calendar: behat scenario to test default event type
This commit is contained in:
parent
419b868ae7
commit
ce715ce556
@ -124,4 +124,16 @@ class behat_calendar extends behat_base {
|
||||
$this->getSession()->visit($this->locate_path('/calendar/view.php?view=month&course=1&time='.$time));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Navigate to site calendar.
|
||||
*
|
||||
* @Given /^I am viewing site calendar$/
|
||||
* @throws coding_exception
|
||||
* @return void
|
||||
*/
|
||||
public function i_am_viewing_site_calendar() {
|
||||
$url = new moodle_url('/calendar/view.php', ['view' => 'month']);
|
||||
$this->getSession()->visit($this->locate_path($url->out_as_local_url(false)));
|
||||
}
|
||||
}
|
||||
|
@ -177,3 +177,14 @@ Feature: Perform basic calendar functionality
|
||||
And I set the field "Type of event" to "Course"
|
||||
When I click on "Save" "button"
|
||||
And I should see "Select a course" in the "Course" "form_row"
|
||||
|
||||
@javascript
|
||||
Scenario: Default event type selection in the event form
|
||||
Given I log in as "teacher1"
|
||||
When I am viewing site calendar
|
||||
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"
|
||||
When I click on "New event" "button"
|
||||
Then the field "Type of event" matches value "Course"
|
||||
|
Loading…
x
Reference in New Issue
Block a user