MDL-35925 filepicker - Fixing behat tests

This commit is contained in:
Jason Fowler 2013-09-03 14:12:51 +08:00 committed by Dan Poltawski
parent a28f43e8c7
commit 199c9375d0

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();