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>
18 lines
681 B
JavaScript
18 lines
681 B
JavaScript
/* eslint-env mocha */
|
|
import { expect, fixture } from '@open-wc/testing';
|
|
|
|
import '../lion-input-email.js';
|
|
|
|
describe('<lion-input-email>', () => {
|
|
it('has a type = text', async () => {
|
|
const lionInputEmail = await fixture(`<lion-input-email></lion-input-email>`);
|
|
expect(lionInputEmail.inputElement.type).to.equal('text');
|
|
});
|
|
|
|
it('has validator "isEmail" applied by default', async () => {
|
|
// More eloborate tests can be found in lion-validate/validators.js
|
|
const lionInputEmail = await fixture(`<lion-input-email></lion-input-email>`);
|
|
lionInputEmail.modelValue = 'foo@bar@example.com';
|
|
expect(lionInputEmail.errorState).to.equal(true);
|
|
});
|
|
});
|