mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-66979 mod_data: Improve behat chart data step
Charts data visibility is more reliable when checked via the aria-expanded attribute. The isVisible attribute can cause some failures under Firefox.
This commit is contained in:
parent
4e00a821cf
commit
deaab14bf9
1 changed files with 1 additions and 3 deletions
|
@ -165,9 +165,7 @@ class behat_mod_feedback extends behat_base {
|
||||||
// If chart data is not visible then expand.
|
// If chart data is not visible then expand.
|
||||||
$node = $this->get_selected_node("xpath_element", $charttabledataxpath);
|
$node = $this->get_selected_node("xpath_element", $charttabledataxpath);
|
||||||
if ($node) {
|
if ($node) {
|
||||||
if (!$node->isVisible()) {
|
if ($node->getAttribute('aria-expanded') === 'false') {
|
||||||
// Focus on node, before checking if it's visible.
|
|
||||||
$node->focus();
|
|
||||||
$this->execute('behat_general::i_click_on_in_the', array(
|
$this->execute('behat_general::i_click_on_in_the', array(
|
||||||
get_string('showchartdata'),
|
get_string('showchartdata'),
|
||||||
'link',
|
'link',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue