MDL-42625 behat: Fixing failures

* Expanding fieldsets before setting the course format
* Ensure editors are loaded moved to expand_all_fieldsets
* Return true rather than false when JS is disabled and
  non-allowed steps should continue without throwing an
  exception.
This commit is contained in:
David Monllao
2013-12-12 13:42:56 +08:00
parent 26f9407892
commit fff8b97ebc
5 changed files with 9 additions and 25 deletions
+3 -3
View File
@@ -69,9 +69,6 @@ class behat_forms extends behat_base {
*/
public function i_fill_the_moodle_form_with(TableNode $data) {
// We ensure that all the editors are loaded and we can interact with them.
$this->ensure_editors_are_loaded();
// Expand all fields in case we have.
$this->expand_all_fields();
@@ -110,6 +107,9 @@ class behat_forms extends behat_base {
*/
protected function expand_all_fields() {
// We ensure that all the editors are loaded and we can interact with them.
$this->ensure_editors_are_loaded();
// behat_base::find() throws an exception if there are no elements, we should not fail a test because of this.
try {