diff --git a/packages/choice-input/test/ChoiceInputMixin.test.js b/packages/choice-input/test/ChoiceInputMixin.test.js
index 3d41e2caf..3aed678bd 100644
--- a/packages/choice-input/test/ChoiceInputMixin.test.js
+++ b/packages/choice-input/test/ChoiceInputMixin.test.js
@@ -12,6 +12,8 @@ describe('ChoiceInputMixin', () => {
if (super.connectedCallback) super.connectedCallback();
this.type = 'checkbox'; // could also be 'radio', should be tested in integration test
}
+
+ _syncValueUpwards() {} // We need to disable the method for the test to pass
}
customElements.define('choice-input', ChoiceInput);
});
@@ -68,16 +70,19 @@ describe('ChoiceInputMixin', () => {
let counter = 0;
const el = await fixture(html`
{
+ @user-input-changed="${() => {
counter += 1;
- }}
- >
+ }}"
+ >
+
+
`);
expect(counter).to.equal(0);
// Here we try to mimic user interaction by firing browser events
const nativeInput = el.inputElement;
nativeInput.dispatchEvent(new CustomEvent('input', { bubbles: true })); // fired by (at least) Chrome
expect(counter).to.equal(0);
+ el._syncValueUpwards = () => {}; // We need to disable the method for the test to pass
nativeInput.dispatchEvent(new CustomEvent('change', { bubbles: true }));
expect(counter).to.equal(1);
});
@@ -117,6 +122,7 @@ describe('ChoiceInputMixin', () => {
it('can be checked and unchecked via user interaction', async () => {
const el = await fixture(``);
+ el._syncValueUpwards = () => {}; // We need to disable the method for the test to pass
el.inputElement.click();
expect(el.checked).to.be.true;
el.inputElement.click();