chore: clean test logs
This commit is contained in:
parent
2823940ece
commit
fef94cd016
3 changed files with 12 additions and 5 deletions
|
|
@ -140,7 +140,7 @@ describe('ScopedElementsMixin', () => {
|
|||
}
|
||||
customElements.define('scoped-elements-host-no-reg-2', ScopedElementsHostNoReg2);
|
||||
|
||||
const errorSpy = sinon.spy(console, 'error');
|
||||
const errorStub = sinon.stub(console, 'error');
|
||||
/** @type {ScopedElementsHostNoReg2} */ (
|
||||
await fixture(html`<scoped-elements-host-no-reg></scoped-elements-host-no-reg>`)
|
||||
);
|
||||
|
|
@ -148,7 +148,7 @@ describe('ScopedElementsMixin', () => {
|
|||
await fixture(html`<scoped-elements-host-no-reg-2></scoped-elements-host-no-reg-2>`)
|
||||
);
|
||||
|
||||
expect(errorSpy.args[0][0]).to.equal(
|
||||
expect(errorStub.args[0][0]).to.equal(
|
||||
[
|
||||
'You are trying to re-register the "scoped-elements-child-no-reg" custom element with a different class via ScopedElementsMixin.',
|
||||
'This is only possible with a CustomElementRegistry.',
|
||||
|
|
@ -158,7 +158,7 @@ describe('ScopedElementsMixin', () => {
|
|||
'For more details you can visit https://open-wc.org/docs/development/scoped-elements/',
|
||||
].join('\n'),
|
||||
);
|
||||
errorSpy.restore();
|
||||
errorStub.restore();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import { html } from 'lit';
|
|||
import { isActiveElement } from '../../core/test-helpers/isActiveElement.js';
|
||||
import { getAllTagNames } from './helpers/helpers.js';
|
||||
import './helpers/umbrella-form.js';
|
||||
|
||||
/**
|
||||
* @typedef {import('./helpers/umbrella-form.js').UmbrellaForm} UmbrellaForm
|
||||
* @typedef {import('../../dialog/src/LionDialog.js').LionDialog} LionDialog
|
||||
|
|
@ -25,10 +26,12 @@ describe('Form inside dialog Integrations', () => {
|
|||
</lion-dialog>`,
|
||||
);
|
||||
|
||||
// @ts-ignore
|
||||
const formEl = /** @type {LionForm} */ (el._overlayCtrl.contentNode._lionFormNode);
|
||||
// @ts-expect-error [allow-protected-in-tests]
|
||||
const umbrellaEl = el._overlayCtrl.contentNode;
|
||||
const formEl = /** @type {LionForm} */ (umbrellaEl._lionFormNode);
|
||||
await formEl.registrationComplete;
|
||||
const registeredEls = getAllTagNames(formEl);
|
||||
await umbrellaEl.waitForAllChildrenUpdates();
|
||||
|
||||
expect(registeredEls).to.eql([
|
||||
'lion-fieldset',
|
||||
|
|
@ -86,6 +89,7 @@ describe('Form inside dialog Integrations', () => {
|
|||
</div>
|
||||
</lion-dialog>
|
||||
`);
|
||||
|
||||
// @ts-expect-error [allow-protected-in-tests]
|
||||
el._overlayInvokerNode.click();
|
||||
const lionInput = el.querySelector('[name="input"]');
|
||||
|
|
|
|||
|
|
@ -44,5 +44,8 @@ export default {
|
|||
playwrightLauncher({ product: 'webkit' }),
|
||||
],
|
||||
groups,
|
||||
filterBrowserLogs(/** @type {{ type: 'error'|'warn'|'debug'; args: string[] }} */ log) {
|
||||
return log.type === 'error' || log.type === 'debug';
|
||||
},
|
||||
plugins: [litSsrPlugin()],
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue