From 5575d42d8f02976736b836b9c402d77cecb8f5f7 Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Thu, 3 Aug 2023 12:10:03 +0200 Subject: [PATCH] update tests for localize element --- .../src/packages/core/localization/localize.element.test.ts | 5 +++++ 1 file changed, 5 insertions(+) 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 bd47bbaba2..3e46e024bb 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 @@ -2,6 +2,7 @@ import { aTimeout, elementUpdated, expect, fixture, html } from '@open-wc/testin import { umbTranslationRegistry } from '@umbraco-cms/backoffice/localization'; import { UmbLocalizeElement } from './localize.element.js'; import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry'; +import { UmbLocalizeController } from '@umbraco-cms/backoffice/localization-api'; const english = { type: 'translations', @@ -60,6 +61,10 @@ describe('umb-localize', () => { element = await fixture(html`Fallback value`); }); + it('should have a localize controller', () => { + expect(element.localize).to.be.instanceOf(UmbLocalizeController); + }); + it('should localize a key', async () => { expect(element.shadowRoot?.innerHTML).to.contain('Close'); });