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:
@@ -165,9 +165,7 @@ class behat_mod_feedback extends behat_base {
|
||||
// If chart data is not visible then expand.
|
||||
$node = $this->get_selected_node("xpath_element", $charttabledataxpath);
|
||||
if ($node) {
|
||||
if (!$node->isVisible()) {
|
||||
// Focus on node, before checking if it's visible.
|
||||
$node->focus();
|
||||
if ($node->getAttribute('aria-expanded') === 'false') {
|
||||
$this->execute('behat_general::i_click_on_in_the', array(
|
||||
get_string('showchartdata'),
|
||||
'link',
|
||||
|
||||
Reference in New Issue
Block a user