diff --git a/mod/quiz/tests/behat/behat_mod_quiz.php b/mod/quiz/tests/behat/behat_mod_quiz.php index 1fd8a2c0513..b7c02f28168 100644 --- a/mod/quiz/tests/behat/behat_mod_quiz.php +++ b/mod/quiz/tests/behat/behat_mod_quiz.php @@ -149,6 +149,9 @@ class behat_mod_quiz extends behat_question_base { return new moodle_url('/mod/quiz/review.php', ['attempt' => $attempt->id]); case 'question bank': + // The question bank does not handle fields at the edge of the viewport well. + // Increase the size to avoid this. + $this->execute('behat_general::i_change_window_size_to', ['window', 'large']); return new moodle_url('/question/edit.php', [ 'cmid' => $this->get_cm_by_quiz_name($identifier)->id, ]); diff --git a/question/tests/behat/behat_core_question.php b/question/tests/behat/behat_core_question.php index 03be434dcef..d2476c12da7 100644 --- a/question/tests/behat/behat_core_question.php +++ b/question/tests/behat/behat_core_question.php @@ -68,8 +68,12 @@ class behat_core_question extends behat_question_base { protected function resolve_page_instance_url(string $type, string $identifier): moodle_url { switch (strtolower($type)) { case 'course question bank': - return new moodle_url('/question/edit.php', - ['courseid' => $this->get_course_id($identifier)]); + // The question bank does not handle fields at the edge of the viewport well. + // Increase the size to avoid this. + $this->execute('behat_general::i_change_window_size_to', ['window', 'large']); + return new moodle_url('/question/edit.php', [ + 'courseid' => $this->get_course_id($identifier), + ]); case 'course question categories': return new moodle_url('/question/bank/managecategories/category.php',