This commit is contained in:
Andrew Nicols
2022-12-11 20:20:02 +08:00
3 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -147,7 +147,7 @@ XPATH
descendant::*[
contains(concat(' ', normalize-space(@class), ' '), ' dropdown-toggle ')
and
contains(normalize-space(.), %locator%)
(contains(normalize-space(.), %locator%) or descendant::*[%titleMatch%])
]
]
XPATH
@@ -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: