MDL-48382 quiz behat: make add question step more robust.
This commit is contained in:
@@ -51,12 +51,13 @@ class behat_mod_quiz extends behat_question_base {
|
||||
public function i_add_question_to_the_quiz_with($questiontype, $quizname, TableNode $questiondata) {
|
||||
$quizname = $this->escape($quizname);
|
||||
$editquiz = $this->escape(get_string('editquiz', 'quiz'));
|
||||
$quizadmin = $this->escape(get_string('pluginadministration', 'quiz'));
|
||||
$addaquestion = $this->escape(get_string('addaquestion', 'quiz'));
|
||||
$menuxpath = "//div[contains(@class, ' page-add-actions ')][last()]//a[contains(@class, ' textmenu')]";
|
||||
$itemxpath = "//div[contains(@class, ' page-add-actions ')][last()]//a[contains(@class, ' addquestion ')]";
|
||||
return array_merge(array(
|
||||
new Given("I follow \"$quizname\""),
|
||||
new Given("I follow \"$editquiz\""),
|
||||
new Given("I navigate to \"$editquiz\" node in \"$quizadmin\""),
|
||||
new Given("I click on \"$menuxpath\" \"xpath_element\""),
|
||||
new Given("I click on \"$itemxpath\" \"xpath_element\""),
|
||||
), $this->finish_adding_question($questiontype, $questiondata));
|
||||
|
||||
Reference in New Issue
Block a user