import { expect, html, fixture, nextFrame } from '@open-wc/testing'; import { localizeTearDown } from '@lion/localize/test-helpers.js'; import { Required } from '@lion/validate'; import '@lion/checkbox/lion-checkbox.js'; import '../lion-checkbox-group.js'; beforeEach(() => { localizeTearDown(); }); describe('', () => { it('can be required', async () => { const el = await fixture(html` `); await nextFrame(); expect(el.hasFeedbackFor).to.deep.equal(['error']); expect(el.validationStates.error.Required).to.be.true; el.formElements['sports[]'][0].checked = true; expect(el.hasFeedbackFor).to.deep.equal([]); }); it('is accessible', async () => { const el = await fixture(html` `); await expect(el).to.be.accessible(); }); it('is accessible when pre-selected', async () => { const el = await fixture(html` `); await expect(el).to.be.accessible(); }); it('is accessible when disabled', async () => { const el = await fixture(html` `); await expect(el).to.be.accessible(); }); });