Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 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,34 @@ 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