mirrored from git://git.moodle.org/moodle.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-43738 behat: Normalization and major refactoring of getters and s…
…etters Every single step that sets or gets a value from a field has been updated to follow the same behaviour both when using it through a single step or through generic steps like "I fill the moodle form with:", to resume all the changes: - Created a behat_form_group to re-guess the field type and act appropriately setting and getting it's value - Normalize all getters and setters to use behat_form_field children - Complete behat_form_checkbox to trigger the appropiate JS event needed to perform some JS scripts that are listening - Refactor MDL-43713 multi-select changes and remove the two new steps introduced there as that behaviour can be managed from the generic getter - Added a new step definition to check a capability permission as we changed the way radio buttons gets it's value
- Loading branch information
David Monllao
committed
Feb 27, 2014
1 parent
becb7e5
commit c3f1e95
Showing
8 changed files
with
380 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
// This file is part of Moodle - http://moodle.org/ | ||
// | ||
// Moodle is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// Moodle is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* Generic group field class. | ||
* | ||
* @package core_form | ||
* @category test | ||
* @copyright 2014 David Monllaó | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
// NOTE: no MOODLE_INTERNAL test here, this file may be required by behat before including /config.php. | ||
|
||
require_once(__DIR__ . '/behat_form_field.php'); | ||
|
||
/** | ||
* Class to re-guess the field type as grouped fields can have different field types. | ||
* | ||
* When filling fields in a fgroup field element we don't know what kind | ||
* of field are we dealing with, so we should re-guess it. | ||
* | ||
* @package core_form | ||
* @category test | ||
* @copyright 2014 David Monllaó | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
class behat_form_group extends behat_form_field {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.