diff --git a/packages/@ember/-internals/glimmer/tests/integration/components/input-angle-test.js b/packages/@ember/-internals/glimmer/tests/integration/components/input-angle-test.js index 3edda7cdb7d..c6a029c2429 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/components/input-angle-test.js +++ b/packages/@ember/-internals/glimmer/tests/integration/components/input-angle-test.js @@ -1,5 +1,6 @@ import { RenderingTestCase, moduleFor, runDestroy, runTask } from 'internal-test-helpers'; +import { action } from '@ember/object'; import { assign } from '@ember/polyfills'; import { set } from '@ember/-internals/metal'; import { jQueryDisabled, jQuery } from '@ember/-internals/views'; @@ -780,6 +781,16 @@ moduleFor( ['@test sends an action with `` for native DOM events']() { this.assertTriggersNativeDOMEvents(); } + + ['@test triggers a method with ``'](assert) { + this.render(``, { + didTrigger: action(function() { + assert.ok(true, 'action was triggered'); + }), + }); + + this.triggerEvent('keyup', { keyCode: 65 }); + } } ); diff --git a/packages/@ember/-internals/glimmer/tests/integration/components/input-curly-test.js b/packages/@ember/-internals/glimmer/tests/integration/components/input-curly-test.js index 948d7a1cc6e..47f91bf60b1 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/components/input-curly-test.js +++ b/packages/@ember/-internals/glimmer/tests/integration/components/input-curly-test.js @@ -1,5 +1,6 @@ import { RenderingTestCase, moduleFor, runDestroy, runTask } from 'internal-test-helpers'; +import { action } from '@ember/object'; import { assign } from '@ember/polyfills'; import { set } from '@ember/-internals/metal'; import { jQueryDisabled, jQuery } from '@ember/-internals/views'; @@ -631,6 +632,16 @@ moduleFor( ['@test sends an action with `{{input EVENT=(action "foo")}}` for native DOM events']() { this.assertTriggersNativeDOMEvents(); } + + ['@test triggers a method with `{{input key-up=this.didTrigger}}`'](assert) { + this.render(`{{input key-up=this.didTrigger}}`, { + didTrigger: action(function() { + assert.ok(true, 'action was triggered'); + }), + }); + + this.triggerEvent('keyup', { keyCode: 65 }); + } } ); diff --git a/packages/@ember/-internals/glimmer/tests/integration/components/textarea-angle-test.js b/packages/@ember/-internals/glimmer/tests/integration/components/textarea-angle-test.js index 592107c7143..63dda4652c8 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/components/textarea-angle-test.js +++ b/packages/@ember/-internals/glimmer/tests/integration/components/textarea-angle-test.js @@ -1,5 +1,6 @@ import { RenderingTestCase, moduleFor, classes, applyMixins, runTask } from 'internal-test-helpers'; +import { action } from '@ember/object'; import { assign } from '@ember/polyfills'; import { set } from '@ember/-internals/metal'; @@ -209,5 +210,15 @@ moduleFor( runTask(() => set(this.context, 'model', { val: 'A beautiful day in Seattle' })); this.assertTextArea({ value: 'A beautiful day in Seattle' }); } + + ['@test triggers a method with `