Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX beta] Adding test for #18211 #18762

Merged
merged 2 commits into from
Feb 23, 2020
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