mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-46641 behat: Delete activity step does not work without actions menu open
This commit is contained in:
parent
d29fb4ac65
commit
84a1e50a9f
2 changed files with 6 additions and 7 deletions
|
@ -697,12 +697,12 @@ class behat_course extends behat_base {
|
||||||
* @return Given[]
|
* @return Given[]
|
||||||
*/
|
*/
|
||||||
public function i_delete_activity($activityname) {
|
public function i_delete_activity($activityname) {
|
||||||
|
$steps = array();
|
||||||
$deletestring = get_string('delete');
|
$activity = $this->escape($activityname);
|
||||||
|
if ($this->running_javascript()) {
|
||||||
$steps = array(
|
$steps[] = new Given('I open "' . $activity . '" actions menu');
|
||||||
new Given('I click on "' . $this->escape($deletestring) . '" "link" in the "' . $this->escape($activityname) . '" activity')
|
}
|
||||||
);
|
$steps[] = new Given('I click on "' . get_string('delete') . '" "link" in the "' . $activity . '" activity');
|
||||||
|
|
||||||
// JS enabled.
|
// JS enabled.
|
||||||
// Not using chain steps here because the exceptions catcher have problems detecting
|
// 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 open "Test forum name 1" actions menu
|
||||||
And I click on "Hide" "link" in the "Test forum name 1" activity
|
And I click on "Hide" "link" in the "Test forum name 1" activity
|
||||||
And "#section-2" "css_element" <should_see_other_sections> exist
|
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 delete "Test forum name 1" activity
|
||||||
And I should not see "Test forum name 1" in the "#region-main" "css_element"
|
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:
|
And I duplicate "Test forum name 2" activity editing the new copy with:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue