Merge branch 'MDL-64665-master' of git://github.com/cescobedo/moodle
authorDavid Monllaó <davidm@moodle.com>
Wed, 24 Apr 2019 18:00:03 +0000 (20:00 +0200)
committerDavid Monllaó <davidm@moodle.com>
Wed, 24 Apr 2019 18:00:03 +0000 (20:00 +0200)
1  2 
message/tests/behat/behat_message.php

@@@ -82,18 -82,11 +82,18 @@@ class behat_message extends behat_base 
  
          $this->execute('behat_general::i_click_on_in_the',
              array(
 -                "//button[@data-action='view-contact-profile']
 -                [contains(normalize-space(.), '" . $this->escape($userfullname) . "')]",
 -                'xpath_element',
 -                ".messages-header",
 -                "css_element",
 +                "//a[@data-action='view-contact']",
 +                "xpath_element",
 +                "//*[@data-region='message-drawer']//div[@data-region='header-container']",
 +                "xpath_element",
 +            )
 +        );
 +        $this->execute('behat_general::i_click_on_in_the',
 +            array(
 +                $this->escape($userfullname),
 +                "link",
 +                "//*[@data-region='message-drawer']//*[@data-region='view-contact']",
 +                "xpath_element",
              )
          );
  
              $this->escape($convname).'")]';
          $this->execute('behat_general::i_click_on', array($xpath, 'xpath_element'));
      }
+     /**
+      * Open the settings preferences.
+      *
+      * @Given /^I open messaging settings preferences$/
+      */
+     public function i_open_messaging_settings_preferences() {
+         $this->execute('behat_general::wait_until_the_page_is_ready');
+         $this->execute('behat_general::i_click_on',
+             array(
+                 '//*[@data-region="message-drawer"]//a[@data-route="view-settings"]',
+                 'xpath_element',
+                 '',
+                 '',
+             )
+         );
+     }
  }