Co-authored-by: Mikhail Bashkirov <mikhail.bashkirov@ing.com> Co-authored-by: Thijs Louisse <thijs.louisse@ing.com> Co-authored-by: Joren Broekema <joren.broekema@ing.com> Co-authored-by: Gerjan van Geest <gerjan.van.geest@ing.com> Co-authored-by: Erik Kroes <erik.kroes@ing.com> Co-authored-by: Lars den Bakker <lars.den.bakker@ing.com>
19 lines
561 B
JavaScript
19 lines
561 B
JavaScript
/* eslint-env mocha */
|
|
import { expect, fixture, html } from '@open-wc/testing';
|
|
|
|
import '../lion-select.js';
|
|
|
|
describe('lion-select', () => {
|
|
it('can preselect an option', async () => {
|
|
const lionSelect = await fixture(html`
|
|
<lion-select .modelValue="${'nr2'}">
|
|
<label slot="label"></label>
|
|
<select slot="input">
|
|
<option value="nr1">Item 1</option>
|
|
<option value="nr2">Item 2</option>
|
|
</select>
|
|
</lion-select>
|
|
`);
|
|
expect(lionSelect.querySelector('select').value).to.equal('nr2');
|
|
});
|
|
});
|