import { expect } from '@open-wc/testing'; /** * Shared test utilities for property editor components */ /** * Type definitions for better domain modeling */ export type UmbPropertyEditorElement = { config?: unknown; }; export type UmbShadowDOMElement = { shadowRoot?: ShadowRoot | null; }; export type UmbSingleSelectElement = { value: string; } & UmbShadowDOMElement; export type UmbMultiSelectElement = { value: string[]; } & UmbShadowDOMElement; export interface UmbConfigItem { name: string; value: string; } export interface UmbTestDataEntry { value: T; expected: T; } export type UmbConfigAlias = 'items' | 'multiple'; export type UmbCSSSelector = 'uui-select' | 'umb-input-checkbox-list' | 'umb-input-dropdown-list'; /** * Helper function to setup basic string array configuration * @param {UmbPropertyEditorElement} element - The property editor element to configure * @param {string[]} items - Array of string items for configuration */ export declare function setupBasicStringConfig(element: UmbPropertyEditorElement, items?: string[]): void; /** * Helper function to setup object array configuration * @param {UmbPropertyEditorElement} element - The property editor element to configure * @param {UmbConfigItem[]} items - Array of object items for configuration */ export declare function setupObjectConfig(element: UmbPropertyEditorElement, items?: UmbConfigItem[]): void; /** * Helper function to setup empty configuration * @param {UmbPropertyEditorElement} element - The property editor element to configure */ export declare function setupEmptyConfig(element: UmbPropertyEditorElement): void; /** * Helper function to get select element from shadow DOM * @param {UmbShadowDOMElement} element - The property editor element * @returns {Element | null} The UUI select element or null */ export declare function getSelectElement(element: UmbShadowDOMElement): import("@umbraco-ui/uui-select").UUISelectElement | import("../../core/components/index.js").UmbInputDropdownListElement | import("../checkbox-list/components/index.js").UmbInputCheckboxListElement | null | undefined; /** * Helper function to get checkbox list element from shadow DOM * @param {UmbShadowDOMElement} element - The property editor element * @returns {Element | null} The checkbox list element or null */ export declare function getCheckboxListElement(element: UmbShadowDOMElement): import("@umbraco-ui/uui-select").UUISelectElement | import("../../core/components/index.js").UmbInputDropdownListElement | import("../checkbox-list/components/index.js").UmbInputCheckboxListElement | null | undefined; /** * Helper function to get dropdown element from shadow DOM * @param {UmbShadowDOMElement} element - The property editor element * @returns {Element | null} The dropdown element or null */ export declare function getDropdownElement(element: UmbShadowDOMElement): import("@umbraco-ui/uui-select").UUISelectElement | import("../../core/components/index.js").UmbInputDropdownListElement | import("../checkbox-list/components/index.js").UmbInputCheckboxListElement | null | undefined; /** * Helper function to get selected value from select DOM * @param {UmbShadowDOMElement} element - The property editor element * @returns {string} The selected value string */ export declare function getSelectedValue(element: UmbShadowDOMElement): string; /** * Helper function to get selection from checkbox list DOM * @param {UmbShadowDOMElement} element - The property editor element * @returns {string[]} Array of selected values */ export declare function getCheckboxSelection(element: UmbShadowDOMElement): string[]; /** * Helper function to get selection from dropdown DOM * @param {UmbShadowDOMElement} element - The property editor element * @returns {string[]} Array of selected values */ export declare function getDropdownSelection(element: UmbShadowDOMElement): string[]; /** * Helper function to verify both value and DOM state for single select * @param {UmbSingleSelectElement} element - The property editor element * @param {string} expectedValue - Expected element value * @param {string} expectedSelected - Expected selected value in DOM */ export declare function verifySelectValueAndDOM(element: UmbSingleSelectElement, expectedValue: string, expectedSelected: string): void; /** * Helper function to verify both value and DOM state for multi-select * @param {UmbMultiSelectElement} element - The property editor element * @param {string[]} expectedValue - Expected element value array * @param {string[]} expectedSelection - Expected selection array in DOM */ export declare function verifyMultiSelectValueAndDOM(element: UmbMultiSelectElement, expectedValue: string[], expectedSelection: string[]): void; /** * Helper function to verify both value and DOM state for dropdown * @param {UmbMultiSelectElement} element - The property editor element * @param {string[]} expectedValue - Expected element value array * @param {string[]} expectedSelection - Expected selection array in DOM */ export declare function verifyDropdownValueAndDOM(element: UmbMultiSelectElement, expectedValue: string[], expectedSelection: string[]): void; /** * Common test data for multiple updates */ export declare const SINGLE_SELECT_TEST_DATA: UmbTestDataEntry[]; export declare const MULTI_SELECT_TEST_DATA: UmbTestDataEntry[]; export { expect };