{"version":3,"file":"testbed.mjs","sources":["../../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/testing/testbed/task-state-zone-interceptor.ts","../../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/testing/testbed/fake-events/event-objects.ts","../../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/testing/testbed/fake-events/dispatch-events.ts","../../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/testing/testbed/fake-events/element-focus.ts","../../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/testing/testbed/fake-events/type-in-element.ts","../../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/testing/testbed/unit-test-element.ts","../../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/testing/testbed/testbed-harness-environment.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {ProxyZone, ProxyZoneStatic} from './proxy-zone-types';\n\n/** Current state of the intercepted zone. */\nexport interface TaskState {\n /** Whether the zone is stable (i.e. no microtasks and macrotasks). */\n stable: boolean;\n}\n\n/** Unique symbol that is used to patch a property to a proxy zone. */\nconst stateObservableSymbol = Symbol('ProxyZone_PATCHED#stateObservable');\n\n/** Type that describes a potentially patched proxy zone instance. */\ntype PatchedProxyZone = ProxyZone & {\n [stateObservableSymbol]: undefined | Observable;\n};\n\n/**\n * Interceptor that can be set up in a `ProxyZone` instance. The interceptor\n * will keep track of the task state and emit whenever the state changes.\n *\n * This serves as a workaround for https://github.com/angular/angular/issues/32896.\n */\nexport class TaskStateZoneInterceptor {\n private _lastState: HasTaskState | null = null;\n\n /** Subject that can be used to emit a new state change. */\n private readonly _stateSubject = new BehaviorSubject(\n this._lastState ? this._getTaskStateFromInternalZoneState(this._lastState) : {stable: true},\n );\n\n /** Public observable that emits whenever the task state changes. */\n readonly state: Observable = this._stateSubject;\n\n constructor(lastState: HasTaskState | null) {\n this._lastState = lastState;\n }\n\n /** This will be called whenever the task state changes in the intercepted zone. */\n onHasTask(delegate: ZoneDelegate, current: Zone, target: Zone, hasTaskState: HasTaskState) {\n if (current === target) {\n this._stateSubject.next(this._getTaskStateFromInternalZoneState(hasTaskState));\n }\n }\n\n /** Gets the task state from the internal ZoneJS task state. */\n private _getTaskStateFromInternalZoneState(state: HasTaskState): TaskState {\n return {stable: !state.macroTask && !state.microTask};\n }\n\n /**\n * Sets up the custom task state Zone interceptor in the `ProxyZone`. Throws if\n * no `ProxyZone` could be found.\n * @returns an observable that emits whenever the task state changes.\n */\n static setup(): Observable {\n if (Zone === undefined) {\n throw Error(\n 'Could not find ZoneJS. For test harnesses running in TestBed, ' +\n 'ZoneJS needs to be installed.',\n );\n }\n\n // tslint:disable-next-line:variable-name\n const ProxyZoneSpec = (Zone as any)['ProxyZoneSpec'] as ProxyZoneStatic | undefined;\n\n // If there is no \"ProxyZoneSpec\" installed, we throw an error and recommend\n // setting up the proxy zone by pulling in the testing bundle.\n if (!ProxyZoneSpec) {\n throw Error(\n 'ProxyZoneSpec is needed for the test harnesses but could not be found. ' +\n 'Please make sure that your environment includes zone.js/dist/zone-testing.js',\n );\n }\n\n // Ensure that there is a proxy zone instance set up, and get\n // a reference to the instance if present.\n const zoneSpec = ProxyZoneSpec.assertPresent() as PatchedProxyZone;\n\n // If there already is a delegate registered in the proxy zone, and it\n // is type of the custom task state interceptor, we just use that state\n // observable. This allows us to only intercept Zone once per test\n // (similar to how `fakeAsync` or `async` work).\n if (zoneSpec[stateObservableSymbol]) {\n return zoneSpec[stateObservableSymbol]!;\n }\n\n // Since we intercept on environment creation and the fixture has been\n // created before, we might have missed tasks scheduled before. Fortunately\n // the proxy zone keeps track of the previous task state, so we can just pass\n // this as initial state to the task zone interceptor.\n const interceptor = new TaskStateZoneInterceptor(zoneSpec.lastTaskState);\n const zoneSpecOnHasTask = zoneSpec.onHasTask.bind(zoneSpec);\n\n // We setup the task state interceptor in the `ProxyZone`. Note that we cannot register\n // the interceptor as a new proxy zone delegate because it would mean that other zone\n // delegates (e.g. `FakeAsyncTestZone` or `AsyncTestZone`) can accidentally overwrite/disable\n // our interceptor. Since we just intend to monitor the task state of the proxy zone, it is\n // sufficient to just patch the proxy zone. This also avoids that we interfere with the task\n // queue scheduling logic.\n zoneSpec.onHasTask = function (...args: [ZoneDelegate, Zone, Zone, HasTaskState]) {\n zoneSpecOnHasTask(...args);\n interceptor.onHasTask(...args);\n };\n\n return (zoneSpec[stateObservableSymbol] = interceptor.state);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ModifierKeys} from '../../test-element';\n\n/** Used to generate unique IDs for events. */\nlet uniqueIds = 0;\n\n/**\n * Creates a browser MouseEvent with the specified options.\n * @docs-private\n */\nexport function createMouseEvent(\n type: string,\n clientX = 0,\n clientY = 0,\n offsetX = 0,\n offsetY = 0,\n button = 0,\n modifiers: ModifierKeys = {},\n) {\n // Note: We cannot determine the position of the mouse event based on the screen\n // because the dimensions and position of the browser window are not available\n // To provide reasonable `screenX` and `screenY` coordinates, we simply use the\n // client coordinates as if the browser is opened in fullscreen.\n const screenX = clientX;\n const screenY = clientY;\n\n const event = new MouseEvent(type, {\n bubbles: true,\n cancelable: true,\n composed: true, // Required for shadow DOM events.\n view: window,\n detail: 1,\n relatedTarget: null,\n screenX,\n screenY,\n clientX,\n clientY,\n ctrlKey: modifiers.control,\n altKey: modifiers.alt,\n shiftKey: modifiers.shift,\n metaKey: modifiers.meta,\n button: button,\n buttons: 1,\n });\n\n // The `MouseEvent` constructor doesn't allow us to pass these properties into the constructor.\n // Override them to `1`, because they're used for fake screen reader event detection.\n if (offsetX != null) {\n defineReadonlyEventProperty(event, 'offsetX', offsetX);\n }\n\n if (offsetY != null) {\n defineReadonlyEventProperty(event, 'offsetY', offsetY);\n }\n\n return event;\n}\n\n/**\n * Creates a browser `PointerEvent` with the specified options. Pointer events\n * by default will appear as if they are the primary pointer of their type.\n * https://www.w3.org/TR/pointerevents2/#dom-pointerevent-isprimary.\n *\n * For example, if pointer events for a multi-touch interaction are created, the non-primary\n * pointer touches would need to be represented by non-primary pointer events.\n *\n * @docs-private\n */\nexport function createPointerEvent(\n type: string,\n clientX = 0,\n clientY = 0,\n offsetX?: number,\n offsetY?: number,\n options: PointerEventInit = {isPrimary: true},\n) {\n const event = new PointerEvent(type, {\n bubbles: true,\n cancelable: true,\n composed: true, // Required for shadow DOM events.\n view: window,\n clientX,\n clientY,\n ...options,\n });\n\n if (offsetX != null) {\n defineReadonlyEventProperty(event, 'offsetX', offsetX);\n }\n\n if (offsetY != null) {\n defineReadonlyEventProperty(event, 'offsetY', offsetY);\n }\n\n return event;\n}\n\n/**\n * Creates a browser TouchEvent with the specified pointer coordinates.\n * @docs-private\n */\nexport function createTouchEvent(type: string, pageX = 0, pageY = 0, clientX = 0, clientY = 0) {\n // We cannot use the `TouchEvent` or `Touch` because Firefox and Safari lack support.\n // TODO: Switch to the constructor API when it is available for Firefox and Safari.\n const event = document.createEvent('UIEvent');\n const touchDetails = {pageX, pageY, clientX, clientY, identifier: uniqueIds++};\n\n // TS3.6 removes the initUIEvent method and suggests porting to \"new UIEvent()\".\n (event as any).initUIEvent(type, true, true, window, 0);\n\n // Most of the browsers don't have a \"initTouchEvent\" method that can be used to define\n // the touch details.\n defineReadonlyEventProperty(event, 'touches', [touchDetails]);\n defineReadonlyEventProperty(event, 'targetTouches', [touchDetails]);\n defineReadonlyEventProperty(event, 'changedTouches', [touchDetails]);\n\n return event;\n}\n\n/**\n * Creates a keyboard event with the specified key and modifiers.\n * @docs-private\n */\nexport function createKeyboardEvent(\n type: string,\n keyCode: number = 0,\n key: string = '',\n modifiers: ModifierKeys = {},\n code: string = '',\n) {\n return new KeyboardEvent(type, {\n bubbles: true,\n cancelable: true,\n composed: true, // Required for shadow DOM events.\n view: window,\n keyCode,\n key,\n shiftKey: modifiers.shift,\n metaKey: modifiers.meta,\n altKey: modifiers.alt,\n ctrlKey: modifiers.control,\n code,\n });\n}\n\n/**\n * Creates a fake event object with any desired event type.\n * @docs-private\n */\nexport function createFakeEvent(type: string, bubbles = false, cancelable = true, composed = true) {\n return new Event(type, {bubbles, cancelable, composed});\n}\n\n/**\n * Defines a readonly property on the given event object. Readonly properties on an event object\n * are always set as configurable as that matches default readonly properties for DOM event objects.\n */\nfunction defineReadonlyEventProperty(event: Event, propertyName: string, value: any) {\n Object.defineProperty(event, propertyName, {get: () => value, configurable: true});\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ModifierKeys} from '../../test-element';\nimport {\n createFakeEvent,\n createKeyboardEvent,\n createMouseEvent,\n createPointerEvent,\n createTouchEvent,\n} from './event-objects';\n\n/**\n * Utility to dispatch any event on a Node.\n * @docs-private\n */\nexport function dispatchEvent(node: Node | Window, event: T): T {\n node.dispatchEvent(event);\n return event;\n}\n\n/**\n * Shorthand to dispatch a fake event on a specified node.\n * @docs-private\n */\nexport function dispatchFakeEvent(node: Node | Window, type: string, bubbles?: boolean): Event {\n return dispatchEvent(node, createFakeEvent(type, bubbles));\n}\n\n/**\n * Shorthand to dispatch a keyboard event with a specified key code and\n * optional modifiers.\n * @docs-private\n */\nexport function dispatchKeyboardEvent(\n node: Node,\n type: string,\n keyCode?: number,\n key?: string,\n modifiers?: ModifierKeys,\n code?: string,\n): KeyboardEvent {\n return dispatchEvent(node, createKeyboardEvent(type, keyCode, key, modifiers, code));\n}\n\n/**\n * Shorthand to dispatch a mouse event on the specified coordinates.\n * @docs-private\n */\nexport function dispatchMouseEvent(\n node: Node,\n type: string,\n clientX = 0,\n clientY = 0,\n offsetX?: number,\n offsetY?: number,\n button?: number,\n modifiers?: ModifierKeys,\n): MouseEvent {\n return dispatchEvent(\n node,\n createMouseEvent(type, clientX, clientY, offsetX, offsetY, button, modifiers),\n );\n}\n\n/**\n * Shorthand to dispatch a pointer event on the specified coordinates.\n * @docs-private\n */\nexport function dispatchPointerEvent(\n node: Node,\n type: string,\n clientX = 0,\n clientY = 0,\n offsetX?: number,\n offsetY?: number,\n options?: PointerEventInit,\n): PointerEvent {\n return dispatchEvent(\n node,\n createPointerEvent(type, clientX, clientY, offsetX, offsetY, options),\n ) as PointerEvent;\n}\n\n/**\n * Shorthand to dispatch a touch event on the specified coordinates.\n * @docs-private\n */\nexport function dispatchTouchEvent(\n node: Node,\n type: string,\n pageX = 0,\n pageY = 0,\n clientX = 0,\n clientY = 0,\n) {\n return dispatchEvent(node, createTouchEvent(type, pageX, pageY, clientX, clientY));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {dispatchFakeEvent} from './dispatch-events';\n\nfunction triggerFocusChange(element: HTMLElement, event: 'focus' | 'blur') {\n let eventFired = false;\n const handler = () => (eventFired = true);\n element.addEventListener(event, handler);\n element[event]();\n element.removeEventListener(event, handler);\n if (!eventFired) {\n dispatchFakeEvent(element, event);\n }\n}\n\n/**\n * Patches an elements focus and blur methods to emit events consistently and predictably.\n * This is necessary, because some browsers can call the focus handlers asynchronously,\n * while others won't fire them at all if the browser window is not focused.\n * @docs-private\n */\n// TODO: Check if this element focus patching is still needed for local testing,\n// where browser is not necessarily focused.\nexport function patchElementFocus(element: HTMLElement) {\n element.focus = () => dispatchFakeEvent(element, 'focus');\n element.blur = () => dispatchFakeEvent(element, 'blur');\n}\n\n/** @docs-private */\nexport function triggerFocus(element: HTMLElement) {\n triggerFocusChange(element, 'focus');\n}\n\n/** @docs-private */\nexport function triggerBlur(element: HTMLElement) {\n triggerFocusChange(element, 'blur');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {PERIOD} from '../../../keycodes';\nimport {ModifierKeys} from '../../test-element';\nimport {getNoKeysSpecifiedError} from '../../test-element-errors';\nimport {dispatchFakeEvent, dispatchKeyboardEvent} from './dispatch-events';\nimport {triggerFocus} from './element-focus';\n\n/** Input types for which the value can be entered incrementally. */\nconst incrementalInputTypes = new Set([\n 'text',\n 'email',\n 'hidden',\n 'password',\n 'search',\n 'tel',\n 'url',\n]);\n\n/**\n * Manual mapping of some common characters to their `code` in a keyboard event. Non-exhaustive, see\n * the tables on MDN for more info: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode\n */\nconst charsToCodes: Record = {\n ' ': 'Space',\n '.': 'Period',\n ',': 'Comma',\n '`': 'Backquote',\n '-': 'Minus',\n '=': 'Equal',\n '[': 'BracketLeft',\n ']': 'BracketRight',\n '\\\\': 'Backslash',\n '/': 'Slash',\n \"'\": 'Quote',\n '\"': 'Quote',\n ';': 'Semicolon',\n};\n\n/**\n * Determines the `KeyboardEvent.key` from a character. See #27034 and\n * https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code\n */\nfunction getKeyboardEventCode(char: string): string {\n if (char.length !== 1) {\n return '';\n }\n\n const charCode = char.charCodeAt(0);\n\n // Key is a letter between a and z, uppercase or lowercase.\n if ((charCode >= 97 && charCode <= 122) || (charCode >= 65 && charCode <= 90)) {\n return `Key${char.toUpperCase()}`;\n }\n\n // Digits from 0 to 9.\n if (48 <= charCode && charCode <= 57) {\n return `Digit${char}`;\n }\n\n return charsToCodes[char] ?? '';\n}\n\n/**\n * Checks whether the given Element is a text input element.\n * @docs-private\n */\nexport function isTextInput(element: Element): element is HTMLInputElement | HTMLTextAreaElement {\n const nodeName = element.nodeName.toLowerCase();\n return nodeName === 'input' || nodeName === 'textarea';\n}\n\n/**\n * If keys have been specified, focuses an input, sets its value and dispatches\n * the `input` event, simulating the user typing.\n * @param element Element onto which to set the value.\n * @param keys The keys to send to the element.\n * @docs-private\n */\nexport function typeInElement(\n element: HTMLElement,\n ...keys: (string | {keyCode?: number; key?: string})[]\n): void;\n\n/**\n * If keys have been specified, focuses an input, sets its value and dispatches\n * the `input` event, simulating the user typing.\n * @param element Element onto which to set the value.\n * @param modifiers Modifier keys that are held while typing.\n * @param keys The keys to send to the element.\n * @docs-private\n */\nexport function typeInElement(\n element: HTMLElement,\n modifiers: ModifierKeys,\n ...keys: (string | {keyCode?: number; key?: string})[]\n): void;\n\nexport function typeInElement(element: HTMLElement, ...modifiersAndKeys: any[]) {\n const first = modifiersAndKeys[0];\n let modifiers: ModifierKeys;\n let rest: (string | {keyCode?: number; key?: string; code?: string})[];\n if (\n first !== undefined &&\n typeof first !== 'string' &&\n first.keyCode === undefined &&\n first.key === undefined\n ) {\n modifiers = first;\n rest = modifiersAndKeys.slice(1);\n } else {\n modifiers = {};\n rest = modifiersAndKeys;\n }\n const isInput = isTextInput(element);\n const inputType = element.getAttribute('type') || 'text';\n const keys: {keyCode?: number; key?: string; code?: string}[] = rest\n .map(k =>\n typeof k === 'string'\n ? k.split('').map(c => ({\n keyCode: c.toUpperCase().charCodeAt(0),\n key: c,\n code: getKeyboardEventCode(c),\n }))\n : [k],\n )\n .reduce((arr, k) => arr.concat(k), []);\n\n // Throw an error if no keys have been specified. Calling this function with no\n // keys should not result in a focus event being dispatched unexpectedly.\n if (keys.length === 0) {\n throw getNoKeysSpecifiedError();\n }\n\n // We simulate the user typing in a value by incrementally assigning the value below. The problem\n // is that for some input types, the browser won't allow for an invalid value to be set via the\n // `value` property which will always be the case when going character-by-character. If we detect\n // such an input, we have to set the value all at once or listeners to the `input` event (e.g.\n // the `ReactiveFormsModule` uses such an approach) won't receive the correct value.\n const enterValueIncrementally =\n inputType === 'number'\n ? // The value can be set character by character in number inputs if it doesn't have any decimals.\n keys.every(key => key.key !== '.' && key.key !== '-' && key.keyCode !== PERIOD)\n : incrementalInputTypes.has(inputType);\n\n triggerFocus(element);\n\n // When we aren't entering the value incrementally, assign it all at once ahead\n // of time so that any listeners to the key events below will have access to it.\n if (!enterValueIncrementally) {\n (element as HTMLInputElement).value = keys.reduce((value, key) => value + (key.key || ''), '');\n }\n\n for (const key of keys) {\n dispatchKeyboardEvent(element, 'keydown', key.keyCode, key.key, modifiers, key.code);\n dispatchKeyboardEvent(element, 'keypress', key.keyCode, key.key, modifiers, key.code);\n if (isInput && key.key && key.key.length === 1) {\n if (enterValueIncrementally) {\n (element as HTMLInputElement | HTMLTextAreaElement).value += key.key;\n dispatchFakeEvent(element, 'input');\n }\n }\n dispatchKeyboardEvent(element, 'keyup', key.keyCode, key.key, modifiers, key.code);\n }\n\n // Since we weren't dispatching `input` events while sending the keys, we have to do it now.\n if (!enterValueIncrementally) {\n dispatchFakeEvent(element, 'input');\n }\n}\n\n/**\n * Clears the text in an input or textarea element.\n * @docs-private\n */\nexport function clearElement(element: HTMLInputElement | HTMLTextAreaElement) {\n triggerFocus(element as HTMLElement);\n element.value = '';\n dispatchFakeEvent(element, 'input');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport * as keyCodes from '../../keycodes';\nimport {\n _getTextWithExcludedElements,\n ElementDimensions,\n ModifierKeys,\n TestElement,\n TestKey,\n TextOptions,\n EventData,\n} from '../../testing';\nimport {\n clearElement,\n createFakeEvent,\n dispatchFakeEvent,\n dispatchMouseEvent,\n dispatchPointerEvent,\n isTextInput,\n triggerBlur,\n triggerFocus,\n typeInElement,\n dispatchEvent,\n} from './fake-events';\n\n/** Maps `TestKey` constants to the `keyCode` and `key` values used by native browser events. */\nconst keyMap = {\n [TestKey.BACKSPACE]: {keyCode: keyCodes.BACKSPACE, key: 'Backspace', code: 'Backspace'},\n [TestKey.TAB]: {keyCode: keyCodes.TAB, key: 'Tab', code: 'Tab'},\n [TestKey.ENTER]: {keyCode: keyCodes.ENTER, key: 'Enter', code: 'Enter'},\n [TestKey.SHIFT]: {keyCode: keyCodes.SHIFT, key: 'Shift', code: 'ShiftLeft'},\n [TestKey.CONTROL]: {keyCode: keyCodes.CONTROL, key: 'Control', code: 'ControlLeft'},\n [TestKey.ALT]: {keyCode: keyCodes.ALT, key: 'Alt', code: 'AltLeft'},\n [TestKey.ESCAPE]: {keyCode: keyCodes.ESCAPE, key: 'Escape', code: 'Escape'},\n [TestKey.PAGE_UP]: {keyCode: keyCodes.PAGE_UP, key: 'PageUp', code: 'PageUp'},\n [TestKey.PAGE_DOWN]: {keyCode: keyCodes.PAGE_DOWN, key: 'PageDown', code: 'PageDown'},\n [TestKey.END]: {keyCode: keyCodes.END, key: 'End', code: 'End'},\n [TestKey.HOME]: {keyCode: keyCodes.HOME, key: 'Home', code: 'Home'},\n [TestKey.LEFT_ARROW]: {keyCode: keyCodes.LEFT_ARROW, key: 'ArrowLeft', code: 'ArrowLeft'},\n [TestKey.UP_ARROW]: {keyCode: keyCodes.UP_ARROW, key: 'ArrowUp', code: 'ArrowUp'},\n [TestKey.RIGHT_ARROW]: {keyCode: keyCodes.RIGHT_ARROW, key: 'ArrowRight', code: 'ArrowRight'},\n [TestKey.DOWN_ARROW]: {keyCode: keyCodes.DOWN_ARROW, key: 'ArrowDown', code: 'ArrowDown'},\n [TestKey.INSERT]: {keyCode: keyCodes.INSERT, key: 'Insert', code: 'Insert'},\n [TestKey.DELETE]: {keyCode: keyCodes.DELETE, key: 'Delete', code: 'Delete'},\n [TestKey.F1]: {keyCode: keyCodes.F1, key: 'F1', code: 'F1'},\n [TestKey.F2]: {keyCode: keyCodes.F2, key: 'F2', code: 'F2'},\n [TestKey.F3]: {keyCode: keyCodes.F3, key: 'F3', code: 'F3'},\n [TestKey.F4]: {keyCode: keyCodes.F4, key: 'F4', code: 'F4'},\n [TestKey.F5]: {keyCode: keyCodes.F5, key: 'F5', code: 'F5'},\n [TestKey.F6]: {keyCode: keyCodes.F6, key: 'F6', code: 'F6'},\n [TestKey.F7]: {keyCode: keyCodes.F7, key: 'F7', code: 'F7'},\n [TestKey.F8]: {keyCode: keyCodes.F8, key: 'F8', code: 'F8'},\n [TestKey.F9]: {keyCode: keyCodes.F9, key: 'F9', code: 'F9'},\n [TestKey.F10]: {keyCode: keyCodes.F10, key: 'F10', code: 'F10'},\n [TestKey.F11]: {keyCode: keyCodes.F11, key: 'F11', code: 'F11'},\n [TestKey.F12]: {keyCode: keyCodes.F12, key: 'F12', code: 'F12'},\n [TestKey.META]: {keyCode: keyCodes.META, key: 'Meta', code: 'MetaLeft'},\n [TestKey.COMMA]: {keyCode: keyCodes.COMMA, key: ',', code: 'Comma'},\n};\n\n/** A `TestElement` implementation for unit tests. */\nexport class UnitTestElement implements TestElement {\n constructor(\n readonly element: Element,\n private _stabilize: () => Promise,\n ) {}\n\n /** Blur the element. */\n async blur(): Promise {\n triggerBlur(this.element as HTMLElement);\n await this._stabilize();\n }\n\n /** Clear the element's input (for input and textarea elements only). */\n async clear(): Promise {\n if (!isTextInput(this.element)) {\n throw Error('Attempting to clear an invalid element');\n }\n clearElement(this.element);\n await this._stabilize();\n }\n\n /**\n * Click the element at the default location for the current environment. If you need to guarantee\n * the element is clicked at a specific location, consider using `click('center')` or\n * `click(x, y)` instead.\n */\n click(modifiers?: ModifierKeys): Promise;\n /** Click the element at the element's center. */\n click(location: 'center', modifiers?: ModifierKeys): Promise;\n /**\n * Click the element at the specified coordinates relative to the top-left of the element.\n * @param relativeX Coordinate within the element, along the X-axis at which to click.\n * @param relativeY Coordinate within the element, along the Y-axis at which to click.\n * @param modifiers Modifier keys held while clicking\n */\n click(relativeX: number, relativeY: number, modifiers?: ModifierKeys): Promise;\n async click(\n ...args: [ModifierKeys?] | ['center', ModifierKeys?] | [number, number, ModifierKeys?]\n ): Promise {\n const isDisabled = (this.element as Partial<{disabled?: boolean}>).disabled === true;\n\n // If the element is `disabled` and has a `disabled` property, we emit the mouse event\n // sequence but not dispatch the `click` event. This is necessary to keep the behavior\n // consistent with an actual user interaction. The click event is not necessarily\n // automatically prevented by the browser. There is mismatch between Firefox and Chromium:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=329509.\n // https://bugs.chromium.org/p/chromium/issues/detail?id=1115661.\n await this._dispatchMouseEventSequence(isDisabled ? null : 'click', args, 0);\n await this._stabilize();\n }\n\n /**\n * Right clicks on the element at the specified coordinates relative to the top-left of it.\n * @param relativeX Coordinate within the element, along the X-axis at which to click.\n * @param relativeY Coordinate within the element, along the Y-axis at which to click.\n * @param modifiers Modifier keys held while clicking\n */\n rightClick(relativeX: number, relativeY: number, modifiers?: ModifierKeys): Promise;\n async rightClick(\n ...args: [ModifierKeys?] | ['center', ModifierKeys?] | [number, number, ModifierKeys?]\n ): Promise {\n await this._dispatchMouseEventSequence('contextmenu', args, 2);\n await this._stabilize();\n }\n\n /** Focus the element. */\n async focus(): Promise {\n triggerFocus(this.element as HTMLElement);\n await this._stabilize();\n }\n\n /** Get the computed value of the given CSS property for the element. */\n async getCssValue(property: string): Promise {\n await this._stabilize();\n // TODO(mmalerba): Consider adding value normalization if we run into common cases where its\n // needed.\n return getComputedStyle(this.element).getPropertyValue(property);\n }\n\n /** Hovers the mouse over the element. */\n async hover(): Promise {\n this._dispatchPointerEventIfSupported('pointerenter');\n dispatchMouseEvent(this.element, 'mouseover');\n dispatchMouseEvent(this.element, 'mouseenter');\n await this._stabilize();\n }\n\n /** Moves the mouse away from the element. */\n async mouseAway(): Promise {\n this._dispatchPointerEventIfSupported('pointerleave');\n dispatchMouseEvent(this.element, 'mouseout');\n dispatchMouseEvent(this.element, 'mouseleave');\n await this._stabilize();\n }\n\n /**\n * Sends the given string to the input as a series of key presses. Also fires input events\n * and attempts to add the string to the Element's value. Note that this cannot\n * reproduce native browser behavior for keyboard shortcuts such as Tab, Ctrl + A, etc.\n */\n async sendKeys(...keys: (string | TestKey)[]): Promise;\n /**\n * Sends the given string to the input as a series of key presses. Also fires input events\n * and attempts to add the string to the Element's value.\n */\n async sendKeys(modifiers: ModifierKeys, ...keys: (string | TestKey)[]): Promise;\n async sendKeys(...modifiersAndKeys: any[]): Promise {\n const args = modifiersAndKeys.map(k => (typeof k === 'number' ? keyMap[k as TestKey] : k));\n typeInElement(this.element as HTMLElement, ...args);\n await this._stabilize();\n }\n\n /**\n * Gets the text from the element.\n * @param options Options that affect what text is included.\n */\n async text(options?: TextOptions): Promise {\n await this._stabilize();\n if (options?.exclude) {\n return _getTextWithExcludedElements(this.element, options.exclude);\n }\n return (this.element.textContent || '').trim();\n }\n\n /**\n * Sets the value of a `contenteditable` element.\n * @param value Value to be set on the element.\n */\n async setContenteditableValue(value: string): Promise {\n const contenteditableAttr = await this.getAttribute('contenteditable');\n\n if (\n contenteditableAttr !== '' &&\n contenteditableAttr !== 'true' &&\n contenteditableAttr !== 'plaintext-only'\n ) {\n throw new Error('setContenteditableValue can only be called on a `contenteditable` element.');\n }\n\n await this._stabilize();\n this.element.textContent = value;\n }\n\n /** Gets the value for the given attribute from the element. */\n async getAttribute(name: string): Promise {\n await this._stabilize();\n return this.element.getAttribute(name);\n }\n\n /** Checks whether the element has the given class. */\n async hasClass(name: string): Promise {\n await this._stabilize();\n return this.element.classList.contains(name);\n }\n\n /** Gets the dimensions of the element. */\n async getDimensions(): Promise {\n await this._stabilize();\n return this.element.getBoundingClientRect();\n }\n\n /** Gets the value of a property of an element. */\n async getProperty(name: string): Promise {\n await this._stabilize();\n return (this.element as any)[name];\n }\n\n /** Sets the value of a property of an input. */\n async setInputValue(value: string): Promise {\n (this.element as any).value = value;\n await this._stabilize();\n }\n\n /** Selects the options at the specified indexes inside of a native `select` element. */\n async selectOptions(...optionIndexes: number[]): Promise {\n let hasChanged = false;\n const options = this.element.querySelectorAll('option');\n const indexes = new Set(optionIndexes); // Convert to a set to remove duplicates.\n\n for (let i = 0; i < options.length; i++) {\n const option = options[i];\n const wasSelected = option.selected;\n\n // We have to go through `option.selected`, because `HTMLSelectElement.value` doesn't\n // allow for multiple options to be selected, even in `multiple` mode.\n option.selected = indexes.has(i);\n\n if (option.selected !== wasSelected) {\n hasChanged = true;\n dispatchFakeEvent(this.element, 'change');\n }\n }\n\n if (hasChanged) {\n await this._stabilize();\n }\n }\n\n /** Checks whether this element matches the given selector. */\n async matchesSelector(selector: string): Promise {\n await this._stabilize();\n const elementPrototype = Element.prototype as any;\n return (elementPrototype['matches'] || elementPrototype['msMatchesSelector']).call(\n this.element,\n selector,\n );\n }\n\n /** Checks whether the element is focused. */\n async isFocused(): Promise {\n await this._stabilize();\n return document.activeElement === this.element;\n }\n\n /**\n * Dispatches an event with a particular name.\n * @param name Name of the event to be dispatched.\n */\n async dispatchEvent(name: string, data?: Record): Promise {\n const event = createFakeEvent(name);\n\n if (data) {\n // tslint:disable-next-line:ban Have to use `Object.assign` to preserve the original object.\n Object.assign(event, data);\n }\n\n dispatchEvent(this.element, event);\n await this._stabilize();\n }\n\n /**\n * Dispatches a pointer event on the current element if the browser supports it.\n * @param name Name of the pointer event to be dispatched.\n * @param clientX Coordinate of the user's pointer along the X axis.\n * @param clientY Coordinate of the user's pointer along the Y axis.\n * @param button Mouse button that should be pressed when dispatching the event.\n */\n private _dispatchPointerEventIfSupported(\n name: string,\n clientX?: number,\n clientY?: number,\n offsetX?: number,\n offsetY?: number,\n button?: number,\n ) {\n // The latest versions of all browsers we support have the new `PointerEvent` API.\n // Though since we capture the two most recent versions of these browsers, we also\n // need to support Safari 12 at time of writing. Safari 12 does not have support for this,\n // so we need to conditionally create and dispatch these events based on feature detection.\n if (typeof PointerEvent !== 'undefined' && PointerEvent) {\n dispatchPointerEvent(this.element, name, clientX, clientY, offsetX, offsetY, {\n isPrimary: true,\n button,\n });\n }\n }\n\n /**\n * Dispatches all the events that are part of a mouse event sequence\n * and then emits a given primary event at the end, if speciifed.\n */\n private async _dispatchMouseEventSequence(\n primaryEventName: string | null,\n args: [ModifierKeys?] | ['center', ModifierKeys?] | [number, number, ModifierKeys?],\n button?: number,\n ) {\n let clientX: number | undefined = undefined;\n let clientY: number | undefined = undefined;\n let offsetX: number | undefined = undefined;\n let offsetY: number | undefined = undefined;\n let modifiers: ModifierKeys = {};\n\n if (args.length && typeof args[args.length - 1] === 'object') {\n modifiers = args.pop() as ModifierKeys;\n }\n\n if (args.length) {\n const {left, top, width, height} = await this.getDimensions();\n offsetX = args[0] === 'center' ? width / 2 : (args[0] as number);\n offsetY = args[0] === 'center' ? height / 2 : (args[1] as number);\n\n // Round the computed click position as decimal pixels are not\n // supported by mouse events and could lead to unexpected results.\n clientX = Math.round(left + offsetX);\n clientY = Math.round(top + offsetY);\n }\n\n this._dispatchPointerEventIfSupported(\n 'pointerdown',\n clientX,\n clientY,\n offsetX,\n offsetY,\n button,\n );\n dispatchMouseEvent(\n this.element,\n 'mousedown',\n clientX,\n clientY,\n offsetX,\n offsetY,\n button,\n modifiers,\n );\n this._dispatchPointerEventIfSupported('pointerup', clientX, clientY, offsetX, offsetY, button);\n dispatchMouseEvent(\n this.element,\n 'mouseup',\n clientX,\n clientY,\n offsetX,\n offsetY,\n button,\n modifiers,\n );\n\n // If a primary event name is specified, emit it after the mouse event sequence.\n if (primaryEventName !== null) {\n dispatchMouseEvent(\n this.element,\n primaryEventName,\n clientX,\n clientY,\n offsetX,\n offsetY,\n button,\n modifiers,\n );\n }\n\n // This call to _stabilize should not be needed since the callers will already do that them-\n // selves. Nevertheless it breaks some tests in g3 without it. It needs to be investigated\n // why removing breaks those tests.\n // See: https://github.com/angular/components/pull/20758/files#r520886256.\n await this._stabilize();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n handleAutoChangeDetectionStatus,\n HarnessEnvironment,\n HarnessLoader,\n stopHandlingAutoChangeDetectionStatus,\n TestElement,\n} from '../../testing';\nimport {ComponentFixture, flush} from '@angular/core/testing';\nimport {Observable} from 'rxjs';\nimport {takeWhile} from 'rxjs/operators';\nimport {TaskState, TaskStateZoneInterceptor} from './task-state-zone-interceptor';\nimport {UnitTestElement} from './unit-test-element';\n\n/** Options to configure the environment. */\nexport interface TestbedHarnessEnvironmentOptions {\n /** The query function used to find DOM elements. */\n queryFn: (selector: string, root: Element) => Iterable | ArrayLike;\n}\n\n/** The default environment options. */\nconst defaultEnvironmentOptions: TestbedHarnessEnvironmentOptions = {\n queryFn: (selector: string, root: Element) => root.querySelectorAll(selector),\n};\n\n/** Whether auto change detection is currently disabled. */\nlet disableAutoChangeDetection = false;\n\n/**\n * The set of non-destroyed fixtures currently being used by `TestbedHarnessEnvironment` instances.\n */\nconst activeFixtures = new Set>();\n\n/**\n * Installs a handler for change detection batching status changes for a specific fixture.\n * @param fixture The fixture to handle change detection batching for.\n */\nfunction installAutoChangeDetectionStatusHandler(fixture: ComponentFixture) {\n if (!activeFixtures.size) {\n handleAutoChangeDetectionStatus(({isDisabled, onDetectChangesNow}) => {\n disableAutoChangeDetection = isDisabled;\n if (onDetectChangesNow) {\n Promise.all(Array.from(activeFixtures).map(detectChanges)).then(onDetectChangesNow);\n }\n });\n }\n activeFixtures.add(fixture);\n}\n\n/**\n * Uninstalls a handler for change detection batching status changes for a specific fixture.\n * @param fixture The fixture to stop handling change detection batching for.\n */\nfunction uninstallAutoChangeDetectionStatusHandler(fixture: ComponentFixture) {\n activeFixtures.delete(fixture);\n if (!activeFixtures.size) {\n stopHandlingAutoChangeDetectionStatus();\n }\n}\n\n/** Whether we are currently in the fake async zone. */\nfunction isInFakeAsyncZone() {\n return typeof Zone !== 'undefined' && Zone!.current.get('FakeAsyncTestZoneSpec') != null;\n}\n\n/**\n * Triggers change detection for a specific fixture.\n * @param fixture The fixture to trigger change detection for.\n */\nasync function detectChanges(fixture: ComponentFixture) {\n fixture.detectChanges();\n if (isInFakeAsyncZone()) {\n flush();\n } else {\n await fixture.whenStable();\n }\n}\n\n/** A `HarnessEnvironment` implementation for Angular's Testbed. */\nexport class TestbedHarnessEnvironment extends HarnessEnvironment {\n /** Whether the environment has been destroyed. */\n private _destroyed = false;\n\n /** Observable that emits whenever the test task state changes. */\n private _taskState?: Observable;\n\n /** The options for this environment. */\n private _options: TestbedHarnessEnvironmentOptions;\n\n /** Environment stabilization callback passed to the created test elements. */\n private _stabilizeCallback: () => Promise;\n\n protected constructor(\n rawRootElement: Element,\n private _fixture: ComponentFixture,\n options?: TestbedHarnessEnvironmentOptions,\n ) {\n super(rawRootElement);\n this._options = {...defaultEnvironmentOptions, ...options};\n if (typeof Zone !== 'undefined') {\n this._taskState = TaskStateZoneInterceptor.setup();\n }\n this._stabilizeCallback = () => this.forceStabilize();\n installAutoChangeDetectionStatusHandler(_fixture);\n _fixture.componentRef.onDestroy(() => {\n uninstallAutoChangeDetectionStatusHandler(_fixture);\n this._destroyed = true;\n });\n }\n\n /** Creates a `HarnessLoader` rooted at the given fixture's root element. */\n static loader(\n fixture: ComponentFixture,\n options?: TestbedHarnessEnvironmentOptions,\n ): HarnessLoader {\n return new TestbedHarnessEnvironment(fixture.nativeElement, fixture, options);\n }\n\n /**\n * Creates a `HarnessLoader` at the document root. This can be used if harnesses are\n * located outside of a fixture (e.g. overlays appended to the document body).\n */\n static documentRootLoader(\n fixture: ComponentFixture,\n options?: TestbedHarnessEnvironmentOptions,\n ): HarnessLoader {\n return new TestbedHarnessEnvironment(document.body, fixture, options);\n }\n\n /** Gets the native DOM element corresponding to the given TestElement. */\n static getNativeElement(el: TestElement): Element {\n if (el instanceof UnitTestElement) {\n return el.element;\n }\n throw Error('This TestElement was not created by the TestbedHarnessEnvironment');\n }\n\n /**\n * Creates an instance of the given harness type, using the fixture's root element as the\n * harness's host element. This method should be used when creating a harness for the root element\n * of a fixture, as components do not have the correct selector when they are created as the root\n * of the fixture.\n */\n static async harnessForFixture(\n fixture: ComponentFixture,\n harnessType: ComponentHarnessConstructor,\n options?: TestbedHarnessEnvironmentOptions,\n ): Promise {\n const environment = new TestbedHarnessEnvironment(fixture.nativeElement, fixture, options);\n await environment.forceStabilize();\n return environment.createComponentHarness(harnessType, fixture.nativeElement);\n }\n\n /**\n * Flushes change detection and async tasks captured in the Angular zone.\n * In most cases it should not be necessary to call this manually. However, there may be some edge\n * cases where it is needed to fully flush animation events.\n */\n async forceStabilize(): Promise {\n if (!disableAutoChangeDetection) {\n if (this._destroyed) {\n throw Error('Harness is attempting to use a fixture that has already been destroyed.');\n }\n\n await detectChanges(this._fixture);\n }\n }\n\n /**\n * Waits for all scheduled or running async tasks to complete. This allows harness\n * authors to wait for async tasks outside of the Angular zone.\n */\n async waitForTasksOutsideAngular(): Promise {\n // If we run in the fake async zone, we run \"flush\" to run any scheduled tasks. This\n // ensures that the harnesses behave inside of the FakeAsyncTestZone similar to the\n // \"AsyncTestZone\" and the root zone (i.e. neither fakeAsync or async). Note that we\n // cannot just rely on the task state observable to become stable because the state will\n // never change. This is because the task queue will be only drained if the fake async\n // zone is being flushed.\n if (isInFakeAsyncZone()) {\n flush();\n }\n\n // Wait until the task queue has been drained and the zone is stable. Note that\n // we cannot rely on \"fixture.whenStable\" since it does not catch tasks scheduled\n // outside of the Angular zone. For test harnesses, we want to ensure that the\n // app is fully stabilized and therefore need to use our own zone interceptor.\n await this._taskState?.pipe(takeWhile(state => !state.stable)).toPromise();\n }\n\n /** Gets the root element for the document. */\n protected getDocumentRoot(): Element {\n return document.body;\n }\n\n /** Creates a `TestElement` from a raw element. */\n protected createTestElement(element: Element): TestElement {\n return new UnitTestElement(element, this._stabilizeCallback);\n }\n\n /** Creates a `HarnessLoader` rooted at the given raw element. */\n protected createEnvironment(element: Element): HarnessEnvironment {\n return new TestbedHarnessEnvironment(element, this._fixture, this._options);\n }\n\n /**\n * Gets a list of all elements matching the given selector under this environment's root element.\n */\n protected async getAllRawElements(selector: string): Promise {\n await this.forceStabilize();\n return Array.from(this._options.queryFn(selector, this.rawRootElement));\n }\n}\n"],"names":["keyCodes.BACKSPACE","keyCodes.TAB","keyCodes.ENTER","keyCodes.SHIFT","keyCodes.CONTROL","keyCodes.ALT","keyCodes.ESCAPE","keyCodes.PAGE_UP","keyCodes.PAGE_DOWN","keyCodes.END","keyCodes.HOME","keyCodes.LEFT_ARROW","keyCodes.UP_ARROW","keyCodes.RIGHT_ARROW","keyCodes.DOWN_ARROW","keyCodes.INSERT","keyCodes.DELETE","keyCodes.F1","keyCodes.F2","keyCodes.F3","keyCodes.F4","keyCodes.F5","keyCodes.F6","keyCodes.F7","keyCodes.F8","keyCodes.F9","keyCodes.F10","keyCodes.F11","keyCodes.F12","keyCodes.META","keyCodes.COMMA"],"mappings":";;;;;;AAiBA;AACA,MAAM,qBAAqB,GAAG,MAAM,CAAC,mCAAmC,CAAC;AAOzE;;;;;AAKG;MACU,wBAAwB,CAAA;IAC3B,UAAU,GAAwB,IAAI;;IAG7B,aAAa,GAAG,IAAI,eAAe,CAClD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,kCAAkC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,EAAC,MAAM,EAAE,IAAI,EAAC,CAC5F;;AAGQ,IAAA,KAAK,GAA0B,IAAI,CAAC,aAAa;AAE1D,IAAA,WAAA,CAAY,SAA8B,EAAA;AACxC,QAAA,IAAI,CAAC,UAAU,GAAG,SAAS;;;AAI7B,IAAA,SAAS,CAAC,QAAsB,EAAE,OAAa,EAAE,MAAY,EAAE,YAA0B,EAAA;AACvF,QAAA,IAAI,OAAO,KAAK,MAAM,EAAE;AACtB,YAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,kCAAkC,CAAC,YAAY,CAAC,CAAC;;;;AAK1E,IAAA,kCAAkC,CAAC,KAAmB,EAAA;AAC5D,QAAA,OAAO,EAAC,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,IAAI,CAAC,KAAK,CAAC,SAAS,EAAC;;AAGvD;;;;AAIG;AACH,IAAA,OAAO,KAAK,GAAA;AACV,QAAA,IAAI,IAAI,KAAK,SAAS,EAAE;YACtB,MAAM,KAAK,CACT,gEAAgE;AAC9D,gBAAA,+BAA+B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