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>
32 lines
928 B
JavaScript
32 lines
928 B
JavaScript
/* eslint-env mocha */
|
|
/* eslint-disable class-methods-use-this, no-underscore-dangle, max-len */
|
|
import { expect, fixture, defineCE } from '@open-wc/testing';
|
|
import { LionField } from '../src/LionField.js';
|
|
|
|
import { FieldCustomMixin } from '../src/FieldCustomMixin.js';
|
|
|
|
describe('FieldCustomMixin', () => {
|
|
const inputSlot = '<input slot="input" />';
|
|
let elem;
|
|
|
|
before(async () => {
|
|
const FieldCustomMixinClass = class extends FieldCustomMixin(LionField) {
|
|
static get properties() {
|
|
return {
|
|
...super.properties,
|
|
modelValue: {
|
|
type: String,
|
|
},
|
|
};
|
|
}
|
|
};
|
|
elem = defineCE(FieldCustomMixinClass);
|
|
});
|
|
|
|
it('has the capability to disable help text', async () => {
|
|
const lionField = await fixture(`
|
|
<${elem} disable-help-text>${inputSlot}</${elem}>
|
|
`);
|
|
expect(lionField.$$slot('help-text')).to.equal(undefined);
|
|
});
|
|
});
|