/*! * @license * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { HarnessLoader, TestElement, TestKey } from '@angular/cdk/testing'; import { DebugElement, Type } from '@angular/core'; import { MatSelectHarness } from '@angular/material/select/testing'; import { MatOptionHarness } from '@angular/material/core/testing'; import { MatChipHarness, MatChipListboxHarness } from '@angular/material/chips/testing'; import { MatButtonHarness } from '@angular/material/button/testing'; import { MatIconHarness } from '@angular/material/icon/testing'; import { MatCheckboxHarness } from '@angular/material/checkbox/testing'; import { MatFormFieldHarness } from '@angular/material/form-field/testing'; import { MatInputHarness } from '@angular/material/input/testing'; import { ComponentFixture } from '@angular/core/testing'; import { MatTabHarness } from '@angular/material/tabs/testing'; import { MatListOptionHarness } from '@angular/material/list/testing'; import { MatCellHarness } from '@angular/material/table/testing'; export declare class UnitTestingUtils { private debugElement?; private loader?; constructor(debugElement?: DebugElement, loader?: HarnessLoader); setDebugElement(debugElement: DebugElement): void; setLoader(loader: HarnessLoader): void; getByCSS(selector: string): DebugElement; getAllByCSS(selector: string): DebugElement[]; getInnerTextByCSS(selector: string): string; getByDataAutomationId(dataAutomationId: string): DebugElement; getByDataAutomationClass(dataAutomationClass: string): DebugElement; getAllByDataAutomationId(dataAutomationId: string): DebugElement[]; getInnerTextByDataAutomationId(dataAutomationId: string): string; getByDirective(directive: Type): DebugElement; getAllByDirective(directive: Type): DebugElement[]; /** Perform actions */ clickByCSS(selector: string): void; clickByDataAutomationId(dataAutomationId: string): void; doubleClickByDataAutomationId(dataAutomationId: string): void; doubleClickByCSS(selector: string): void; blurByCSS(selector: string): void; hoverOverByCSS(selector: string): void; hoverOverByDataAutomationId(dataAutomationId: string): void; mouseLeaveByCSS(selector: string): void; mouseLeaveByDataAutomationId(dataAutomationId: string): void; keyBoardEventByCSS(selector: string, event: 'keyup' | 'keydown', code: string, key: string): void; dispatchCustomEventByCSS(selector: string, eventName: string): void; /** Input related methods */ getInputByCSS(selector: string): HTMLInputElement; getInputByDataAutomationId(dataAutomationId: string): HTMLInputElement; fillInputByCSS(selector: string, value: string): void; fillInputByDataAutomationId(dataAutomationId: string, value: any): void; /** MatButton related methods */ getMatButton(): Promise; getMatButtonByCSS(selector: string): Promise; getMatButtonByDataAutomationId(dataAutomationId: string): Promise; checkIfMatButtonExists(): Promise; checkIfMatButtonExistsWithDataAutomationId(dataAutomationId: string): Promise; clickMatButton(): Promise; clickMatButtonByCSS(selector: string): Promise; clickMatButtonByDataAutomationId(dataAutomationId: string): Promise; sendKeysToMatButton(keys: (string | TestKey)[]): Promise; /** MatCheckbox related methods */ getMatCheckbox(): Promise; getMatCheckboxByDataAutomationId(dataAutomationId: string): Promise; getMatCheckboxHost(): Promise; getAllMatCheckboxes(): Promise; checkIfMatCheckboxIsChecked(): Promise; checkIfMatCheckboxesHaveClass(className: string): Promise; hoverOverMatCheckbox(): Promise; /** MatIcon related methods */ getMatIconOrNull(): Promise; getMatIconWithAncestorByDataAutomationId(dataAutomationId: string): Promise; getMatIconWithAncestorByCSS(selector: string): Promise; checkIfMatIconExistsWithAncestorByDataAutomationId(dataAutomationId: string): Promise; checkIfMatIconExistsWithAncestorByCSSAndName(selector: string, name: string): Promise; clickMatIconWithAncestorByDataAutomationId(dataAutomationId: string): Promise; /** MatSelect related methods */ getMatSelectOptions(isOpened?: boolean): Promise; getMatSelect(): Promise; getMatSelectByDataAutomationId(dataAutomationId: string): Promise; getMatSelectHost(): Promise; checkIfMatSelectExists(): Promise; openMatSelect(): Promise; /** MatChips related methods */ getMatChipByDataAutomationId(dataAutomationId: string): Promise; checkIfMatChipExistsWithDataAutomationId(dataAutomationId: string): Promise; clickMatChip(dataAutomationId: string): Promise; getMatChips(): Promise; /** MatChipListbox related methods */ getMatChipListboxByDataAutomationId(dataAutomationId: string): Promise; clickMatChipListbox(dataAutomationId: string): Promise; /** MatChipGrid related methods */ checkIfMatChipGridExists(): Promise; /** MatFromField related methods */ getMatFormField(): Promise; getMatFormFieldByCSS(selector: string): Promise; /** MatInput related methods */ getMatInput(): Promise; getMatInputByDataAutomationId(dataAutomationId: string): Promise; getMatInputByPlaceholder(placeholder: string): Promise; getMatInputHost(): Promise; checkIfMatInputExists(): Promise; checkIfMatInputExistsWithPlaceholder(placeholder: string): Promise; clickMatInput(): Promise; fillMatInput(value: string): Promise; fillMatInputByDataAutomationId(dataAutomationId: string, value: string): Promise; focusMatInput(): Promise; blurMatInput(): Promise; getMatInputValue(): Promise; getMatInputValueByDataAutomationId(dataAutomationId: string): Promise; sendKeysToMatInput(keys: (string | TestKey)[]): Promise; /** MatAutoComplete related methods */ typeAndGetOptionsForMatAutoComplete(fixture: ComponentFixture, value: string): Promise; /** MatTabGroup related methods */ getSelectedTabFromMatTabGroup(): Promise; getSelectedTabLabelFromMatTabGroup(): Promise; /** MatToolbar related methods */ getMatToolbarHost(): Promise; /** MatSnackbar related methods */ checkIfMatSnackbarExists(): Promise; /** MatProgressBar related methods */ getMatProgressBarHost(): Promise; /** MatListOption related methods */ getMatListOption(): Promise; getAllMatListOptions(): Promise; /** MatCell related methods */ getMatCellByColumnName(columnName: string): Promise; }