mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Merge branch 'MDL-42625_master' of git://github.com/dmonllao/moodle
This commit is contained in:
commit
ebc77165a4
51 changed files with 991 additions and 335 deletions
|
@ -65,9 +65,6 @@ class behat_block_comments extends behat_base {
|
|||
|
||||
$this->find_link(get_string('savecomment'))->click();
|
||||
|
||||
// Wait for the AJAX request.
|
||||
$this->getSession()->wait(4 * 1000, false);
|
||||
|
||||
} else {
|
||||
|
||||
$commentstextarea = $this->find('css', '.block_comments form textarea', $exception);
|
||||
|
@ -103,7 +100,7 @@ class behat_block_comments extends behat_base {
|
|||
$deleteicon = $this->find('css', '.comment-delete a img', $deleteexception, $commentnode);
|
||||
$deleteicon->click();
|
||||
|
||||
// Wait for the AJAX request.
|
||||
// Wait for the animation to finish, in theory is just 1 sec, adding 4 just in case.
|
||||
$this->getSession()->wait(4 * 1000, false);
|
||||
}
|
||||
|
||||
|
|
|
@ -58,14 +58,11 @@ Feature: View my courses in navigation block
|
|||
And I should see "cat3" in the "Navigation" "block"
|
||||
And I should not see "cat2" in the "Navigation" "block"
|
||||
And I expand "cat3" node
|
||||
And I wait "2" seconds
|
||||
And I should see "cat31" in the "Navigation" "block"
|
||||
And I should see "cat33" in the "Navigation" "block"
|
||||
And I should not see "cat32" in the "Navigation" "block"
|
||||
And I expand "cat31" node
|
||||
And I wait "2" seconds
|
||||
And I should see "c31" in the "Navigation" "block"
|
||||
And I expand "cat33" node
|
||||
And I wait "2" seconds
|
||||
And I should see "c331" in the "Navigation" "block"
|
||||
And I should not see "c332" in the "Navigation" "block"
|
||||
|
|
|
@ -58,6 +58,20 @@ class behat_blocks extends behat_base {
|
|||
return $steps;
|
||||
}
|
||||
|
||||
/**
|
||||
* Docks a block. Editing mode should be previously enabled.
|
||||
*
|
||||
* @Given /^I dock "(?P<block_name_string>(?:[^"]|\\")*)" block$/
|
||||
* @param string $blockname
|
||||
* @return Given
|
||||
*/
|
||||
public function i_dock_block($blockname) {
|
||||
|
||||
// Looking for both title and alt.
|
||||
$xpath = "//input[@type='image'][@title='" . get_string('dockblock', 'block', $blockname) . "' or @alt='" . get_string('addtodock', 'block') . "']";
|
||||
return new Given('I click on " ' . $xpath . '" "xpath_element" in the "' . $this->escape($blockname) . '" "block"');
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a block's actions menu if it is not already opened.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue