summaryrefslogtreecommitdiff
path: root/spec/support/input_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/input_helper.rb')
-rw-r--r--spec/support/input_helper.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/support/input_helper.rb b/spec/support/input_helper.rb
new file mode 100644
index 00000000000..acbb42274ec
--- /dev/null
+++ b/spec/support/input_helper.rb
@@ -0,0 +1,7 @@
+# see app/assets/javascripts/test_utils/simulate_input.js
+
+module InputHelper
+ def simulate_input(selector, input = '')
+ evaluate_script("window.simulateInput(#{selector.to_json}, #{input.to_json});")
+ end
+end