diff --git a/packages/ui/components/core/test/ScopedElementsMixin.test.js b/packages/ui/components/core/test/ScopedElementsMixin.test.js index 7aea78c1f..64c281b16 100644 --- a/packages/ui/components/core/test/ScopedElementsMixin.test.js +++ b/packages/ui/components/core/test/ScopedElementsMixin.test.js @@ -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``) ); @@ -148,7 +148,7 @@ describe('ScopedElementsMixin', () => { await fixture(html``) ); - 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(); }); }); }); diff --git a/packages/ui/components/form-integrations/test/dialog-integrations.test.js b/packages/ui/components/form-integrations/test/dialog-integrations.test.js index 9e68e54a3..115dce2f1 100644 --- a/packages/ui/components/form-integrations/test/dialog-integrations.test.js +++ b/packages/ui/components/form-integrations/test/dialog-integrations.test.js @@ -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', () => { `, ); - // @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', () => { `); + // @ts-expect-error [allow-protected-in-tests] el._overlayInvokerNode.click(); const lionInput = el.querySelector('[name="input"]'); diff --git a/web-test-runner.config.mjs b/web-test-runner.config.mjs index 033fab500..724171eae 100644 --- a/web-test-runner.config.mjs +++ b/web-test-runner.config.mjs @@ -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()], };