mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-46641 behat: Delete activity step does not work without actions menu open
This commit is contained in:
parent
d29fb4ac65
commit
84a1e50a9f
@ -697,12 +697,12 @@ class behat_course extends behat_base {
|
||||
* @return Given[]
|
||||
*/
|
||||
public function i_delete_activity($activityname) {
|
||||
|
||||
$deletestring = get_string('delete');
|
||||
|
||||
$steps = array(
|
||||
new Given('I click on "' . $this->escape($deletestring) . '" "link" in the "' . $this->escape($activityname) . '" activity')
|
||||
);
|
||||
$steps = array();
|
||||
$activity = $this->escape($activityname);
|
||||
if ($this->running_javascript()) {
|
||||
$steps[] = new Given('I open "' . $activity . '" actions menu');
|
||||
}
|
||||
$steps[] = new Given('I click on "' . get_string('delete') . '" "link" in the "' . $activity . '" activity');
|
||||
|
||||
// JS enabled.
|
||||
// Not using chain steps here because the exceptions catcher have problems detecting
|
||||
|
@ -67,7 +67,6 @@ Feature: Course activity controls works as expected
|
||||
And I open "Test forum name 1" actions menu
|
||||
And I click on "Hide" "link" in the "Test forum name 1" activity
|
||||
And "#section-2" "css_element" <should_see_other_sections> exist
|
||||
And I open "Test forum name 1" actions menu
|
||||
And I delete "Test forum name 1" activity
|
||||
And I should not see "Test forum name 1" in the "#region-main" "css_element"
|
||||
And I duplicate "Test forum name 2" activity editing the new copy with:
|
||||
|
Loading…
x
Reference in New Issue
Block a user