Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
behat_mod_quiz Class Reference

Steps definitions related to mod_quiz. More...

Inheritance diagram for behat_mod_quiz:
behat_question_base behat_base behat_session_interface behat_theme_classic_behat_mod_quiz

Public Member Functions

 getSession ($name=null)
 Returns the Mink session. More...
 
 i_add_question_to_the_quiz_with ($questiontype, $quizname, TableNode $questiondata)
 Adds a question to the existing quiz with filling the form. More...
 
 i_click_on_shuffle_for_section ($heading)
 Set Shuffle for shuffling questions within sections. More...
 
 i_click_on_the_page_break_icon_after_question ($addorremoves, $questionname)
 Click the add or remove page-break icon after a particular question. More...
 
 i_delete_question_by_clicking_the_delete_icon ($questionname)
 Delete a question on the Edit quiz page by first clicking on the Delete icon, then clicking one of the "After ..." links. More...
 
 i_move_question_after_item_by_clicking_the_move_icon ($questionname, $target)
 Move a question on the Edit quiz page by first clicking on the Move icon, then clicking one of the "After ..." links. More...
 
 i_move_question_after_item_by_dragging ($questionname, $target)
 Move a question on the Edit quiz page by dragging a given question on top of another item. More...
 
 i_open_the_add_to_quiz_menu_for ($pageorlast)
 Open the add menu on a given page, or at the end of the Edit quiz page. More...
 
 i_set_the_max_mark_for_quiz_question ($questionname, $newmark)
 Set the max mark for a question on the Edit quiz page. More...
 
 i_set_the_section_heading_for ($sectionname, $sectionheading)
 Set the section heading for a given section on the Edit quiz page. More...
 
 i_should_not_see_on_quiz_page ($questionname, $pagenumber)
 Check whether a particular question is not on a particular page of the quiz on the Edit quiz page. More...
 
 i_should_see_before_on_the_edit_quiz_page ($firstquestionname, $secondquestionname)
 Check whether one question comes before another on the Edit quiz page. More...
 
 i_should_see_on_quiz_page ($questionname, $pagenumber)
 Check whether a particular question is on a particular page of the quiz on the Edit quiz page. More...
 
 i_should_see_question_in_section_in_the_quiz_navigation ($questionnumber, $sectionheading)
 Check that a given question comes after a given section heading in the quiz navigation block. More...
 
 quiz_contains_the_following_questions ($quizname, TableNode $data)
 Put the specified questions on the specified pages of a given quiz. More...
 
 quiz_contains_the_following_sections ($quizname, TableNode $data)
 Put the specified section headings to start at specified pages of a given quiz. More...
 
 should_have_number_on_the_edit_quiz_page ($questionname, $number)
 Check the number displayed alongside a question on the Edit quiz page. More...
 
 shuffle_for_section_should_be ($heading, $value)
 Check the shuffle checkbox for a particular section. More...
 
 the_page_break_icon_after_question_should_exist ($addorremoves, $questionname)
 Assert the add or remove page-break icon after a particular question exists. More...
 
 the_page_break_icon_after_question_should_not_exist ($addorremoves, $questionname)
 Assert the add or remove page-break icon after a particular question does not exist. More...
 
 the_page_break_link_after_question_should_contain ($addorremoves, $questionname, $paramdata)
 Check the add or remove page-break link after a particular question contains the given parameters in its url. More...
 
 user_has_attempted_with_responses ($username, $quizname, TableNode $attemptinfo)
 Attempt a quiz. More...
 
 user_has_checked_answers_in_their_attempt_at_quiz ($username, $quizname, TableNode $attemptinfo)
 Submit answers to questions an existing quiz attempt, with a simulated click on the 'Check' button. More...
 
 user_has_finished_an_attempt_at_quiz ($username, $quizname)
 Finish an existing quiz attempt. More...
 
 user_has_input_answers_in_their_attempt_at_quiz ($username, $quizname, TableNode $attemptinfo)
 Input answers to particular questions an existing quiz attempt, without simulating a click of the 'Check' button, if any. More...
 
 user_has_started_an_attempt_at_quiz ($username, $quizname)
 Start a quiz attempt without answers. More...
 
 user_has_started_an_attempt_at_quiz_with_details ($username, $quizname, TableNode $attemptinfo)
 Start a quiz attempt without answers. More...
 

Public Attributes

const EXTENDED_TIMEOUT = 10
 And extended timeout for specific cases. More...
 
const PAGE_READY_JS
 The JS code to check that the page is ready. More...
 
const REDUCED_TIMEOUT = 2
 Small timeout. More...
 
const TIMEOUT = 6
 The timeout for each Behat step (load page, wait for an element to load...). More...
 

Protected Member Functions

 extract_forced_randomisation_from_attempt_info (TableNode $attemptinfo)
 Helper used by user_has_attempted_with_responses, user_has_started_an_attempt_at_quiz_with_details, etc. More...
 
 extract_responses_from_attempt_info (TableNode $attemptinfo)
 Helper used by user_has_attempted_with_responses, user_has_checked_answers_in_their_attempt_at_quiz, user_has_input_answers_in_their_attempt_at_quiz, etc. More...
 
 finish_adding_question ($questiontypename, TableNode $questiondata)
 Helper used by i_add_a_question_filling_the_form_with() and to finish creating(). More...
 
 get_cm_by_quiz_name (string $name)
 Get a quiz cmid from the quiz name. More...
 
 get_quiz_by_name (string $name)
 Get a quiz by name. More...
 
 get_xpath_for_shuffle_checkbox ($heading)
 Return the xpath for shuffle checkbox in section heading. More...
 
 get_xpath_page_break_icon_after_question ($addorremoves, $questionname)
 Get the xpath for a partcular add/remove page-break icon. More...
 
 resolve_page_instance_url (string $type, string $identifier)
 Convert page names to URLs for steps like 'When I am on the "[identifier]" "[page type]" page'. More...
 
 resolve_page_url (string $page)
 Convert page names to URLs for steps like 'When I am on the "[page name]" page'. More...
 

Detailed Description

Steps definitions related to mod_quiz.

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

Member Function Documentation

◆ extract_forced_randomisation_from_attempt_info()

behat_mod_quiz::extract_forced_randomisation_from_attempt_info ( TableNode  $attemptinfo)
protected

Helper used by user_has_attempted_with_responses, user_has_started_an_attempt_at_quiz_with_details, etc.

Parameters
TableNode$attemptinfodata table from the Behat step
Return values
arraywith two elements, $forcedrandomquestions, $forcedvariants, that can be passed to $quizgenerator->create_attempt.

◆ extract_responses_from_attempt_info()

behat_mod_quiz::extract_responses_from_attempt_info ( TableNode  $attemptinfo)
protected

Helper used by user_has_attempted_with_responses, user_has_checked_answers_in_their_attempt_at_quiz, user_has_input_answers_in_their_attempt_at_quiz, etc.

Parameters
TableNode$attemptinfodata table from the Behat step
Return values
arrayof responses that can be passed to $quizgenerator->submit_responses.

◆ finish_adding_question()

behat_question_base::finish_adding_question (   $questiontypename,
TableNode  $questiondata 
)
protectedinherited

Helper used by i_add_a_question_filling_the_form_with() and to finish creating().

Parameters
string$questiontypenameThe question type name
TableNode$questiondataThe data to fill the question type form

◆ get_cm_by_quiz_name()

behat_mod_quiz::get_cm_by_quiz_name ( string  $name)
protected

Get a quiz cmid from the quiz name.

Parameters
string$namequiz name.
Return values
stdClasscm from get_coursemodule_from_instance.

◆ get_quiz_by_name()

behat_mod_quiz::get_quiz_by_name ( string  $name)
protected

Get a quiz by name.

Parameters
string$namequiz name.
Return values
stdClassthe corresponding DB row.

◆ get_xpath_for_shuffle_checkbox()

behat_mod_quiz::get_xpath_for_shuffle_checkbox (   $heading)
protected

Return the xpath for shuffle checkbox in section heading.

Parameters
string$heading
Return values
string

◆ get_xpath_page_break_icon_after_question()

behat_mod_quiz::get_xpath_page_break_icon_after_question (   $addorremoves,
  $questionname 
)
protected

Get the xpath for a partcular add/remove page-break icon.

Parameters
string$addorremoves'Add' or 'Remove'.
string$questionnamethe name of the question before the icon.
Return values
stringthe requried xpath.

◆ 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_add_question_to_the_quiz_with()

behat_mod_quiz::i_add_question_to_the_quiz_with (   $questiontype,
  $quizname,
TableNode  $questiondata 
)

Adds a question to the existing quiz with filling the form.

The form for creating a question should be on one page.

@When /^I add a "(?P<question_type_string>(?:[^"]|::")*)" question to the "(?P<quiz_name_string>(?:[^"]|")*)" quiz with:$/

Parameters
string$questiontype
string$quizname
TableNode$questiondatawith data for filling the add question form

Reimplemented in behat_theme_classic_behat_mod_quiz.

◆ i_click_on_shuffle_for_section()

behat_mod_quiz::i_click_on_shuffle_for_section (   $heading)

Set Shuffle for shuffling questions within sections.

Parameters
string$headingthe heading of the section to change shuffle for.

@Given /^I click on shuffle for section "([^"]*)" on the quiz edit page$/

◆ i_click_on_the_page_break_icon_after_question()

behat_mod_quiz::i_click_on_the_page_break_icon_after_question (   $addorremoves,
  $questionname 
)

Click the add or remove page-break icon after a particular question.

@When /^I click on the "(Add|Remove)" page break icon after question "(?P<question_name>(?:[^"]|::")*)"$/

Parameters
string$addorremoves'Add' or 'Remove'.
string$questionnamethe name of the question before the icon to click.

◆ i_delete_question_by_clicking_the_delete_icon()

behat_mod_quiz::i_delete_question_by_clicking_the_delete_icon (   $questionname)

Delete a question on the Edit quiz page by first clicking on the Delete icon, then clicking one of the "After ..." links.

@When /^I delete "(?P<question_name>(?:[^"]|::")*)" in the quiz by clicking the delete icon$/

Parameters
string$questionnamethe name of the question we are looking for.
Return values
arrayof steps.

◆ i_move_question_after_item_by_clicking_the_move_icon()

behat_mod_quiz::i_move_question_after_item_by_clicking_the_move_icon (   $questionname,
  $target 
)

Move a question on the Edit quiz page by first clicking on the Move icon, then clicking one of the "After ..." links.

@When /^I move "(?P<question_name>(?:[^"]|::")*)" to "(?P<target>(?:[^"]|")*)" in the quiz by clicking the move icon$/ @param string $questionname the name of the question we are looking for. @param string $target the target place to move to. One of the links in the pop-up like "After Page 1" or "After Question N".

◆ i_move_question_after_item_by_dragging()

behat_mod_quiz::i_move_question_after_item_by_dragging (   $questionname,
  $target 
)

Move a question on the Edit quiz page by dragging a given question on top of another item.

@When /^I move "(?P<question_name>(?:[^"]|::")*)" to "(?P<target>(?:[^"]|")*)" in the quiz by dragging$/ @param string $questionname the name of the question we are looking for. @param string $target the target place to move to. Ether a question name, or "Page N"

◆ i_open_the_add_to_quiz_menu_for()

behat_mod_quiz::i_open_the_add_to_quiz_menu_for (   $pageorlast)

Open the add menu on a given page, or at the end of the Edit quiz page.

@Given /^I open the "(?P<page_n_or_last_string>(?:[^"]|::")*)" add to quiz menu$/

Parameters
string$pageorlasteither "Page n" or "last".

◆ i_set_the_max_mark_for_quiz_question()

behat_mod_quiz::i_set_the_max_mark_for_quiz_question (   $questionname,
  $newmark 
)

Set the max mark for a question on the Edit quiz page.

@When /^I set the max mark for question "(?P<question_name_string>(?:[^"]|::")*)" to "(?P<new_mark_string>(?:[^"]|")*)"$/

Parameters
string$questionnamethe name of the question to set the max mark for.
string$newmarkthe mark to set

◆ i_set_the_section_heading_for()

behat_mod_quiz::i_set_the_section_heading_for (   $sectionname,
  $sectionheading 
)

Set the section heading for a given section on the Edit quiz page.

@When /^I change quiz section heading "(?P<section_name_string>(?:[^"]|::")*)" to "(?P<new_section_heading_string>(?:[^"]|")*)"$/

Parameters
string$sectionnamethe heading to change.
string$sectionheadingthe new heading to set.

◆ i_should_not_see_on_quiz_page()

behat_mod_quiz::i_should_not_see_on_quiz_page (   $questionname,
  $pagenumber 
)

Check whether a particular question is not on a particular page of the quiz on the Edit quiz page.

@Given /^I should not see "(?P<question_name>(?:[^"]|::")*)" on quiz page "(?P<page_number>\d+)"$/

Parameters
string$questionnamethe name of the question we are looking for.
number$pagenumberthe page it should be found on.

◆ i_should_see_before_on_the_edit_quiz_page()

behat_mod_quiz::i_should_see_before_on_the_edit_quiz_page (   $firstquestionname,
  $secondquestionname 
)

Check whether one question comes before another on the Edit quiz page.

The two questions must be on the same page. @Given /^I should see "(?P<first_q_name>(?:[^"]|::")*)" before "(?P<second_q_name>(?:[^"]|")*)" on the edit quiz page$/

Parameters
string$firstquestionnamethe name of the question that should come first in order.
string$secondquestionnamethe name of the question that should come immediately after it in order.

◆ i_should_see_on_quiz_page()

behat_mod_quiz::i_should_see_on_quiz_page (   $questionname,
  $pagenumber 
)

Check whether a particular question is on a particular page of the quiz on the Edit quiz page.

@Given /^I should see "(?P<question_name>(?:[^"]|::")*)" on quiz page "(?P<page_number>\d+)"$/

Parameters
string$questionnamethe name of the question we are looking for.
number$pagenumberthe page it should be found on.

◆ i_should_see_question_in_section_in_the_quiz_navigation()

behat_mod_quiz::i_should_see_question_in_section_in_the_quiz_navigation (   $questionnumber,
  $sectionheading 
)

Check that a given question comes after a given section heading in the quiz navigation block.

@Then /^I should see question "(?P<questionnumber>::d+)" in section "(?P<section_heading_string>(?:[^"]|")*)" in the quiz navigation$/

Parameters
int$questionnumberthe number of the question to check.
string$sectionheadingwhich section heading it should appear after.

◆ quiz_contains_the_following_questions()

behat_mod_quiz::quiz_contains_the_following_questions (   $quizname,
TableNode  $data 
)

Put the specified questions on the specified pages of a given quiz.

The first row should be column names: | question | page | maxmark | requireprevious | The first two of those are required. The others are optional.

question needs to uniquely match a question name. page is a page number. Must start at 1, and on each following row should be the same as the previous, or one more. maxmark What the question is marked out of. Defaults to question.defaultmark. requireprevious The question can only be attempted after the previous one was completed.

Then there should be a number of rows of data, one for each question you want to add.

For backwards-compatibility reasons, specifying the column names is optional (but strongly encouraged). If not specified, the columns are asseumed to be | question | page | maxmark |.

Parameters
string$quiznamethe name of the quiz to add questions to.
TableNode$datainformation about the questions to add.

@Given /^quiz "([^"]*)" contains the following questions:$/

◆ quiz_contains_the_following_sections()

behat_mod_quiz::quiz_contains_the_following_sections (   $quizname,
TableNode  $data 
)

Put the specified section headings to start at specified pages of a given quiz.

The first row should be column names: | heading | firstslot | shufflequestions |

heading is the section heading text firstslot is the slot number where the section starts shuffle whether this section is shuffled (0 or 1)

Then there should be a number of rows of data, one for each section you want to add.

Parameters
string$quiznamethe name of the quiz to add sections to.
TableNode$datainformation about the sections to add.

@Given /^quiz "([^"]*)" contains the following sections:$/

◆ resolve_page_instance_url()

behat_mod_quiz::resolve_page_instance_url ( string  $type,
string  $identifier 
)
protected

Convert page names to URLs for steps like 'When I am on the "[identifier]" "[page type]" page'.

Recognised page names are: | pagetype | name meaning | description | | View | Quiz name | The quiz info page (view.php) | | Edit | Quiz name | The edit quiz page (edit.php) | | Group overrides | Quiz name | The manage group overrides page | | User overrides | Quiz name | The manage user overrides page | | Grades report | Quiz name | The overview report for a quiz | | Responses report | Quiz name | The responses report for a quiz | | Statistics report | Quiz name | The statistics report for a quiz | | Attempt review | Quiz name > username > [Attempt] attempt no | Review page for a given attempt (review.php) |

Parameters
string$typeidentifies which type of page this is, e.g. 'Attempt review'.
string$identifieridentifies the particular page, e.g. 'Test quiz > student > Attempt 1'.
Return values
moodle_urlthe corresponding URL.
Exceptions
Exceptionwith a meaningful error message if the specified page cannot be found.

◆ resolve_page_url()

behat_mod_quiz::resolve_page_url ( string  $page)
protected

Convert page names to URLs for steps like 'When I am on the "[page name]" page'.

Recognised page names are: | None so far! | |

Parameters
string$pagename of the page, with the component name removed e.g. 'Admin notification'.
Return values
moodle_urlthe corresponding URL.
Exceptions
Exceptionwith a meaningful error message if the specified page cannot be found.

◆ should_have_number_on_the_edit_quiz_page()

behat_mod_quiz::should_have_number_on_the_edit_quiz_page (   $questionname,
  $number 
)

Check the number displayed alongside a question on the Edit quiz page.

@Given /^"(?P<question_name>(?:[^"]|::")*)" should have number "(?P<number>(?:[^"]|")*)" on the edit quiz page$/

Parameters
string$questionnamethe name of the question we are looking for.
number$numberthe number (or 'i') that should be displayed beside that question.

◆ shuffle_for_section_should_be()

behat_mod_quiz::shuffle_for_section_should_be (   $heading,
  $value 
)

Check the shuffle checkbox for a particular section.

Parameters
string$headingthe heading of the section to check shuffle for
int$valuewhether the shuffle checkbox should be on or off.

@Given /^shuffle for section "([^"]*)" should be "(On|Off)" on the quiz edit page$/

◆ the_page_break_icon_after_question_should_exist()

behat_mod_quiz::the_page_break_icon_after_question_should_exist (   $addorremoves,
  $questionname 
)

Assert the add or remove page-break icon after a particular question exists.

@When /^the "(Add|Remove)" page break icon after question "(?P<question_name>(?:[^"]|::")*)" should exist$/

Parameters
string$addorremoves'Add' or 'Remove'.
string$questionnamethe name of the question before the icon to click.
Return values
arrayof steps.

◆ the_page_break_icon_after_question_should_not_exist()

behat_mod_quiz::the_page_break_icon_after_question_should_not_exist (   $addorremoves,
  $questionname 
)

Assert the add or remove page-break icon after a particular question does not exist.

@When /^the "(Add|Remove)" page break icon after question "(?P<question_name>(?:[^"]|::")*)" should not exist$/

Parameters
string$addorremoves'Add' or 'Remove'.
string$questionnamethe name of the question before the icon to click.
Return values
arrayof steps.

◆ the_page_break_link_after_question_should_contain()

behat_mod_quiz::the_page_break_link_after_question_should_contain (   $addorremoves,
  $questionname,
  $paramdata 
)

Check the add or remove page-break link after a particular question contains the given parameters in its url.

@When /^the "(Add|Remove)" page break link after question "(?P<question_name>(?:[^"]|::")*) should contain:"$/

Parameters
string$addorremoves'Add' or 'Remove'.
string$questionnamethe name of the question before the icon to click.
TableNode$paramdatawith data for checking the page break url
Return values
arrayof steps.

◆ user_has_attempted_with_responses()

behat_mod_quiz::user_has_attempted_with_responses (   $username,
  $quizname,
TableNode  $attemptinfo 
)

Attempt a quiz.

The first row should be column names: | slot | actualquestion | variant | response | The first two of those are required. The others are optional.

slot The slot actualquestion This column is optional, and is only needed if the quiz contains random questions. If so, this will let you control which actual question gets picked when this slot is 'randomised' at the start of the attempt. If you don't specify, then one will be picked at random (which might make the response meaningless). Give the question name. variant This column is similar, and also options. It is only needed if the question that ends up in this slot returns something greater than 1 for $question->get_num_variants(). Like with actualquestion, if you specify a value here it is used the fix the 'random' choice made when the quiz is started. response The response that was submitted. How this is interpreted depends on the question type. It gets passed to core_question_generator::get_simulated_post_data_for_question_attempt() and therefore to the un_summarise_response method of the question to decode.

Then there should be a number of rows of data, one for each question you want to add. There is no need to supply answers to all questions. If so, other qusetions will be left unanswered.

Parameters
string$usernamethe username of the user that will attempt.
string$quiznamethe name of the quiz the user will attempt.
TableNode$attemptinfoinformation about the questions to add, as above. @Given /^user "([^"]*)" has attempted "([^"]*)" with responses:$/

◆ user_has_checked_answers_in_their_attempt_at_quiz()

behat_mod_quiz::user_has_checked_answers_in_their_attempt_at_quiz (   $username,
  $quizname,
TableNode  $attemptinfo 
)

Submit answers to questions an existing quiz attempt, with a simulated click on the 'Check' button.

This step should only be used with question behaviours that have have a 'Check' button. Those include Interactive with multiple tires, Immediate feedback and Immediate feedback with CBM.

Then there should be a number of rows of data, with two columns slot and response, as for user_has_attempted_with_responses() above. There is no need to supply answers to all questions. If so, other questions will be left unanswered.

Parameters
string$usernamethe username of the user that will attempt.
string$quiznamethe name of the quiz the user will attempt.
TableNode$attemptinfoinformation about the questions to add, as above.
Exceptions
Behat::Mink::Exception::ExpectationException@Given /^user "([^"]*)" has checked answers in their attempt at quiz "([^"]*)":$/

◆ user_has_finished_an_attempt_at_quiz()

behat_mod_quiz::user_has_finished_an_attempt_at_quiz (   $username,
  $quizname 
)

Finish an existing quiz attempt.

Parameters
string$usernamethe username of the user that will attempt.
string$quiznamethe name of the quiz the user will attempt. @Given /^user "([^"]*)" has finished an attempt at quiz "([^"]*)"$/

◆ user_has_input_answers_in_their_attempt_at_quiz()

behat_mod_quiz::user_has_input_answers_in_their_attempt_at_quiz (   $username,
  $quizname,
TableNode  $attemptinfo 
)

Input answers to particular questions an existing quiz attempt, without simulating a click of the 'Check' button, if any.

Then there should be a number of rows of data, with two columns slot and response, as for user_has_attempted_with_responses() above. There is no need to supply answers to all questions. If so, other questions will be left unanswered.

Parameters
string$usernamethe username of the user that will attempt.
string$quiznamethe name of the quiz the user will attempt.
TableNode$attemptinfoinformation about the questions to add, as above.
Exceptions
Behat::Mink::Exception::ExpectationException@Given /^user "([^"]*)" has input answers in their attempt at quiz "([^"]*)":$/

◆ user_has_started_an_attempt_at_quiz()

behat_mod_quiz::user_has_started_an_attempt_at_quiz (   $username,
  $quizname 
)

Start a quiz attempt without answers.

Then there should be a number of rows of data, one for each question you want to add. There is no need to supply answers to all questions. If so, other qusetions will be left unanswered.

Parameters
string$usernamethe username of the user that will attempt.
string$quiznamethe name of the quiz the user will attempt. @Given /^user "([^"]*)" has started an attempt at quiz "([^"]*)"$/

◆ user_has_started_an_attempt_at_quiz_with_details()

behat_mod_quiz::user_has_started_an_attempt_at_quiz_with_details (   $username,
  $quizname,
TableNode  $attemptinfo 
)

Start a quiz attempt without answers.

The supplied data table for have a row for each slot where you want to force either which random question was chose, or which random variant was used, as for user_has_attempted_with_responses() above.

Parameters
string$usernamethe username of the user that will attempt.
string$quiznamethe name of the quiz the user will attempt.
TableNode$attemptinfoinformation about the questions to add, as above. @Given /^user "([^"]*)" has started an attempt at quiz "([^"]*)" randomised as follows:$/

Member Data Documentation

◆ EXTENDED_TIMEOUT

const behat_session_interface::EXTENDED_TIMEOUT = 10
inherited

And extended timeout for specific cases.

Deprecated:
since Moodle 3.7 MDL-64979 - please use get_extended_timeout() instead
Todo:
MDL-64982 This will be deleted in Moodle 3.11
See also
behat_base::get_extended_timeout()

◆ 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.

◆ REDUCED_TIMEOUT

const behat_session_interface::REDUCED_TIMEOUT = 2
inherited

Small timeout.

A reduced timeout for cases where self::TIMEOUT is too much and a simple $this->getSession()->getPage()->find() could not be enough.

Deprecated:
since Moodle 3.7 MDL-64979 - please use get_reduced_timeout() instead
Todo:
MDL-64982 This will be deleted in Moodle 3.11
See also
behat_base::get_reduced_timeout()

◆ TIMEOUT

const behat_session_interface::TIMEOUT = 6
inherited

The timeout for each Behat step (load page, wait for an element to load...).

Deprecated:
since Moodle 3.7 MDL-64979 - please use get_timeout() instead
Todo:
MDL-64982 This will be deleted in Moodle 3.11
See also
behat_base::get_timeout()

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