Add test
This commit is contained in:
parent
1f92d5d6a5
commit
1a4f49719d
1 changed files with 11 additions and 0 deletions
|
|
@ -158,6 +158,17 @@ describe('lion-input-file', () => {
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
it('error should not be there when the file extensions are accepted', async () => {
|
||||||
|
const el = await fixture(html`
|
||||||
|
<lion-input-file label="Select" accept=".txt"></lion-input-file>
|
||||||
|
`);
|
||||||
|
|
||||||
|
mimicSelectFile(el, [fileWrongType]);
|
||||||
|
await el.updateComplete;
|
||||||
|
|
||||||
|
expect(el.hasFeedbackFor.length).to.equal(0);
|
||||||
|
});
|
||||||
|
|
||||||
it('should not be added to the selected list', async () => {
|
it('should not be added to the selected list', async () => {
|
||||||
const el = await fixture(html`
|
const el = await fixture(html`
|
||||||
<lion-input-file label="Select" accept="text/plain"></lion-input-file>
|
<lion-input-file label="Select" accept="text/plain"></lion-input-file>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue