Permalink
Browse files

Merge branch 'MDL-43738_master' of git://github.com/dmonllao/moodle

  • Loading branch information...
damyon committed Mar 4, 2014
2 parents 1723cc2 + 8aff0ee commit 267c4b4292f5632f4489626f46a086b4fee02716
Showing with 1,520 additions and 635 deletions.
  1. +1 −1 admin/tests/behat/display_short_names.feature
  2. +4 −4 admin/tests/behat/filter_users.feature
  3. +1 −1 admin/tests/behat/upload_users.feature
  4. +2 −0 admin/tool/behat/lang/en/tool_behat.php
  5. +27 −0 admin/tool/behat/renderer.php
  6. +1 −1 admin/tool/behat/tests/behat/basic_actions.feature
  7. +6 −6 admin/tool/behat/tests/behat/data_generators.feature
  8. +12 −12 admin/tool/behat/tests/behat/edit_permissions.feature
  9. +173 −0 admin/tool/behat/tests/behat/get_and_set_fields.feature
  10. +2 −2 admin/tool/behat/tests/behat/list_steps.feature
  11. +7 −7 admin/tool/behat/tests/behat/manipulate_forms.feature
  12. +17 −17 admin/tool/behat/tests/behat/nasty_strings.feature
  13. +4 −2 admin/tool/behat/upgrade.txt
  14. +1 −1 admin/tool/uploadcourse/tests/behat/create.feature
  15. +2 −2 admin/tool/uploadcourse/tests/behat/update.feature
  16. +2 −2 auth/tests/behat/behat_auth.php
  17. +4 −4 auth/tests/behat/login.feature
  18. +2 −2 backup/util/ui/tests/behat/duplicate_activities.feature
  19. +11 −11 backup/util/ui/tests/behat/restore_moodle2_courses.feature
  20. +5 −5 badges/tests/behat/add_badge.feature
  21. +26 −26 badges/tests/behat/award_badge.feature
  22. +1 −1 blocks/tests/behat/behat_blocks.php
  23. +2 −2 blocks/tests/behat/configure_block_throughout_site.feature
  24. +5 −5 blocks/tests/behat/manage_blocks.feature
  25. +3 −3 blocks/tests/behat/return_block_original_state.feature
  26. +5 −5 blog/tests/behat/comment.feature
  27. +1 −1 calendar/tests/behat/behat_calendar.php
  28. +1 −1 calendar/tests/behat/calendar.feature
  29. +5 −5 cohort/tests/behat/add_cohort.feature
  30. +1 −1 cohort/tests/behat/behat_cohort.php
  31. +1 −1 completion/tests/behat/enable_manual_complete_mark.feature
  32. +2 −2 completion/tests/behat/restrict_activity_by_date.feature
  33. +3 −3 completion/tests/behat/restrict_activity_by_grade.feature
  34. +3 −3 completion/tests/behat/restrict_section_availability.feature
  35. +1 −1 course/tests/behat/activities_group_icons.feature
  36. +5 −5 course/tests/behat/add_activities.feature
  37. +8 −8 course/tests/behat/behat_course.php
  38. +7 −7 course/tests/behat/category_management.feature
  39. +4 −4 course/tests/behat/category_resort.feature
  40. +2 −2 course/tests/behat/course_category_management_listing.feature
  41. +1 −1 course/tests/behat/course_controls.feature
  42. +1 −1 course/tests/behat/create_delete_course.feature
  43. +4 −4 course/tests/behat/edit_settings.feature
  44. +3 −3 course/tests/behat/force_group_mode.feature
  45. +4 −4 course/tests/behat/max_number_sections.feature
  46. +3 −3 course/tests/behat/move_activities.feature
  47. +2 −2 course/tests/behat/move_sections.feature
  48. +2 −2 course/tests/behat/rename_roles.feature
  49. +3 −3 enrol/guest/tests/behat/guest_access.feature
  50. +3 −3 enrol/self/tests/behat/self_enrolment.feature
  51. +2 −2 enrol/tests/behat/behat_enrol.php
  52. +1 −1 grade/grading/form/rubric/tests/behat/behat_gradingform_rubric.php
  53. +8 −8 grade/grading/form/rubric/tests/behat/edit_rubric.feature
  54. +3 −3 grade/grading/form/rubric/tests/behat/publish_rubric_templates.feature
  55. +1 −1 grade/grading/form/rubric/tests/behat/reuse_own_rubrics.feature
  56. +2 −2 grade/grading/tests/behat/behat_grading.php
  57. +1 −1 grade/tests/behat/behat_grade.php
  58. +8 −8 grade/tests/behat/grade_view.feature
  59. +3 −3 group/tests/behat/auto_creation.feature
  60. +8 −8 group/tests/behat/create_groups.feature
  61. +8 −8 group/tests/behat/delete_groups.feature
  62. +20 −20 group/tests/behat/groups_import.feature
  63. +9 −9 group/tests/behat/id_uniqueness.feature
  64. +20 −20 group/tests/behat/update_groups.feature
  65. +64 −2 lib/behat/behat_field_manager.php
  66. +45 −5 lib/behat/form_field/behat_form_checkbox.php
  67. +3 −6 lib/behat/form_field/behat_form_date_selector.php
  68. +4 −7 lib/behat/form_field/behat_form_date_time_selector.php
  69. +2 −2 lib/behat/form_field/behat_form_editor.php
  70. +45 −61 lib/behat/form_field/behat_form_field.php
  71. +43 −0 lib/behat/form_field/behat_form_group.php
  72. +2 −1 lib/behat/form_field/behat_form_modvisible.php
  73. +37 −2 lib/behat/form_field/behat_form_radio.php
  74. +203 −27 lib/behat/form_field/behat_form_select.php
  75. +2 −1 lib/behat/form_field/behat_form_selectyesno.php
  76. +69 −0 lib/behat/form_field/behat_form_text.php
  77. +39 −0 lib/behat/form_field/behat_form_textarea.php
  78. +3 −7 lib/tests/behat/behat_data_generators.php
  79. +166 −1 lib/tests/behat/behat_deprecated.php
  80. +142 −109 lib/tests/behat/behat_forms.php
  81. +42 −1 lib/tests/behat/behat_permissions.php
  82. +3 −2 message/tests/behat/behat_message.php
  83. +3 −3 message/tests/behat/block_users.feature
  84. +1 −1 message/tests/behat/display_history.feature
  85. +1 −1 message/tests/behat/manage_contacts.feature
  86. +3 −3 message/tests/behat/message_participants.feature
  87. +1 −1 message/tests/behat/search_history.feature
  88. +2 −2 mod/assign/tests/behat/allow_another_attempt.feature
  89. +1 −1 mod/assign/tests/behat/comment_inline.feature
  90. +3 −3 mod/assign/tests/behat/edit_previous_feedback.feature
  91. +3 −3 mod/assign/tests/behat/group_submission.feature
  92. +2 −2 mod/assign/tests/behat/online_submissions.feature
  93. +4 −3 mod/assign/tests/behat/prevent_submission_changes.feature
  94. +6 −6 mod/assign/tests/behat/quickgrading.feature
  95. +1 −1 mod/choice/tests/behat/behat_mod_choice.php
  96. +2 −2 mod/choice/tests/behat/change_response.feature
  97. +1 −1 mod/choice/tests/behat/publish_results.feature
  98. +2 −2 mod/forum/tests/behat/behat_mod_forum.php
  99. +1 −1 mod/forum/tests/behat/completion_condition_number_discussions.feature
  100. +8 −8 mod/forum/tests/behat/discussion_display.feature
  101. +2 −2 mod/forum/tests/behat/edit_post_student.feature
  102. +1 −1 mod/forum/tests/behat/edit_post_teacher.feature
  103. +2 −2 mod/glossary/tests/behat/behat_mod_glossary.php
  104. +1 −1 mod/glossary/tests/behat/prevent_duplicate_entries.feature
  105. +3 −3 mod/glossary/tests/behat/search_entries.feature
  106. +4 −4 mod/lesson/tests/behat/date_availability.feature
  107. +7 −7 mod/lesson/tests/behat/lesson_navigation.feature
  108. +3 −3 mod/lesson/tests/behat/password_protection.feature
  109. +1 −1 mod/lesson/tests/behat/time_limit.feature
  110. +1 −1 mod/quiz/tests/behat/add_quiz.feature
  111. +2 −2 mod/quiz/tests/behat/behat_mod_quiz.php
  112. +1 −1 mod/scorm/tests/behat/add_scorm.feature
  113. +2 −2 mod/survey/tests/behat/survey_types.feature
  114. +7 −7 mod/wiki/tests/behat/collaborative_individual.feature
  115. +3 −3 mod/wiki/tests/behat/page_history.feature
  116. +3 −3 mod/wiki/tests/behat/preview_page.feature
  117. +6 −6 mod/wiki/tests/behat/wiki_formats.feature
  118. +1 −1 question/tests/behat/behat_question.php
  119. +2 −2 question/tests/behat/copy_questions.feature
  120. +2 −2 question/tests/behat/edit_questions.feature
  121. +4 −4 question/tests/behat/preview_question.feature
  122. +5 −5 question/tests/behat/question_categories.feature
  123. +1 −1 repository/recent/tests/behat/add_recent.feature
  124. +1 −1 repository/tests/behat/cancel_add_file.feature
  125. +1 −1 repository/tests/behat/create_folders.feature
  126. +1 −1 repository/tests/behat/create_shortcut.feature
  127. +1 −1 repository/tests/behat/overwrite_file.feature
  128. +1 −1 repository/tests/behat/zip_and_unzip.feature
  129. +2 −2 user/tests/behat/edituserpassword.feature
@@ -17,7 +17,7 @@ Feature: Display extended course names
Scenario: Courses list with extended course names
Given I expand "Site administration" node
And I click on "Courses" "link" in the "//div[@id='settingsnav']/descendant::li[contains(concat(' ', normalize-space(@class), ' '), ' type_setting ')][contains(., 'Appearance')]" "xpath_element"
- And I check "Display extended course names"
+ And I set the field "Display extended course names" to "1"
When I press "Save changes"
And I am on homepage
Then I should see "C_shortname Course fullname"
@@ -29,7 +29,7 @@ Feature: An administrator can filter user accounts by role, cohort and other pro
@javascript
Scenario: Filter user accounts by role and cohort
- When I fill the moodle form with:
+ When I set the following fields to these values:
| courserole_rl | Student |
| courserole_ct | any category |
| courserole | C1 |
@@ -38,7 +38,7 @@ Feature: An administrator can filter user accounts by role, cohort and other pro
And I should see "User Two"
And I should see "User Three"
And I should not see "User Four"
- And I fill the moodle form with:
+ And I set the following fields to these values:
| cohort | CH1 |
And I press "Add filter"
And I should not see "User One"
@@ -53,14 +53,14 @@ Feature: An administrator can filter user accounts by role, cohort and other pro
@javascript
Scenario: Filter user accounts by confirm and authentication method
- When I fill the moodle form with:
+ When I set the following fields to these values:
| Confirmed | No |
And I press "Add filter"
Then I should see "User One"
And I should not see "User Two"
And I should not see "User Three"
And I should see "User Four"
- And I fill the moodle form with:
+ And I set the following fields to these values:
| Authentication | manual |
And I press "Add filter"
And I should see "User One"
@@ -41,5 +41,5 @@ Feature: Upload users
And I follow "Maths"
And I expand "Users" node
And I follow "Groups"
- And I select "Section 1 (1)" from "groups"
+ And I set the field "groups" to "Section 1 (1)"
And the "members" select box should contain "Tom Jones"
@@ -29,6 +29,8 @@
$string['errordataroot'] = '$CFG->behat_dataroot is not set or is invalid.';
$string['errorsetconfig'] = '$CFG->behat_dataroot, $CFG->behat_prefix and $CFG->behat_wwwroot need to be set in config.php.';
$string['erroruniqueconfig'] = '$CFG->behat_dataroot, $CFG->behat_prefix and $CFG->behat_wwwroot values need to be different than $CFG->dataroot, $CFG->prefix, $CFG->wwwroot, $CFG->phpunit_dataroot and $CFG->phpunit_prefix values.';
+$string['fieldvalueargument'] = 'Field value arguments';
+$string['fieldvalueargument_help'] = 'This argument should be completed by a field value, there are many field types, simple ones like checkboxes, selects or textareas or complex ones like date selectors. You can check <a href="http://docs.moodle.org/dev/Acceptance_testing#Providing_values_to_steps" target="_blank">Field values</a> to see the expected field value depending on the field type you provide.';
$string['giveninfo'] = 'Given. Processes to set up the environment';
$string['infoheading'] = 'Info';
$string['installinfo'] = 'Read {$a} for installation and tests execution info';
@@ -84,6 +84,33 @@ function($matches){
$stepsdefinitions
);
+ $stepsdefinitions = preg_replace_callback('/(FIELD_VALUE_STRING)/',
+ function ($matches) {
+ global $CFG;
+
+ // Creating a link to a popup with the help.
+ $url = new moodle_url(
+ '/help.php',
+ array(
+ 'component' => 'tool_behat',
+ 'identifier' => 'fieldvalueargument',
+ 'lang' => current_language()
+ )
+ );
+
+ // Note: this title is displayed only if JS is disabled,
+ // otherwise the link will have the new ajax tooltip.
+ $title = get_string('fieldvalueargument', 'tool_behat');
+ $title = get_string('helpprefix2', '', trim($title, ". \t"));
+
+ $attributes = array('href' => $url, 'title' => $title,
+ 'aria-haspopup' => 'true', 'target' => '_blank');
+
+ $output = html_writer::tag('a', 'FIELD_VALUE_STRING', $attributes);
+ return html_writer::tag('span', $output, array('class' => 'helptooltip'));
+ },
+ $stepsdefinitions
+ );
}
// Steps definitions.
@@ -11,7 +11,7 @@ Feature: Page contents assertions
And I expand "Users" node
And I follow "Groups"
And I press "Create group"
- And I fill the moodle form with:
+ And I set the following fields to these values:
| Group name | I'm the name |
| Group description | I'm the description |
And I press "Save changes"
@@ -89,11 +89,11 @@ Feature: Set up contextual data for tests
And I follow "Course 1"
And I expand "Users" node
And I follow "Permissions"
- And I select "Student (1)" from "Advanced role override"
- Then the "mod/forum:editanypost" field should match "1" value
+ And I set the field "Advanced role override" to "Student (1)"
+ Then "mod/forum:editanypost" capability has "Allow" permission
And I press "Cancel"
- And I select "Teacher (1)" from "Advanced role override"
- And the "mod/forum:replynews" field should match "-1" value
+ And I set the field "Advanced role override" to "Teacher (1)"
+ And "mod/forum:replynews" capability has "Prevent" permission
And I press "Cancel"
Scenario: Add course enrolments
@@ -249,7 +249,7 @@ Feature: Set up contextual data for tests
And I follow "Groups"
Then the "groups" select box should contain "Group 1 (1)"
And the "groups" select box should contain "Group 2 (1)"
- And I select "Group 1 (1)" from "groups"
+ And I set the field "groups" to "Group 1 (1)"
And the "members" select box should contain "Student 1"
- And I select "Group 2 (1)" from "groups"
+ And I set the field "groups" to "Group 2 (1)"
And the "members" select box should contain "Student 2"
@@ -25,10 +25,10 @@ Feature: Edit capabilities
| moodle/grade:managesharedforms | Prevent |
| moodle/course:request | Prohibit |
When I follow "Edit Teacher role"
- Then the "block/mnet_hosts:myaddinstance" field should match "1" value
- And the "moodle/community:add" field should match "0" value
- And the "moodle/grade:managesharedforms" field should match "-1" value
- And the "moodle/course:request" field should match "-1000" value
+ Then "block/mnet_hosts:myaddinstance" capability has "Allow" permission
+ And "moodle/community:add" capability has "Not set" permission
+ And "moodle/grade:managesharedforms" capability has "Prevent" permission
+ And "moodle/course:request" capability has "Prohibit" permission
@javascript
Scenario: Course capabilities overrides
@@ -40,10 +40,10 @@ Feature: Edit capabilities
| mod/forum:deleteanypost | Prohibit |
| mod/forum:editanypost | Prevent |
| mod/forum:addquestion | Allow |
- When I select "Student (3)" from "Advanced role override"
- Then the "mod/forum:deleteanypost" field should match "-1000" value
- And the "mod/forum:editanypost" field should match "-1" value
- And the "mod/forum:addquestion" field should match "1" value
+ When I set the field "Advanced role override" to "Student (3)"
+ Then "mod/forum:deleteanypost" capability has "Prohibit" permission
+ And "mod/forum:editanypost" capability has "Prevent" permission
+ And "mod/forum:addquestion" capability has "Allow" permission
@javascript
Scenario: Module capabilities overrides
@@ -59,7 +59,7 @@ Feature: Edit capabilities
| mod/forum:deleteanypost | Prohibit |
| mod/forum:editanypost | Prevent |
| mod/forum:addquestion | Allow |
- When I select "Student (3)" from "Advanced role override"
- Then the "mod/forum:deleteanypost" field should match "-1000" value
- And the "mod/forum:editanypost" field should match "-1" value
- And the "mod/forum:addquestion" field should match "1" value
+ When I set the field "Advanced role override" to "Student (3)"
+ Then "mod/forum:deleteanypost" capability has "Prohibit" permission
+ And "mod/forum:editanypost" capability has "Prevent" permission
+ And "mod/forum:addquestion" capability has "Allow" permission
@@ -0,0 +1,173 @@
+@tool_behat
+Feature: Verify that all form fields values can be get and set
+ In order to use behat steps definitions
+ As a test writer
+ I need to verify it all works in real moodle forms
+
+ Background:
+ Given the following "courses" exists:
+ | fullname | shortname | category |
+ | Course 1 | C1 | 0 |
+ And the following "users" exists:
+ | username | email | firstname | lastname |
+ | student1 | s1@asd.com | Student | 1 |
+ | student2 | s2@asd.com | Student | 2 |
+ | student3 | s3@asd.com | Student | 3 |
+ And the following "course enrolments" exists:
+ | user | course | role |
+ | student1 | C1 | student |
+ | student2 | C1 | student |
+ | student3 | C1 | student |
+ | admin | C1 | editingteacher |
+ And the following "groups" exists:
+ | name | description | course | idnumber |
+ | Group 1 | G1 description | C1 | G1 |
+ | Group 2 | G1 description | C1 | G2 |
+ And the following "group members" exists:
+ | user | group |
+ | student1 | G1 |
+ | student2 | G1 |
+ | student2 | G2 |
+ | student3 | G2 |
+ And the following "activities" exists:
+ | activity | course | idnumber | name | intro | firstpagetitle | wikimode | visible |
+ | wiki | C1 | wiki1 | Test this one | Test this one | Test this one | collaborative | 0 |
+ And I log in as "admin"
+ And I expand "Site administration" node
+ And I expand "Appearance" node
+ And I follow "Manage tags"
+ # Select (multi-select) - We will check "I set the field...".
+ And I set the field "otagsadd" to "OT1, OT2, OT3, OT4, OT5"
+ And I press "Add official tags"
+ And I am on homepage
+ And I follow "Course 1"
+ And I turn editing mode on
+ And I follow "Test this one"
+ And I press "Create page"
+ # Select (multi-select) - Checking "the select box should contain".
+ And the "tags[officialtags][]" select box should contain "OT1"
+ And the "tags[officialtags][]" select box should contain "OT2"
+ And the "tags[officialtags][]" select box should contain "OT3"
+ And the "tags[officialtags][]" select box should contain "OT4"
+ And the "tags[officialtags][]" select box should contain "OT5"
+ And the "tags[officialtags][]" select box should contain "OT1, OT2, OT3, OT4, OT5"
+ And the "tags[officialtags][]" select box should contain "OT5, OT4, OT3, OT2, OT1"
+ And the "tags[officialtags][]" select box should not contain "OT6"
+ And the "tags[officialtags][]" select box should not contain "OT7"
+ And the "tags[officialtags][]" select box should not contain "OT6, OT7"
+ # Text (textarea & editor) & Select (multi-select) - Checking "I set the following fields to these values".
+ When I set the following fields to these values:
+ | HTML format | Student page contents to be tagged |
+ | tags[officialtags][] | OT1, OT3, OT5 |
+ And I press "Save"
+ Then I should see "Student page contents to be tagged" in the "region-main" "region"
+ And I should see "OT1" in the ".wiki-tags" "css_element"
+ And I should see "OT3" in the ".wiki-tags" "css_element"
+ And I should see "OT5" in the ".wiki-tags" "css_element"
+ And I should not see "OT2" in the ".wiki-tags" "css_element"
+ And I should not see "OT4" in the ".wiki-tags" "css_element"
+ And I follow "Edit"
+ # Select (multi-select) - Checking "I set the field".
+ And I set the field "tags[officialtags][]" to "OT2, OT4"
+ And I press "Save"
+ And I should see "OT2" in the ".wiki-tags" "css_element"
+ And I should see "OT4" in the ".wiki-tags" "css_element"
+ And I should not see "OT1" in the ".wiki-tags" "css_element"
+ And I should not see "OT3" in the ".wiki-tags" "css_element"
+ And I should not see "OT5" in the ".wiki-tags" "css_element"
+ And I follow "Edit"
+ # Select (multi-select) - Checking "the field matches value" and "the field does not match value".
+ And the field "tags[officialtags][]" matches value "OT2, OT4"
+ And the field "tags[officialtags][]" does not match value "OT4"
+ And the field "tags[officialtags][]" does not match value "OT2"
+ And the field "tags[officialtags][]" does not match value "OT1, OT3, OT5"
+ And I press "Cancel"
+ And I follow "Edit settings"
+ And I expand all fieldsets
+ # Checkbox - Checking "I set the field".
+ And I set the field "Display description on course page" to "1"
+ # Checkbox - Checking "I set the following fields to these values:".
+ And I set the following fields to these values:
+ | Force format | 1 |
+ # Checkbox - Checking "the field matches value" and "the field does not match value".
+ And the field "Display description on course page" matches value "1"
+ And the field "Display description on course page" does not match value ""
+ And I press "Save and return to course"
+ And I should see "Test this one"
+ And I follow "Test this one"
+ And I follow "Edit settings"
+ # Checkbox - Checking "the field matches value" and "the following fields match these values".
+ And the following fields match these values:
+ | Display description on course page | 1 |
+ | Default format | HTML |
+ | Wiki name | Test this one |
+ And the field "Force format" matches value "1"
+ # Select (simple) - Checking "I set the following fields to these values:".
+ And I set the following fields to these values:
+ | Default format | NWiki |
+ | Display description on course page | |
+ # Checkbox - Checking "I set the field" to uncheck.
+ And I set the field "Force format" to ""
+ # Select (simple) - Checking "I set the field".
+ And I set the field "Group mode" to "Separate groups"
+ And I press "Save and display"
+ And I follow "Edit settings"
+ And the following fields match these values:
+ | Default format | NWiki |
+ | Group mode | Separate groups |
+ | Display description on course page | |
+ | Force format | |
+ # All fields - Checking "the following fields do not match these values".
+ And the following fields do not match these values:
+ | Wiki name | Test this one baby |
+ | Default format | HTML |
+ | Force format | 1 |
+ And I press "Cancel"
+ And I follow "Course 1"
+ # Radio - Checking "I set the field" and "the field matches value".
+ And I add a "Choice" to section "1" and I fill the form with:
+ | Choice name | Test choice name |
+ | Description | Test choice description |
+ | Allow choice to be updated | Yes |
+ | Option 1 | one |
+ | Option 2 | two |
+ | Option 3 | three |
+ And I follow "Test choice name"
+ And I set the field "one" to "1"
+ And I press "Save my choice"
+ And the field "one" matches value "1"
+ And the field "two" matches value ""
+
+ Scenario: with JS disabled all form fields getters and setters works as expected
+
+ @javascript
+ Scenario: with JS enabled all form fields getters and setters works as expected
+ Then I follow "Course 1"
+ And I expand "Users" node
+ And I follow "Groups"
+ # Select (multi-select & AJAX) - Checking "I set the field" and "select box should contain".
+ And I set the field "groups" to "Group 2"
+ And the "members" select box should contain "Student 2"
+ And the "members" select box should contain "Student 3"
+ And the "members" select box should not contain "Student 1"
+ And I set the field "groups" to "Group 1"
+ And the "members" select box should contain "Student 1"
+ And the "members" select box should contain "Student 2"
+ And the "members" select box should not contain "Student 3"
+ # Checkbox (AJAX) - Checking "I set the field" and "I set the following fields to these values".
+ And I follow "Course 1"
+ And I add a "Lesson" to section "1"
+ And I set the following fields to these values:
+ | Name | Test lesson |
+ | available[enabled] | 1 |
+ And I set the field "deadline[enabled]" to "1"
+ # Checkbox (AJAX) - Checking "the field matches value" before saving.
+ And the field "available[enabled]" matches value "1"
+ And the "available[day]" "field" should be enabled
+ And the field "deadline[enabled]" matches value "1"
+ And I press "Save and display"
+ And I follow "Edit settings"
+ And the field "available[enabled]" matches value "1"
+ And the "available[day]" "field" should be enabled
+ And the field "deadline[enabled]" matches value "1"
+ And I press "Cancel"
@@ -18,14 +18,14 @@ Feature: List the system steps definitions
@javascript
Scenario: Filtering by type
- Given I select "Then. Checkings to ensure the outcomes are the expected ones" from "Type"
+ Given I set the field "Type" to "Then. Checkings to ensure the outcomes are the expected ones"
When I press "Filter"
Then I should see "Checks, that page contains specified text."
And I should not see "Opens Moodle homepage."
@javascript
Scenario: Filtering by keyword
- Given I fill in "Contains" with "homepage"
+ Given I set the field "Contains" to "homepage"
When I press "Filter"
Then I should see "Opens Moodle homepage."
@@ -9,14 +9,14 @@ Feature: Forms manipulation
Given I log in as "admin"
And I follow "Admin User"
And I follow "Edit profile"
- When I fill in "First name" with "Field value"
- And I select "Plain text area" from "Text editor"
- And I check "Unmask"
- Then the "First name" field should match "Field value" value
+ When I set the field "First name" to "Field value"
+ And I set the field "Text editor" to "Plain text area"
+ And I set the field "Unmask" to "1"
+ Then the field "First name" matches value "Field value"
And the "Text editor" select box should contain "Plain text area"
- And the "Unmask" checkbox should be checked
- And I uncheck "Unmask"
- And the "Unmask" checkbox should not be checked
+ And the field "Unmask" matches value "1"
+ And I set the field "Unmask" to ""
+ And the field "Unmask" matches value ""
And I press "Update profile"
@javascript
Oops, something went wrong.

0 comments on commit 267c4b4

Please sign in to comment.