update tests for localize element
This commit is contained in:
@@ -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`<umb-localize key="general_close">Fallback value</umb-localize>`);
|
||||
});
|
||||
|
||||
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');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user