Skip to content

Commit

Permalink
Merge pull request #18762 from GCheung55/bugfix/test-for-18221
Browse files Browse the repository at this point in the history
[BUGFIX beta] Adding test for #18211
  • Loading branch information
rwjblue authored Feb 23, 2020
2 parents ac45529 + 9fe5a6b commit 8ad168d
Showing 1 changed file with 28 additions and 0 deletions.
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

0 comments on commit 8ad168d

Please sign in to comment.