Skip to content

Commit

Permalink
[BUGFIX beta] Adding test for #18211
Browse files Browse the repository at this point in the history
  • Loading branch information
GCheung55 committed Feb 22, 2020
1 parent ac45529 commit a3858d3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/@ember/-internals/glimmer/tests/integration/input-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,26 @@ moduleFor(
this.assertValue('hola', 'Value is used');
}

['@test GH18211 input checked attribute, without a value, works with the action helper']() {
this.render(`<input type="checkbox" checked {{action "someAction"}}>`, { actions: { someAction() {} } });
this.assertPropertyHasValue('checked', true);
}

['@test GH18211 input checked attribute, with a value, works with the action helper']() {
this.render(`<input type="checkbox" checked={{true}} {{action "someAction"}}>`, { actions: { someAction() {} } });
this.assertPropertyHasValue('checked', true);
}

['@test GH18211 input checked attribute, without a value, works with attributes with values']() {
this.render(`<input type="checkbox" checked click={{action "someAction"}}>`, { actions: { someAction() {} } });
this.assertPropertyHasValue('checked', true);
}

['@test GH18211 input checked attribute, without a value, works with event attributes']() {
this.render(`<input type="checkbox" checked onclick={{action "someAction"}}>`, { actions: { someAction() {} } });
this.assertPropertyHasValue('checked', true);
}

// private helpers and assertions
setDOMValue(value) {
this.inputElement().value = value;
Expand Down

0 comments on commit a3858d3

Please sign in to comment.