MDL-35925 filepicker - Fixing behat tests

This commit is contained in:
Jason Fowler
2013-09-03 15:48:08 +08:00
committed by Dan Poltawski
parent 75b0c09bd1
commit 3a9a74b259
+5 -2
View File
@@ -60,10 +60,13 @@ class behat_filepicker extends behat_files {
// Setting the folder name in the modal window.
$exception = new ExpectationException('The dialog to enter the folder name does not appear', $this->getSession());
$dialoginput = $this->find('css', '.fp-mkdir-dlg-text input');
$dialoginput = $this->find('css', '.fp-mkdir-dlg-text input', $exception);
$dialoginput->setValue($foldername);
$this->getSession()->getPage()->pressButton(get_string('makeafolder'));
$exception = new ExpectationException('The button for the create folder dialog can not be located', $this->getSession());
$dialognode = $this->find('css', '.moodle-dialogue-focused');
$buttonnode = $this->find('css', '.fp-dlg-butcreate', $exception, $dialognode);
$buttonnode->click();
// Wait until the process finished and modal windows are hidden.
$this->wait_until_return_to_form();