MDL-64673 core_message: Modifying group_messate_tab xpath
authorAmaia Anabitarte <amaia@moodle.com>
Thu, 25 Apr 2019 08:07:53 +0000 (10:07 +0200)
committerAmaia Anabitarte <amaia@moodle.com>
Thu, 25 Apr 2019 08:09:19 +0000 (10:09 +0200)
lib/behat/classes/partial_named_selector.php

index 26fa673..6d73f4a 100644 (file)
@@ -168,7 +168,7 @@ XPATH
         //div[@data-region='empty-message-container' and not(contains(@class, 'hidden')) and contains(., %locator%)]
 XPATH
     , 'group_message_tab' => <<<XPATH
-        .//*[@data-region='message-drawer']//button[@data-toggle='collapse']//*[text()[contains(., %locator%)]]/..
+        .//*[@data-region='message-drawer']//button[@data-toggle='collapse' and contains(string(), %locator%)]
 XPATH
         , 'icon' => <<<XPATH
 .//*[contains(concat(' ', normalize-space(@class), ' '), ' icon ') and ( contains(normalize-space(@title), %locator%))]