MDL-76398 reportbuilder: use improved action menu steps in Behat.

Improved steps for using actions menus were added in 232ebac3, so
make use of them here for consistency/reliability.
This commit is contained in:
Paul Holden
2022-12-02 09:55:55 +00:00
parent d4681259bc
commit 76fde950c1
2 changed files with 8 additions and 5 deletions
@@ -109,7 +109,11 @@ class behat_reportbuilder extends behat_base {
* @param string $row
*/
public function i_press_action_in_the_report_row(string $action, string $row): void {
$this->execute('behat_action_menu::i_open_the_action_menu_in', [$this->escape($row), 'table_row']);
$this->execute('behat_action_menu::i_choose_in_the_open_action_menu', [$this->escape($action)]);
$this->execute('behat_action_menu::i_choose_in_the_named_menu_in_container', [
$this->escape($action),
get_string('actions', 'core_reportbuilder'),
$this->escape($row),
'table_row',
]);
}
}
@@ -96,10 +96,9 @@ Feature: Manage custom reports
And I click on "Close 'Manager report' editor" "button"
# Manager can edit their own report, but not those of other users.
And I set the field "Edit report name" in the "Manager report" "table_row" to "Manager report (renamed)"
And I open the action menu in "Manager report (renamed)" "table_row"
Then "Edit report content" "link" should be visible
Then the "Edit report content" item should exist in the "Actions" action menu of the "Manager report (renamed)" "table_row"
And "Edit report name" "link" should not exist in the "My report" "table_row"
And ".dropdown-toggle" "css_element" should not exist in the "My report" "table_row"
And "Actions" "actionmenu" should not exist in the "My report" "table_row"
Scenario: Rename custom report
Given the following "core_reportbuilder > Reports" exist: