Moodle APIs 4.1
Moodle 4.1.9+ (Build: 20240402)
|
Behat course-related steps definitions. More...
Classes | |
class | behat_course |
Functions | |
actions_menu_should_be_open ($activityname) | |
Checks that the specified activity's action menu is open. | |
actions_menu_should_have_item ($activityname, $menuitem) | |
Checks that the specified activity's action menu contains an item. | |
actions_menu_should_not_have_item ($activityname, $menuitem) | |
Checks that the specified activity's action menu does not contains an item. | |
activity_date_in_activity_should_contain_text (string $activityname, string $text) | |
Checks the presence of the given text in the activity's displayed dates. | |
activity_dates_information_in_activity_should_exist (string $activityname) | |
Checks the presence of activity dates information in the activity information output component. | |
activity_dates_information_in_activity_should_not_exist (string $activityname) | |
Checks the absence of activity dates information in the activity information output component. | |
activity_should_be_available_but_hidden_from_course_page ($activityname) | |
Checks that the specified activity is visible. | |
activity_should_be_hidden ($activityname) | |
Checks that the specified activity is hidden. | |
activity_should_be_visible ($activityname) | |
Checks that the specified activity is visible. | |
category_actions_menu_should_have_item ($name, $menuitem) | |
Checks that the specified category actions menu contains an item. | |
category_actions_menu_should_not_have_item ($name, $menuitem) | |
Checks that the specified category actions menu does not contain an item. | |
category_in_management_listing_should_be_dimmed ($idnumber) | |
Checks that a category within the management interface is dimmed. | |
category_in_management_listing_should_be_visible ($idnumber) | |
Checks that a category within the management interface is visible. | |
course_in_management_listing_should_be_dimmed ($idnumber) | |
Checks that a course within the management interface is dimmed. | |
course_in_management_listing_should_be_visible ($idnumber) | |
Checks that a course within the management interface is visible. | |
get_activity_element ($element, $selectortype, $activityname) | |
Clicks on the specified element inside the activity container. | |
get_activity_name ($activitynode) | |
Gets the activity instance name from the activity node. | |
get_activity_node ($activityname) | |
Returns the DOM node of the activity from . | |
get_course_format () | |
Gets the current course format. | |
get_management_category_listing_node_by_idnumber ($idnumber) | |
Returns the category node from within the listing on the management page. | |
get_management_category_listing_node_by_name ($name, $link=false) | |
Returns a category node from within the management interface. | |
get_management_course_listing_node_by_idnumber ($idnumber) | |
Returns the course node from within the listing on the management page. | |
get_management_course_listing_node_by_name ($name, $link=false) | |
Returns a course node from within the management interface. | |
get_section_activities ($sectionxpath) | |
Gets the section's activites DOM nodes. | |
hide_section_link_exists ($sectionnumber) | |
Returns the hide section icon link if it exists or throws exception. | |
i_add_to_course_section (string $activity, string $coursefullname, string $sectionnum) | |
Open a add activity form page. | |
i_add_to_course_section_and_i_fill_the_form_with ($activity, $coursefullname, $section, TableNode $data) | |
Adds the selected activity/resource filling the form data with the specified field/value pairs. | |
i_add_to_section_using_the_activity_chooser ($activityname, $sectionnum) | |
Opens the activity chooser and opens the activity/resource link form page. | |
i_change_activity_name_to ($activityname, $newactivityname) | |
Edits the activity name through the edit activity; this step only works with Javascript enabled. | |
i_click_on_action_for_item_in_management_category_listing ($action, $name) | |
Locates a category in the course category management interface and then triggers an action for it. | |
i_click_on_action_for_item_in_management_course_listing ($action, $name) | |
Locates a course in the course category management interface and then triggers an action for it. | |
i_click_on_category_in_the_management_category_listing ($name) | |
Clicks on a category in the management interface. | |
i_click_on_category_in_the_management_interface ($name) | |
Clicks on a category in the management interface. | |
i_click_on_course_in_the_management_interface ($name) | |
Clicks on a course in the management interface. | |
i_click_on_in_the_activity ($element, $selectortype, $activityname) | |
Clicks on the specified element of the activity. | |
i_click_to_expand_category_in_the_management_interface ($idnumber) | |
Click to expand a category revealing its sub categories within the management UI. | |
i_click_to_move_category_by_one ($idnumber, $direction) | |
Moves a category displayed in the management interface up or down one place. | |
i_click_to_move_course_by_one ($idnumber, $direction) | |
Moves a course displayed in the management interface up or down one place. | |
i_close_actions_menu ($activityname) | |
Closes an activity actions menu if it is not already closed. | |
i_delete_activity ($activityname) | |
Deletes the activity or resource specified by it's name. | |
i_delete_section ($sectionnumber) | |
Deletes course section. | |
i_duplicate_activity ($activityname) | |
Duplicates the activity or resource specified by it's name. | |
i_duplicate_activity_editing_the_new_copy_with ($activityname, TableNode $data) | |
Duplicates the activity or resource and modifies the new activity with the provided data. | |
i_edit_the_section ($sectionnumber) | |
Go to editing section page for specified section number. | |
i_edit_the_section_and_i_fill_the_form_with ($sectionnumber, TableNode $data) | |
Edit specified section and fill the form data with the specified field/value pairs. | |
i_hide_section ($sectionnumber) | |
Hides the specified visible section. | |
i_indent_left_activity ($activityname) | |
Indents to the left the activity or resource specified by it's name. | |
i_indent_right_activity ($activityname) | |
Indents to the right the activity or resource specified by it's name. | |
i_move_activity_to_section ($activityname, $sectionnumber) | |
Moves the specified activity to the first slot of a section. | |
i_move_activity_to_section_yui ($activityname, $sectionnumber) | |
Moves the specified activity to the first slot of a section using the YUI course format. | |
i_move_category_to_top_level_in_the_management_interface ($name) | |
Move selected categories to top level in the management interface. | |
i_move_down_section ($sectionnumber) | |
Moves down the specified section, this step only works with Javascript disabled. | |
i_move_up_section ($sectionnumber) | |
Moves up the specified section, this step only works with Javascript disabled. | |
i_navigate_to_course_participants () | |
Go to the course participants. | |
i_open_actions_menu ($activityname) | |
Opens an activity actions menu if it is not already opened. | |
i_open_section_edit_menu ($sectionnumber) | |
Opens a section edit menu if it is not already opened. | |
i_open_the_action_menu_for_item_in_management_category_listing ($name) | |
Locates a category in the course category management interface and then opens action menu for it. | |
i_open_the_activity_chooser () | |
Open the activity chooser in a course. | |
i_select_category_in_the_management_interface ($name) | |
Clicks on a category checkbox in the management interface, if not checked. | |
i_select_course_in_the_management_interface ($name) | |
Clicks course checkbox in the management interface, if not checked. | |
i_should_not_see_category_as_subcategory_of_in_the_management_interface ($subcatidnumber, $catidnumber) | |
Checks that a category is not a subcategory of specific category. | |
i_should_not_see_teacher_after ($fteacher, $pteacher) | |
Check that one teacher oes not appears after another in the course contacts. | |
i_should_see_category_as_subcategory_of_in_the_management_interface ($subcatidnumber, $catidnumber) | |
Checks that a category is a subcategory of specific category. | |
i_should_see_category_listing_before ($preceedingcategory, $followingcategory) | |
Check that one category appears before another in the course category management listings. | |
i_should_see_course_listing_before ($preceedingcourse, $followingcourse) | |
Check that one course appears before another in the course category management listings. | |
i_should_see_teacher_before ($pteacher, $fteacher) | |
Check that one teacher appears before another in the course contacts. | |
i_should_see_the_courses_management_page ($mode) | |
Checks that we are on the course management page that we expect to be on and that no course has been selected. | |
i_should_see_the_courses_management_page_with_a_course_selected ($mode) | |
Checks that we are on the course management page that we expect to be on and that a course has been selected. | |
i_show_section ($sectionnumber) | |
Shows the specified hidden section. | |
i_toggle_category_children_visibility_in_frontpage ($categoryname) | |
Clicks to expand or collapse a category displayed on the frontpage. | |
i_toggle_visibility_of_category_in_management_listing ($idnumber) | |
Toggles the visibility of a category in the management UI. | |
i_toggle_visibility_of_course_in_management_listing ($idnumber) | |
Toggles the visibility of a course in the management UI. | |
i_turn_section_highlighting_off ($sectionnumber) | |
Turns course section highlighting off. | |
i_turn_section_highlighting_on ($sectionnumber) | |
Turns course section highlighting on. | |
i_unselect_category_in_the_management_interface ($name) | |
Clicks on a category checkbox in the management interface, if checked. | |
i_unselect_course_in_the_management_interface ($name) | |
Clicks course checkbox in the management interface, if checked. | |
i_wait_until_section_is_available ($sectionnumber) | |
Waits until the section is available to interact with it. | |
is_course_editor () | |
Returns whether the user can edit the course contents or not. | |
is_editing_on () | |
Returns whether the user can edit the course contents and the editing mode is on. | |
label_should_be_hidden ($activityname) | |
Checks that the specified label is hidden from students. | |
listing_is_highlighted ($self, $selector) | |
Used by spin to determine the callback has been highlighted. | |
section_activities_should_be_hidden ($sectionnumber) | |
Checks that all actiities in the specified section are hidden. | |
section_exists ($sectionnumber) | |
Checks if the course section exists. | |
section_should_be_hidden ($sectionnumber) | |
Checks that the specified section is visible. | |
section_should_be_highlighted ($sectionnumber) | |
Checks if the specified course section hightlighting is turned on. | |
section_should_be_visible ($sectionnumber) | |
Checks that the specified section is visible. | |
section_should_not_be_highlighted ($sectionnumber) | |
Checks if the specified course section highlighting is turned off. | |
show_section_link_exists ($sectionnumber) | |
Returns the show section icon or throws an exception. | |
user_clicks_on_management_listing_action ($listingtype, $listingnode, $action) | |
Finds the node to use for a management listitem action and clicks it. | |
user_moves_listing_by_one ($listingtype, $listingnode, $direction, $highlight=true) | |
Moves a course or category listing within the management interface up or down by one. | |
Behat course-related steps definitions.