|
Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
Public Member Functions | |
| getSession ($name=null) | |
| Returns the Mink session. More... | |
| i_action_the_question ($action, $questionname) | |
| Activates a particular action on a particular question in the question bank UI. More... | |
| i_add_a_question_filling_the_form_with ($questiontypename, TableNode $questiondata) | |
| Creates a question in the current course questions bank with the provided data. More... | |
| the_state_of_question_is_shown_as ($questiondescription, $state) | |
| Checks the state of the specified question. 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 | |
| finish_adding_question ($questiontypename, TableNode $questiondata) | |
Helper used by i_add_a_question_filling_the_form_with() and to finish creating(). More... | |
|
protectedinherited |
Helper used by i_add_a_question_filling_the_form_with() and to finish creating().
| string | $questiontypename | The question type name |
| TableNode | $questiondata | The data to fill the question type form |
|
inherited |
Returns the Mink session.
| string | null | $name | name of the session OR active session will be used |
| Behat::Mink::Session |
Implemented in behat_form_field.
| behat_question::i_action_the_question | ( | $action, | |
| $questionname | |||
| ) |
Activates a particular action on a particular question in the question bank UI.
@When I choose :action action for :questionname in the question bank
| string | $action | the label for the action you want to activate. |
| string | $questionname | the question name. |
| behat_question::i_add_a_question_filling_the_form_with | ( | $questiontypename, | |
| TableNode | $questiondata | ||
| ) |
Creates a question in the current course questions bank with the provided data.
This step can only be used when creating question types composed by a single form.
@Given /^I add a "(?P<question_type_name_string>(?:[^"]|::")*)" question filling the form with:$/
| string | $questiontypename | The question type name |
| TableNode | $questiondata | The data to fill the question type form. |
| behat_question::the_state_of_question_is_shown_as | ( | $questiondescription, | |
| $state | |||
| ) |
Checks the state of the specified question.
@Then /^the state of "(?P<question_description_string>(?:[^"]|::")*)" question is shown as "(?P<state_string>(?:[^"]|")*)"$/
| ExpectationException | |
| ElementNotFoundException |
| string | $questiondescription | |
| string | $state |
|
inherited |
And extended timeout for specific cases.
|
inherited |
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.
|
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.
|
inherited |
The timeout for each Behat step (load page, wait for an element to load...).