Merge branch 'MDL-48350-M32' of git://github.com/lazydaisy/moodle
[moodle.git] / admin / tool / behat / tests / behat / manipulate_forms.feature
CommitLineData
550d842e 1@tool @tool_behat
bf4fa299
DM
2Feature: Forms manipulation
3 In order to interact with Moodle
4 As a user
5 I need to set forms values
6
7 @javascript
8 Scenario: Basic forms manipulation
9 Given I log in as "admin"
4887d152 10 And I follow "Preferences" in the user menu
ba5c5083 11 And I click on "Edit profile" "link" in the "region-main" "region"
f083d614 12 When I set the field "First name" to "Field value"
8e94fae9 13 And I set the field "Select a country" to "Japan"
f083d614
DM
14 And I set the field "Unmask" to "1"
15 Then the field "First name" matches value "Field value"
8e94fae9 16 And the "Select a country" select box should contain "Japan"
f083d614
DM
17 And the field "Unmask" matches value "1"
18 And I set the field "Unmask" to ""
19 And the field "Unmask" matches value ""
bf4fa299 20 And I press "Update profile"
2b6287b7
DM
21
22 @javascript
23 Scenario: Expand all fieldsets and advanced elements
759b323e 24 Given the following "courses" exist:
2b6287b7
DM
25 | fullname | shortname | category |
26 | Course 1 | C1 | 0 |
27 And I log in as "admin"
8e94fae9 28 And I am on site homepage
2b6287b7 29 And I follow "Course 1"
371b7fc3 30 And I turn editing mode on
5bc7cd92 31 And I add a "Quiz" to section "1"
2b6287b7 32 When I expand all fieldsets
5bc7cd92 33 Then I should see "Close the quiz"
371b7fc3
DM
34 And I should see "Group mode"
35 And I should see "Grouping"
5df9e40c 36 And I should not see "Show more..." in the "region-main" "region"
2b6287b7 37 And I should see "Show less..."