From a3858d3d6238ef05a21fb29247bfcfdad5697f83 Mon Sep 17 00:00:00 2001 From: Garrick Cheung Date: Sat, 22 Feb 2020 14:43:31 -0800 Subject: [PATCH 1/2] [BUGFIX beta] Adding test for #18211 --- .../glimmer/tests/integration/input-test.js | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/packages/@ember/-internals/glimmer/tests/integration/input-test.js b/packages/@ember/-internals/glimmer/tests/integration/input-test.js index 261683d0bfd..391483727b8 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/input-test.js +++ b/packages/@ember/-internals/glimmer/tests/integration/input-test.js @@ -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(``, { actions: { someAction() {} } }); + this.assertPropertyHasValue('checked', true); + } + + ['@test GH18211 input checked attribute, with a value, works with the action helper']() { + this.render(``, { actions: { someAction() {} } }); + this.assertPropertyHasValue('checked', true); + } + + ['@test GH18211 input checked attribute, without a value, works with attributes with values']() { + this.render(``, { actions: { someAction() {} } }); + this.assertPropertyHasValue('checked', true); + } + + ['@test GH18211 input checked attribute, without a value, works with event attributes']() { + this.render(``, { actions: { someAction() {} } }); + this.assertPropertyHasValue('checked', true); + } + // private helpers and assertions setDOMValue(value) { this.inputElement().value = value; From 9fe5a6b5a86adb163b02a200bf7562aca87c53e0 Mon Sep 17 00:00:00 2001 From: Garrick Cheung Date: Sat, 22 Feb 2020 15:15:13 -0800 Subject: [PATCH 2/2] Fix lint issues. --- .../glimmer/tests/integration/input-test.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/@ember/-internals/glimmer/tests/integration/input-test.js b/packages/@ember/-internals/glimmer/tests/integration/input-test.js index 391483727b8..24e8392706e 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/input-test.js +++ b/packages/@ember/-internals/glimmer/tests/integration/input-test.js @@ -202,22 +202,30 @@ moduleFor( } ['@test GH18211 input checked attribute, without a value, works with the action helper']() { - this.render(``, { actions: { someAction() {} } }); + this.render(``, { + actions: { someAction() {} }, + }); this.assertPropertyHasValue('checked', true); } ['@test GH18211 input checked attribute, with a value, works with the action helper']() { - this.render(``, { actions: { someAction() {} } }); + this.render(``, { + actions: { someAction() {} }, + }); this.assertPropertyHasValue('checked', true); } - + ['@test GH18211 input checked attribute, without a value, works with attributes with values']() { - this.render(``, { actions: { someAction() {} } }); + this.render(``, { + actions: { someAction() {} }, + }); this.assertPropertyHasValue('checked', true); } ['@test GH18211 input checked attribute, without a value, works with event attributes']() { - this.render(``, { actions: { someAction() {} } }); + this.render(``, { + actions: { someAction() {} }, + }); this.assertPropertyHasValue('checked', true); }