Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
behat_calendar Class Reference

Contains functions used by behat to test functionality. More...

Inheritance diagram for behat_calendar:
behat_base behat_session_interface

Public Member Functions

 getSession ($name=null)
 Returns the Mink session.
 
 i_am_viewing_calendar_in_view (string $view)
 Navigate to a specific view in the calendar.
 
 i_am_viewing_site_calendar ()
 Navigate to site calendar.
 
 i_create_a_calendar_event ($data)
 Create event.
 
 i_create_a_calendar_event_with_form_data ($data)
 Create event when starting on the front page.
 
 i_hover_over_day_of_this_month_in_full_calendar_page (int $day, string $responsive='')
 Hover over a specific day in the full calendar page.
 
 i_hover_over_day_of_this_month_in_mini_calendar_block (int $day, string $responsive='')
 Hover over a specific day in the mini-calendar.
 
 i_hover_over_today_in_mini_calendar_block (string $responsive='')
 Hover over today in the mini-calendar.
 
 i_view_the_calendar_day_view (int $day, int $month, int $year)
 Navigate to a specific date in the calendar.
 
 i_view_the_calendar_for ($month, $year)
 Navigate to a specific month in the calendar.
 

Static Public Member Functions

static get_partial_named_selectors ()
 Return the list of partial named selectors.
 

Public Attributes

const PAGE_READY_JS
 The JS code to check that the page is ready.
 

Detailed Description

Contains functions used by behat to test functionality.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ get_partial_named_selectors()

static behat_calendar::get_partial_named_selectors ( )
static

Return the list of partial named selectors.

Return values
array

◆ getSession()

behat_session_interface::getSession ( $name = null)
inherited

Returns the Mink session.

Parameters
string | null$namename of the session OR active session will be used
Return values
Behat\Mink\Session

Implemented in behat_form_field.

◆ i_am_viewing_calendar_in_view()

behat_calendar::i_am_viewing_calendar_in_view ( string $view)

Navigate to a specific view in the calendar.

@Given /^I am viewing calendar in "([^"]+)" view$/

Parameters
string$viewThe calendar view ('month', 'day' and 'upcoming') to navigate to.
Return values
void

◆ i_am_viewing_site_calendar()

behat_calendar::i_am_viewing_site_calendar ( )

Navigate to site calendar.

@Given /^I am viewing site calendar$/

Exceptions
coding_exception
Return values
void

◆ i_create_a_calendar_event()

behat_calendar::i_create_a_calendar_event ( $data)

Create event.

@Given /^I create a calendar event:$/

Parameters
TableNode$data

◆ i_create_a_calendar_event_with_form_data()

behat_calendar::i_create_a_calendar_event_with_form_data ( $data)

Create event when starting on the front page.

@Given /^I create a calendar event with form data:$/

Parameters
TableNode$data

◆ i_hover_over_day_of_this_month_in_full_calendar_page()

behat_calendar::i_hover_over_day_of_this_month_in_full_calendar_page ( int $day,
string $responsive = '' )

Hover over a specific day in the full calendar page.

@Given /^I hover over day "(?P<dayofmonth>::d+)" of this month in the full calendar page(?P<responsive> responsive view|)$/

Parameters
int$dayThe day of the current month
string$responsiveIf not empty, use the repsonsive view.

◆ i_hover_over_day_of_this_month_in_mini_calendar_block()

behat_calendar::i_hover_over_day_of_this_month_in_mini_calendar_block ( int $day,
string $responsive = '' )

Hover over a specific day in the mini-calendar.

@Given /^I hover over day "(?P<dayofmonth>::d+)" of this month in the mini-calendar block(?P<responsive> responsive view|)$/

Parameters
int$dayThe day of the current month
string$responsiveIf not null, find the responsive version of the link.

◆ i_hover_over_today_in_mini_calendar_block()

behat_calendar::i_hover_over_today_in_mini_calendar_block ( string $responsive = '')

Hover over today in the mini-calendar.

@Given /^I hover over today in the mini-calendar block( responsive view|)$/

Parameters
string$responsiveIf not empty, use the responsive calendar link.

◆ i_view_the_calendar_day_view()

behat_calendar::i_view_the_calendar_day_view ( int $day,
int $month,
int $year )

Navigate to a specific date in the calendar.

@Given /^I view the calendar for "(?P<day>::d+)" "(?P<month>\d+)" "(?P<year>\d+)"$/

Parameters
int$daythe day selected as a number
int$monththe month selected as a number
int$yearthe four digit year

◆ i_view_the_calendar_for()

behat_calendar::i_view_the_calendar_for ( $month,
$year )

Navigate to a specific month in the calendar.

@Given /^I view the calendar for "(?P<month>::d+)" "(?P<year>\d+)"$/

Parameters
int$monththe month selected as a number
int$yearthe four digit year

Member Data Documentation

◆ PAGE_READY_JS

const behat_session_interface::PAGE_READY_JS
inherited
Initial value:
= "document.readyState === 'complete' && " .
"(typeof M !== 'object' || typeof M.util !== 'object' || " .
"typeof M.util.pending_js === 'undefined' || M.util.pending_js.length === 0)"

The JS code to check that the page is ready.

The document must be complete and either M.util.pending_js must be empty, or it must not be defined at all.


The documentation for this class was generated from the following file: