[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Source view] [Print] [Project Stats]
Steps definitions related to mod_quiz.
Copyright: | 2014 Marina Glancy |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 299 lines (15 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 2 files question/tests/behat/behat_question_base.php lib/behat/behat_base.php |
behat_mod_quiz:: (16 methods):
i_add_question_to_the_quiz_with()
i_set_the_max_mark_for_quiz_question()
i_open_the_add_to_quiz_menu_for()
i_follow_in_the_open_menu()
i_should_see_on_quiz_page()
i_should_not_see_on_quiz_page()
i_should_see_before_on_the_edit_quiz_page()
should_have_number_on_the_edit_quiz_page()
get_xpath_page_break_icon_after_question()
i_click_on_the_page_break_icon_after_question()
the_page_break_icon_after_question_should_exist()
the_page_break_icon_after_question_should_not_exist()
the_page_break_link_after_question_should_contain()
i_move_question_after_item_by_clicking_the_move_icon()
i_move_question_after_item_by_dragging()
i_delete_question_by_clicking_the_delete_icon()
Class: behat_mod_quiz - X-Ref
Steps definitions related to mod_quiz.i_add_question_to_the_quiz_with($questiontype, $quizname, TableNode $questiondata) X-Ref |
Adds a question to the existing quiz with filling the form. The form for creating a question should be on one page. param: string $questiontype param: string $quizname param: TableNode $questiondata with data for filling the add question form |
i_set_the_max_mark_for_quiz_question($questionname, $newmark) X-Ref |
Set the max mark for a question on the Edit quiz page. param: string $questionname the name of the question to set the max mark for. param: string $newmark the mark to set |
i_open_the_add_to_quiz_menu_for($pageorlast) X-Ref |
Open the add menu on a given page, or at the end of the Edit quiz page. param: string $pageorlast either "Page n" or "last". |
i_follow_in_the_open_menu($linkstring) X-Ref |
Click on a given link in the moodle-actionmenu that is currently open. param: string $linkstring the text (or id, etc.) of the link to click. return: array of steps. |
i_should_see_on_quiz_page($questionname, $pagenumber) X-Ref |
Check whether a particular question is on a particular page of the quiz on the Edit quiz page. param: string $questionname the name of the question we are looking for. param: number $pagenumber the page it should be found on. return: array of steps. |
i_should_not_see_on_quiz_page($questionname, $pagenumber) X-Ref |
Check whether a particular question is not on a particular page of the quiz on the Edit quiz page. param: string $questionname the name of the question we are looking for. param: number $pagenumber the page it should be found on. return: array of steps. |
i_should_see_before_on_the_edit_quiz_page($firstquestionname, $secondquestionname) X-Ref |
Check whether one question comes before another on the Edit quiz page. The two questions must be on the same page. param: string $firstquestionname the name of the question that should come first in order. param: string $secondquestionname the name of the question that should come immediately after it in order. return: array of steps. |
should_have_number_on_the_edit_quiz_page($questionname, $number) X-Ref |
Check the number displayed alongside a question on the Edit quiz page. param: string $questionname the name of the question we are looking for. param: number $number the number (or 'i') that should be displayed beside that question. return: array of steps. |
get_xpath_page_break_icon_after_question($addorremoves, $questionname) X-Ref |
Get the xpath for a partcular add/remove page-break icon. param: string $addorremoves 'Add' or 'Remove'. param: string $questionname the name of the question before the icon. return: string the requried xpath. |
i_click_on_the_page_break_icon_after_question($addorremoves, $questionname) X-Ref |
Click the add or remove page-break icon after a particular question. param: string $addorremoves 'Add' or 'Remove'. param: string $questionname the name of the question before the icon to click. return: array of steps. |
the_page_break_icon_after_question_should_exist($addorremoves, $questionname) X-Ref |
Assert the add or remove page-break icon after a particular question exists. param: string $addorremoves 'Add' or 'Remove'. param: string $questionname the name of the question before the icon to click. return: array of steps. |
the_page_break_icon_after_question_should_not_exist($addorremoves, $questionname) X-Ref |
Assert the add or remove page-break icon after a particular question does not exist. param: string $addorremoves 'Add' or 'Remove'. param: string $questionname the name of the question before the icon to click. return: array of steps. |
the_page_break_link_after_question_should_contain($addorremoves, $questionname, $paramdata) X-Ref |
Check the add or remove page-break link after a particular question contains the given parameters in its url. param: string $addorremoves 'Add' or 'Remove'. param: string $questionname the name of the question before the icon to click. param: TableNode $paramdata with data for checking the page break url return: array of steps. |
i_move_question_after_item_by_clicking_the_move_icon($questionname, $target) X-Ref |
Move a question on the Edit quiz page by first clicking on the Move icon, then clicking one of the "After ..." links. 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 return: array of steps. |
i_move_question_after_item_by_dragging($questionname, $target) X-Ref |
Move a question on the Edit quiz page by dragging a given question on top of another item. 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" return: array of steps. |
i_delete_question_by_clicking_the_delete_icon($questionname) X-Ref |
Delete a question on the Edit quiz page by first clicking on the Delete icon, then clicking one of the "After ..." links. param: string $questionname the name of the question we are looking for. return: array of steps. |
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |