Fixed failing test
The "document" package needed to be imported at runtime.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { UmbContentPickerSource } from '../../types.js';
|
||||
import { css, html, customElement, property, state } from '@umbraco-cms/backoffice/external/lit';
|
||||
import { css, html, customElement, property } from '@umbraco-cms/backoffice/external/lit';
|
||||
import { UmbChangeEvent } from '@umbraco-cms/backoffice/event';
|
||||
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
|
||||
import type { UmbReferenceByUniqueAndType } from '@umbraco-cms/backoffice/models';
|
||||
@@ -13,7 +13,7 @@ const elementName = 'umb-input-content';
|
||||
export class UmbInputContentElement extends UmbFormControlMixin<string | undefined, typeof UmbLitElement>(
|
||||
UmbLitElement,
|
||||
) {
|
||||
@property({ type: Object, attribute: false })
|
||||
@property()
|
||||
public set type(newType: UmbContentPickerSource['type']) {
|
||||
const oldType = this.#type;
|
||||
if (newType?.toLowerCase() !== this.#type) {
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
import { UmbInputContentElement } from './input-content.element.js';
|
||||
import { expect, fixture, html } from '@open-wc/testing';
|
||||
import { type UmbTestRunnerWindow, defaultA11yConfig } from '@umbraco-cms/internal/test-utils';
|
||||
import { defaultA11yConfig } from '@umbraco-cms/internal/test-utils';
|
||||
import type { UmbTestRunnerWindow } from '@umbraco-cms/internal/test-utils';
|
||||
|
||||
import '@umbraco-cms/backoffice/document';
|
||||
|
||||
describe('UmbInputContentElement', () => {
|
||||
let element: UmbInputContentElement;
|
||||
|
||||
beforeEach(async () => {
|
||||
element = await fixture(html` <umb-input-content></umb-input-content> `);
|
||||
element = await fixture(html`<umb-input-content></umb-input-content>`);
|
||||
});
|
||||
|
||||
it('is defined with its own instance', () => {
|
||||
|
||||
Reference in New Issue
Block a user