Ignore:
Timestamp:
May 2, 2016, 12:09:23 PM (3 years ago)
Author:
jrpelegrina
Message:

Updated to moodle 3.0.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • moodle/trunk/fuentes/admin/tool/behat/tests/behat/get_and_set_fields.feature

    r136 r1331  
    1111    And the following "users" exist:
    1212      | username | email | firstname | lastname |
    13       | student1 | s1@asd.com | Student | 1 |
    14       | student2 | s2@asd.com | Student | 2 |
    15       | student3 | s3@asd.com | Student | 3 |
     13      | student1 | s1@example.com | Student | 1 |
     14      | student2 | s2@example.com | Student | 2 |
     15      | student3 | s3@example.com | Student | 3 |
    1616    And the following "course enrolments" exist:
    1717      | user | course | role |
     
    3636    And I expand "Site administration" node
    3737    And I expand "Appearance" node
    38     And I follow "Manage tags"
    39     # Select (multi-select) - We will check "I set the field...".
    40     And I set the field "otagsadd" to "OT1, OT2, OT3, OT4, OT5"
    41     And I press "Add official tags"
    42     And I am on homepage
     38    And I am on site homepage
     39    And I follow "Course 1"
     40    And I follow "Reset"
     41    # Select (multi-select) - Checking "the select box should contain".
     42    And I expand all fieldsets
     43    And the "Unenrol users" select box should contain "No roles"
     44    And the "Unenrol users" select box should contain "Student"
     45    And the "Unenrol users" select box should contain "Non-editing teacher"
     46    And the "Unenrol users" select box should contain "Teacher"
     47    And the "Unenrol users" select box should contain "Manager"
     48    And the "Unenrol users" select box should contain "No roles, Student, Non-editing teacher, Teacher, Manager"
     49    And the "Unenrol users" select box should contain "Manager, Teacher, Non-editing teacher, Student, No roles"
     50    And the "Unenrol users" select box should not contain "President"
     51    And the "Unenrol users" select box should not contain "Baker"
     52    And the "Unenrol users" select box should not contain "President, Baker"
     53    And I am on site homepage
    4354    And I follow "Course 1"
    4455    And I turn editing mode on
    4556    And I follow "Test this one"
    4657    And I press "Create page"
    47     # Select (multi-select) - Checking "the select box should contain".
    48     And the "tags[officialtags][]" select box should contain "OT1"
    49     And the "tags[officialtags][]" select box should contain "OT2"
    50     And the "tags[officialtags][]" select box should contain "OT3"
    51     And the "tags[officialtags][]" select box should contain "OT4"
    52     And the "tags[officialtags][]" select box should contain "OT5"
    53     And the "tags[officialtags][]" select box should contain "OT1, OT2, OT3, OT4, OT5"
    54     And the "tags[officialtags][]" select box should contain "OT5, OT4, OT3, OT2, OT1"
    55     And the "tags[officialtags][]" select box should not contain "OT6"
    56     And the "tags[officialtags][]" select box should not contain "OT7"
    57     And the "tags[officialtags][]" select box should not contain "OT6, OT7"
    5858    # Text (textarea & editor) & Select (multi-select) - Checking "I set the following fields to these values".
    5959    When I set the following fields to these values:
    60       | HTML format | Student page contents to be tagged |
    61       | tags[officialtags][] | OT1, OT3, OT5 |
     60      | HTML format | Student page contents |
    6261    And I press "Save"
    63     Then I should see "Student page contents to be tagged" in the "region-main" "region"
    64     And I should see "OT1" in the ".wiki-tags" "css_element"
    65     And I should see "OT3" in the ".wiki-tags" "css_element"
    66     And I should see "OT5" in the ".wiki-tags" "css_element"
    67     And I should not see "OT2" in the ".wiki-tags" "css_element"
    68     And I should not see "OT4" in the ".wiki-tags" "css_element"
     62    Then I should see "Student page contents" in the "region-main" "region"
    6963    And I follow "Edit"
    7064    # Select (multi-select) - Checking "I set the field".
    71     And I set the field "tags[officialtags][]" to "OT2, OT4"
    72     And I press "Save"
    73     And I should see "OT2" in the ".wiki-tags" "css_element"
    74     And I should see "OT4" in the ".wiki-tags" "css_element"
    75     And I should not see "OT1" in the ".wiki-tags" "css_element"
    76     And I should not see "OT3" in the ".wiki-tags" "css_element"
    77     And I should not see "OT5" in the ".wiki-tags" "css_element"
    78     And I follow "Edit"
    79     # Select (multi-select) - Checking "the field matches value" and "the field does not match value".
    80     And the field "tags[officialtags][]" matches value "OT2, OT4"
    81     And the field "tags[officialtags][]" does not match value "OT4"
    82     And the field "tags[officialtags][]" does not match value "OT2"
    83     And the field "tags[officialtags][]" does not match value "OT1, OT3, OT5"
    84     And I press "Cancel"
    8565    And I follow "Edit settings"
    8666    And I expand all fieldsets
     
    138118    And the field "one" matches value "1"
    139119    And the field "two" matches value ""
     120    # Check if field xpath set/match works.
     121    And I am on site homepage
     122    And I follow "Course 1"
     123    And I navigate to "Edit settings" node in "Course administration"
     124    And I set the field with xpath "//input[@id='id_idnumber']" to "Course id number"
     125    And the field with xpath "//input[@name='idnumber']" matches value "Course id number"
     126    And the field with xpath "//input[@name='idnumber']" does not match value ""
     127    And I press "Save and display"
     128    And I navigate to "Edit settings" node in "Course administration"
     129    And the field "Course ID number" matches value "Course id number"
     130
    140131
    141132  Scenario: with JS disabled all form fields getters and setters works as expected
Note: See TracChangeset for help on using the changeset viewer.