Skip to content

Commit 02bd38e

Browse files
authored
test: add test for removing slotted helper (#4209)
1 parent d300071 commit 02bd38e

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

‎packages/field-base/test/field-mixin.test.js‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,12 @@ const runTests = (baseClass) => {
423423
await nextFrame();
424424
expect(helper.textContent).to.not.equal('3 digits');
425425
});
426+
427+
it('should remove has-helper attribute when slotted helper is removed', async () => {
428+
element.removeChild(helper);
429+
await nextFrame();
430+
expect(element.hasAttribute('has-helper')).to.be.false;
431+
});
426432
});
427433

428434
describe('slotted with property', () => {
@@ -751,11 +757,11 @@ const runTests = (baseClass) => {
751757
describe('slotted label', () => {
752758
beforeEach(async () => {
753759
element = fixtureSync(`
754-
<${tag}>
755-
<label slot="label">Label</label>
756-
<input slot="input">
757-
</${tag}>
758-
`);
760+
<${tag}>
761+
<label slot="label">Label</label>
762+
<input slot="input">
763+
</${tag}>
764+
`);
759765
await nextRender();
760766
input = element.querySelector('[slot=input]');
761767
label = element.querySelector('[slot=label]');

0 commit comments

Comments
 (0)