diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-12-17 09:15:42 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-12-17 09:44:51 +0100 |
commit | a1789ddde42033f1b05cc4929491214ee6e79383 (patch) | |
tree | 63615735c4ddffaaabf2428946bb26f90899f7bf /vendor/oojs/oojs-ui/bin/testsuitegenerator.rb | |
parent | 9e06a62f265e3a2aaabecc598d4bc617e06fa32d (diff) |
Update to MediaWiki 1.26.0
Diffstat (limited to 'vendor/oojs/oojs-ui/bin/testsuitegenerator.rb')
-rw-r--r-- | vendor/oojs/oojs-ui/bin/testsuitegenerator.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/vendor/oojs/oojs-ui/bin/testsuitegenerator.rb b/vendor/oojs/oojs-ui/bin/testsuitegenerator.rb index 28ab1a85..48ba012c 100644 --- a/vendor/oojs/oojs-ui/bin/testsuitegenerator.rb +++ b/vendor/oojs/oojs-ui/bin/testsuitegenerator.rb @@ -18,7 +18,7 @@ else .reject{|c| c[:abstract] } # can't test abstract classes .reject{|c| !c[:parent] || c[:parent] == 'ElementMixin' || c[:parent] == 'Theme' } # can't test abstract .reject{|c| %w[Element Widget Layout Theme].include? c[:name] } # no toplevel - .reject{|c| c[:name] == 'DropdownInputWidget' } # different PHP and JS implementations + .reject{|c| %w[DropdownInputWidget RadioSelectInputWidget].include? c[:name] } # different PHP and JS implementations # values to test for each type expandos = { @@ -31,10 +31,13 @@ else # values to test for names sensible_values = { 'href' => ['http://example.com/'], - ['TextInputWidget', 'type'] => %w[text password], - ['ButtonInputWidget', 'type'] => %w[button input], + ['TextInputWidget', 'type'] => %w[text password foo], + ['ButtonInputWidget', 'type'] => %w[button submit foo], ['FieldLayout', 'help'] => true, # different PHP and JS implementations + ['ActionFieldLayout', 'help'] => true, # different PHP and JS implementations ['FieldsetLayout', 'help'] => true, # different PHP and JS implementations + ['FieldLayout', 'errors'] => expandos['string'].map{|v| [v] }, # treat as string[] + ['FieldLayout', 'notices'] => expandos['string'].map{|v| [v] }, # treat as string[] 'type' => %w[text button], 'method' => %w[GET POST], 'action' => [], @@ -44,6 +47,7 @@ else 'name' => true, 'autofocus' => true, # usually makes no sense in JS 'tabIndex' => [-1, 0, 100], + 'maxLength' => [100], 'icon' => ['picture'], 'indicator' => ['down'], 'flags' => %w[constructive], @@ -140,7 +144,9 @@ else end end + $stderr.puts "Generated #{tests.length} test cases." tests = tests.group_by{|t| t[:class] } + $stderr.puts tests.map{|class_name, class_tests| "* #{class_name}: #{class_tests.length}" } puts JSON.pretty_generate tests end |