import { expect, fixture } from '@open-wc/testing'; import '../lion-input.js'; describe('', () => { it('delegates readOnly property and readonly attribute', async () => { const el = await fixture( ``, ); expect(el.inputElement.readOnly).to.equal(true); el.readOnly = false; await el.updateComplete; expect(el.readOnly).to.equal(false); expect(el.inputElement.readOnly).to.equal(false); }); it('delegates "step" attribute and property', async () => { const el = await fixture(``); expect(el.inputElement.step).to.equal('0.01'); // TODO: activate when DelegateMixin is refactored // const el2 = await fixture(``); // expect(el2.inputElement.step).to.equal('0.02'); }); it('automatically creates an element if not provided by user', async () => { const el = await fixture(``); expect(el.querySelector('input')).to.equal(el.inputElement); }); });