mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-55355 mod_feedback: Change show chart data step to avoid errors
This commit is contained in:
parent
14cc6df5f9
commit
472ac2d390
1 changed files with 3 additions and 2 deletions
|
@ -138,14 +138,15 @@ class behat_mod_feedback extends behat_base {
|
||||||
|
|
||||||
$feedbackxpath = "//th[contains(normalize-space(string(.)), \"" . $feedbackname . "\")]/ancestor::table/" .
|
$feedbackxpath = "//th[contains(normalize-space(string(.)), \"" . $feedbackname . "\")]/ancestor::table/" .
|
||||||
"following-sibling::div[contains(concat(' ', normalize-space(@class), ' '), ' chart-area ')][1]" .
|
"following-sibling::div[contains(concat(' ', normalize-space(@class), ' '), ' chart-area ')][1]" .
|
||||||
"//p[contains(concat(' ', normalize-space(@class), ' '), ' chart-table-expand ')]";
|
"//p[contains(concat(' ', normalize-space(@class), ' '), ' chart-table-expand ') and ".
|
||||||
|
"//a[contains(normalize-space(string(.)), '".get_string('showchartdata')."')]]";
|
||||||
|
|
||||||
$charttabledataxpath = $feedbackxpath .
|
$charttabledataxpath = $feedbackxpath .
|
||||||
"/following-sibling::div[contains(concat(' ', normalize-space(@class), ' '), ' chart-table-data ')][1]";
|
"/following-sibling::div[contains(concat(' ', normalize-space(@class), ' '), ' chart-table-data ')][1]";
|
||||||
|
|
||||||
// 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->isVisible()) {
|
if ($node && !$node->isVisible()) {
|
||||||
$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