Skip to content

Commit

Permalink
Add failing test for angle bracket input event
Browse files Browse the repository at this point in the history
  • Loading branch information
wagenet committed Mar 20, 2019
1 parent a142948 commit 08234b8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,22 @@ if (EMBER_GLIMMER_ANGLE_BRACKET_BUILT_INS) {
this.assert.equal(this.$input()[0].type, 'text');
this.assert.equal(this.$input()[1].type, 'file');
}

['@test sends an action with `<Input @input={{action "foo"}} />` when the value is changed'](
assert
) {
assert.expect(1);

this.render(`<Input @input={{action 'foo'}} />`, {
actions: {
foo() {
assert.ok(true, 'action was triggered');
},
},
});

this.triggerEvent('input');
}
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,22 @@ moduleFor(
this.assert.equal(this.$input()[0].type, 'text');
this.assert.equal(this.$input()[1].type, 'file');
}

['@test sends an action with `{{input input=(action "foo")}}` when the value is changed'](
assert
) {
assert.expect(1);

this.render(`{{input input=(action 'foo')}}`, {
actions: {
foo() {
assert.ok(true, 'action was triggered');
},
},
});

this.triggerEvent('input');
}
}
);

Expand Down

0 comments on commit 08234b8

Please sign in to comment.