Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)

Classes

class  behat_theme_classic_behat_admin
 Step definitions related to administration overrides for the Classic theme. More...
 
class  behat_theme_classic_behat_blocks
 Step definitions related to blocks overrides for the Classic theme. More...
 
class  behat_theme_classic_behat_completion
 Step definitions related to blocks overrides for the Classic theme. More...
 
class  behat_theme_classic_behat_core_question
 Step definitions related to blocks overrides for the Classic theme. More...
 
class  behat_theme_classic_behat_course
 Behat course-related step definition overrides for the Classic theme. More...
 
class  behat_theme_classic_behat_general
 Behat grade related step definition overrides for the Classic theme. More...
 
class  behat_theme_classic_behat_grade
 Behat grade related step definition overrides for the Classic theme. More...
 
class  behat_theme_classic_behat_grading
 Step definitions related to blocks overrides for the Classic theme. More...
 
class  behat_theme_classic_behat_navigation
 Navigation step definition overrides for the Classic theme. More...
 
class  behat_theme_classic_behat_repository_upload
 Override definitions for the upload repository type for the Classic theme. More...
 

Functions

 find_header_administration_menu ($mustexist=false)
 Locates the administration menu in the <header> element and returns its xpath.
 
 find_page_administration_menu ($mustexist=false)
 Locate the administration menu on the page (but not in the header) and return its xpath.
 
 i_turn_editing_mode_off ()
 Turns editing mode off.
 
 i_turn_editing_mode_on ()
 Turns editing mode on.
 
 page_administration_does_not_exist ()
 Check that the page administration menu does not exist on the page.
 
 page_administration_exists ()
 Check that the page administration menu exists on the page.
 
 select_from_administration_menu ($nodelist)
 Finds a page edit cog and select an item from it.
 
 select_on_administration_page ($nodelist)
 Finds and clicks a link on the admin page (site administration or course administration)
 
 should_not_exist_in_current_page_administration ($element, $selectortype)
 Check that current page administration does not contains an element.
 
 toggle_page_administration_menu ($menuxpath=null)
 Toggles administration menu.
 

Detailed Description

Function Documentation

◆ find_header_administration_menu()

find_header_administration_menu ( $mustexist = false)
protected

Locates the administration menu in the <header> element and returns its xpath.

Parameters
bool$mustexistif specified throws an exception if menu is not found
Return values
null|string

◆ find_page_administration_menu()

find_page_administration_menu ( $mustexist = false)
protected

Locate the administration menu on the page (but not in the header) and return its xpath.

Exceptions
ElementNotFoundException
Parameters
bool$mustexistIf true, throws an exception if menu is not found
Return values
null|string

◆ page_administration_does_not_exist()

page_administration_does_not_exist ( )

Check that the page administration menu does not exist on the page.

This confirms the absence of the menu, which unauthorised users should not have access to. @Given /^I should not see the page administration menu$/

Exceptions
ExpectationException
Return values
void

◆ page_administration_exists()

page_administration_exists ( )

Check that the page administration menu exists on the page.

This confirms the existence of the menu, which authorised users should have access to. @Given /^I should see the page administration menu$/

Exceptions
ExpectationException
Return values
void

◆ select_from_administration_menu()

select_from_administration_menu ( $nodelist)
protected

Finds a page edit cog and select an item from it.

If the page edit cog is in the page header and the item is not found there, click "More..." link and find the item on the course/frontpage administration page

Parameters
array$nodelist
Exceptions
ElementNotFoundException

◆ select_on_administration_page()

select_on_administration_page ( $nodelist)
protected

Finds and clicks a link on the admin page (site administration or course administration)

Parameters
array$nodelist

◆ should_not_exist_in_current_page_administration()

should_not_exist_in_current_page_administration ( $element,
$selectortype )

Check that current page administration does not contains an element.

Exceptions
ExpectationException
Parameters
string$elementThe locator of the specified selector. This may be a path, for example "Subscription mode > Forced subscription"
string$selectortypeThe selector type (link or text)
Return values
void

◆ toggle_page_administration_menu()

toggle_page_administration_menu ( $menuxpath = null)
protected

Toggles administration menu.

Parameters
string$menuxpath(optional) xpath to the page administration menu if already known