1 |
efrain |
1 |
@core
|
|
|
2 |
Feature: Forms with a large number of fields
|
|
|
3 |
In order to use certain forms on large Moodle installations
|
|
|
4 |
As an admin
|
|
|
5 |
I need forms to work with more fields than the PHP max_input_vars setting
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
# Get to the fixture page.
|
|
|
9 |
Given the following "courses" exist:
|
|
|
10 |
| fullname | shortname | format |
|
|
|
11 |
| Course 1 | C1 | topics |
|
|
|
12 |
And the following "activities" exist:
|
|
|
13 |
| activity | name | intro | course | idnumber |
|
|
|
14 |
| label | L1 | <a href="../lib/tests/fixtures/max_input_vars.php">FixtureLink</a> | C1 | label1 |
|
|
|
15 |
When I am on the "C1" "Course" page logged in as "admin"
|
|
|
16 |
And I click on "FixtureLink" "link" in the "region-main" "region"
|
|
|
17 |
|
|
|
18 |
# Note: These tests do not actually use JavaScript but they don't work with
|
|
|
19 |
# the headless 'browser'.
|
|
|
20 |
@javascript
|
|
|
21 |
Scenario: Small form with checkboxes (not using workaround)
|
|
|
22 |
When I follow "Advanced checkboxes / Small"
|
|
|
23 |
And I press "Submit here!"
|
|
|
24 |
Then I should see "_qf__core_max_input_vars_form=1"
|
|
|
25 |
And I should see "mform_isexpanded_id_general=1"
|
|
|
26 |
And I should see "arraytest=[13,42]"
|
|
|
27 |
And I should see "array2test=[13,42]"
|
|
|
28 |
And I should see "submitbutton=Submit here!"
|
|
|
29 |
And I should see "Bulk checkbox success: true"
|
|
|
30 |
|
|
|
31 |
@javascript
|
|
|
32 |
Scenario: Small form with array fields (not using workaround)
|
|
|
33 |
When I follow "Select options / Small"
|
|
|
34 |
And I press "Submit here!"
|
|
|
35 |
Then I should see "_qf__core_max_input_vars_form=1"
|
|
|
36 |
And I should see "mform_isexpanded_id_general=1"
|
|
|
37 |
And I should see "arraytest=[13,42]"
|
|
|
38 |
And I should see "array2test=[13,42]"
|
|
|
39 |
And I should see "submitbutton=Submit here!"
|
|
|
40 |
And I should see "Bulk array success: true"
|
|
|
41 |
|
|
|
42 |
@javascript
|
|
|
43 |
Scenario: Below limit form with array fields (uses workaround but doesn't need it)
|
|
|
44 |
When I follow "Select options / Below limit"
|
|
|
45 |
And I press "Submit here!"
|
|
|
46 |
Then I should see "_qf__core_max_input_vars_form=1"
|
|
|
47 |
And I should see "mform_isexpanded_id_general=1"
|
|
|
48 |
And I should see "arraytest=[13,42]"
|
|
|
49 |
And I should see "array2test=[13,42]"
|
|
|
50 |
And I should see "submitbutton=Submit here!"
|
|
|
51 |
And I should see "Bulk array success: true"
|
|
|
52 |
|
|
|
53 |
@javascript
|
|
|
54 |
Scenario: Exact PHP limit length form with array fields (uses workaround but doesn't need it)
|
|
|
55 |
When I follow "Select options / Exact PHP limit"
|
|
|
56 |
And I press "Submit here!"
|
|
|
57 |
Then I should see "_qf__core_max_input_vars_form=1"
|
|
|
58 |
And I should see "mform_isexpanded_id_general=1"
|
|
|
59 |
And I should see "arraytest=[13,42]"
|
|
|
60 |
And I should see "array2test=[13,42]"
|
|
|
61 |
And I should see "submitbutton=Submit here!"
|
|
|
62 |
And I should see "Bulk array success: true"
|