mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-82373 question: Make window larger in behat tests
I would suggest that this is a stop gap to solve some failing tests. We really need to look at whether we can improve the usability of this interface on smaller displays as a longer-term fix.
This commit is contained in:
parent
70204fd73c
commit
7fdb644bd1
@ -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,
|
||||
]);
|
||||
|
@ -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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user