Skip to content

Commit da53879

Browse files
GCheung55kategengler
authored andcommitted
[BUGFIX beta] Adding test for #18211
(cherry picked from commit a3858d3)
1 parent 731ee32 commit da53879

File tree

1 file changed

+20
-0
lines changed
  • packages/@ember/-internals/glimmer/tests/integration

1 file changed

+20
-0
lines changed

packages/@ember/-internals/glimmer/tests/integration/input-test.js

+20
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,26 @@ moduleFor(
201201
this.assertValue('hola', 'Value is used');
202202
}
203203

204+
['@test GH18211 input checked attribute, without a value, works with the action helper']() {
205+
this.render(`<input type="checkbox" checked {{action "someAction"}}>`, { actions: { someAction() {} } });
206+
this.assertPropertyHasValue('checked', true);
207+
}
208+
209+
['@test GH18211 input checked attribute, with a value, works with the action helper']() {
210+
this.render(`<input type="checkbox" checked={{true}} {{action "someAction"}}>`, { actions: { someAction() {} } });
211+
this.assertPropertyHasValue('checked', true);
212+
}
213+
214+
['@test GH18211 input checked attribute, without a value, works with attributes with values']() {
215+
this.render(`<input type="checkbox" checked click={{action "someAction"}}>`, { actions: { someAction() {} } });
216+
this.assertPropertyHasValue('checked', true);
217+
}
218+
219+
['@test GH18211 input checked attribute, without a value, works with event attributes']() {
220+
this.render(`<input type="checkbox" checked onclick={{action "someAction"}}>`, { actions: { someAction() {} } });
221+
this.assertPropertyHasValue('checked', true);
222+
}
223+
204224
// private helpers and assertions
205225
setDOMValue(value) {
206226
this.inputElement().value = value;

0 commit comments

Comments
 (0)