From afc5916efdcee716aab0424a0d587dbe8726d961 Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Thu, 27 Jul 2023 13:12:43 +0200 Subject: [PATCH] use test helper elementUpdated() --- .../core/localization/localize.element.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/localization/localize.element.test.ts b/src/Umbraco.Web.UI.Client/src/packages/core/localization/localize.element.test.ts index d26496e7fa..41522e66ca 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/localization/localize.element.test.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/localization/localize.element.test.ts @@ -1,4 +1,4 @@ -import { aTimeout, expect, fixture, html } from '@open-wc/testing'; +import { aTimeout, elementUpdated, expect, fixture, html } from '@open-wc/testing'; import { UmbLocalizeElement } from './localize.element.js'; import { UMB_LOCALIZATION_CONTEXT, @@ -71,25 +71,25 @@ describe('umb-localize', () => { }); it('should localize a key', async () => { - await element.updateComplete; + await elementUpdated(element); expect(element.shadowRoot?.innerHTML).to.contain('Close'); }); it('should change the value if a new key is set', async () => { - await element.updateComplete; + await elementUpdated(element); expect(element.shadowRoot?.innerHTML).to.contain('Close'); element.key = 'general_logout'; - await element.updateComplete; + await elementUpdated(element); expect(element.shadowRoot?.innerHTML).to.contain('Log out'); }); it('should change the value if the language is changed', async () => { - await element.updateComplete; + await elementUpdated(element); expect(element.shadowRoot?.innerHTML).to.contain('Close'); context.setLanguage(danish.meta.culture); - await element.updateComplete; + await elementUpdated(element); await aTimeout(0);