MDL-69588 core: Activity navigation fixes

This commit is contained in:
Jun Pataleta 2021-08-26 09:58:15 +08:00
parent 34f3d43397
commit b36bdd18d8
3 changed files with 6 additions and 8 deletions

View file

@ -113,7 +113,7 @@ class behat_mod_forum extends behat_base {
*/
public function i_reply_post_from_forum_using_an_inpage_reply_with($postsubject, $forumname, TableNode $table) {
// Navigate to forum.
$this->execute("behat_navigation::go_to_breadcrumb_location", $this->escape($forumname));
$this->execute('behat_navigation::i_am_on_page_instance', [$this->escape($forumname), 'forum activity']);
$this->execute('behat_general::click_link', $this->escape($postsubject));
$this->execute('behat_general::click_link', get_string('reply', 'forum'));
@ -132,7 +132,7 @@ class behat_mod_forum extends behat_base {
*/
public function i_navigate_to_post_in_forum($postsubject, $forumname) {
// Navigate to forum discussion.
$this->execute("behat_navigation::go_to_breadcrumb_location", $this->escape($forumname));
$this->execute('behat_navigation::i_am_on_page_instance', [$this->escape($forumname), 'forum activity']);
$this->execute('behat_general::click_link', $this->escape($postsubject));
}
@ -493,7 +493,7 @@ class behat_mod_forum extends behat_base {
*/
protected function add_new_discussion_inline($forumname, TableNode $table, $buttonstr) {
// Navigate to forum.
$this->execute("behat_navigation::go_to_breadcrumb_location", $this->escape($forumname));
$this->execute('behat_navigation::i_am_on_page_instance', [$this->escape($forumname), 'forum activity']);
$this->execute('behat_general::click_link', $buttonstr);
$this->fill_new_discussion_form($table);
}