mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-53810 behat: Zoom in Rubric before filling form.
div is now overflow, selenium can't get element in viewport, zoom in before entering the value
This commit is contained in:
parent
a8abd53a32
commit
c5fe77ffe4
@ -281,6 +281,11 @@ class behat_gradingform_rubric extends behat_base {
|
||||
$stepusage = '"I grade by filling the rubric with:" step needs you to provide a table where each row is a criterion' .
|
||||
' and each criterion has 3 different values: | Criterion name | Number of points | Remark text |';
|
||||
|
||||
// If running Javascript, ensure we zoom in before filling the grades.
|
||||
if ($this->running_javascript()) {
|
||||
$this->execute('behat_general::click_link', get_string('togglezoom', 'mod_assign'));
|
||||
}
|
||||
|
||||
// First element -> name, second -> points, third -> Remark.
|
||||
foreach ($criteria as $name => $criterion) {
|
||||
|
||||
@ -326,6 +331,11 @@ class behat_gradingform_rubric extends behat_base {
|
||||
$textarea = $this->get_node_in_container('css_element', 'textarea', 'table_row', $name);
|
||||
$this->execute('behat_forms::i_set_the_field_to', array($textarea->getAttribute('name'), $criterion[1]));
|
||||
}
|
||||
|
||||
// If running Javascript, then ensure to close zoomed rubric.
|
||||
if ($this->running_javascript()) {
|
||||
$this->execute('behat_general::click_link', get_string('togglezoom', 'mod_assign'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user