From a7d476c35fd49bd83fb4e7c38c96a990e3fe77c7 Mon Sep 17 00:00:00 2001 From: Mihail Geshoski Date: Mon, 12 Jun 2023 13:06:13 +0800 Subject: [PATCH] MDL-77685 core_grades: Fix row_column_of_table_should_contain() Backport from MDL-77632. --- lib/tests/behat/behat_general.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tests/behat/behat_general.php b/lib/tests/behat/behat_general.php index a2617263532..82e54cf5764 100644 --- a/lib/tests/behat/behat_general.php +++ b/lib/tests/behat/behat_general.php @@ -1411,8 +1411,8 @@ EOF; // Check if value exists in specific row/column. // Get row xpath. // GoutteDriver uses DomCrawler\Crawler and it is making XPath relative to the current context, so use descendant. - $rowxpath = $tablexpath."/tbody/tr[descendant::th[normalize-space(.)=" . $rowliteral . - "] | descendant::td[normalize-space(.)=" . $rowliteral . "]]"; + $rowxpath = $tablexpath . "/tbody/tr[descendant::*[@class='rowtitle'][normalize-space(.)=" . $rowliteral . "] | " . " + descendant::th[normalize-space(.)=" . $rowliteral . "] | descendant::td[normalize-space(.)=" . $rowliteral . "]]"; $columnvaluexpath = $rowxpath . $columnpositionxpath . "[contains(normalize-space(.)," . $valueliteral . ")]";