[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/tests/behat/ -> largeforms.feature (source)

   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 log in as "admin"
  16      And I am on site homepage
  17      And I follow "Course 1"
  18      And I follow "FixtureLink"
  19  
  20    # Note: These tests do not actually use JavaScript but they don't work with
  21    # the headless 'browser'.
  22    @javascript
  23    Scenario: Small form with checkboxes (not using workaround)
  24      When I follow "Advanced checkboxes / Small"
  25      And I press "Submit here!"
  26      Then I should see "_qf__core_max_input_vars_form=1"
  27      And I should see "mform_isexpanded_id_general=1"
  28      And I should see "arraytest=[13,42]"
  29      And I should see "array2test=[13,42]"
  30      And I should see "submitbutton=Submit here!"
  31      And I should see "Bulk checkbox success: true"
  32  
  33    @javascript
  34    Scenario: Medium length form with checkboxes (needs workaround)
  35      When I follow "Advanced checkboxes / Below limit"
  36      And I press "Submit here!"
  37      Then I should see "_qf__core_max_input_vars_form=1"
  38      And I should see "mform_isexpanded_id_general=1"
  39      And I should see "arraytest=[13,42]"
  40      And I should see "array2test=[13,42]"
  41      And I should see "submitbutton=Submit here!"
  42      And I should see "Bulk checkbox success: true"
  43  
  44    @javascript
  45    Scenario: Exact PHP limit length form with checkboxes (uses workaround but doesn't need it)
  46      When I follow "Advanced checkboxes / Exact PHP limit"
  47      And I press "Submit here!"
  48      Then I should see "_qf__core_max_input_vars_form=1"
  49      And I should see "mform_isexpanded_id_general=1"
  50      And I should see "arraytest=[13,42]"
  51      And I should see "array2test=[13,42]"
  52      And I should see "submitbutton=Submit here!"
  53      And I should see "Bulk checkbox success: true"
  54  
  55    @javascript
  56    Scenario: Longer than the limit with checkboxes (needs workaround)
  57      When I follow "Advanced checkboxes / Above limit"
  58      And I press "Submit here!"
  59      Then I should see "_qf__core_max_input_vars_form=1"
  60      And I should see "mform_isexpanded_id_general=1"
  61      And I should see "arraytest=[13,42]"
  62      And I should see "array2test=[13,42]"
  63      And I should see "submitbutton=Submit here!"
  64      And I should see "Bulk checkbox success: true"
  65  
  66    @javascript
  67    Scenario: Small form with array fields (not using workaround)
  68      When I follow "Select options / Small"
  69      And I press "Submit here!"
  70      Then I should see "_qf__core_max_input_vars_form=1"
  71      And I should see "mform_isexpanded_id_general=1"
  72      And I should see "arraytest=[13,42]"
  73      And I should see "array2test=[13,42]"
  74      And I should see "submitbutton=Submit here!"
  75      And I should see "Bulk array success: true"
  76  
  77    @javascript
  78    Scenario: Below limit form with array fields (uses workaround but doesn't need it)
  79      When I follow "Select options / Below limit"
  80      And I press "Submit here!"
  81      Then I should see "_qf__core_max_input_vars_form=1"
  82      And I should see "mform_isexpanded_id_general=1"
  83      And I should see "arraytest=[13,42]"
  84      And I should see "array2test=[13,42]"
  85      And I should see "submitbutton=Submit here!"
  86      And I should see "Bulk array success: true"
  87  
  88    @javascript
  89    Scenario: Exact PHP limit length form with array fields (uses workaround but doesn't need it)
  90      When I follow "Select options / Exact PHP limit"
  91      And I press "Submit here!"
  92      Then I should see "_qf__core_max_input_vars_form=1"
  93      And I should see "mform_isexpanded_id_general=1"
  94      And I should see "arraytest=[13,42]"
  95      And I should see "array2test=[13,42]"
  96      And I should see "submitbutton=Submit here!"
  97      And I should see "Bulk array success: true"
  98  
  99    @javascript
 100    Scenario: Longer than the limit with array fields (needs workaround)
 101      When I follow "Select options / Above limit"
 102      And I press "Submit here!"
 103      Then I should see "_qf__core_max_input_vars_form=1"
 104      And I should see "mform_isexpanded_id_general=1"
 105      And I should see "arraytest=[13,42]"
 106      And I should see "array2test=[13,42]"
 107      And I should see "submitbutton=Submit here!"
 108      And I should see "Bulk array success: true"


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1