/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { ComponentHarness, LocatorFactory, TestElement } from '@angular/cdk/testing'; import { CalendarHarnessFilters } from './datepicker-harness-filters'; import { MatCalendarHarness } from './calendar-harness'; /** Interface for a test harness that can open and close a calendar. */ export interface DatepickerTrigger { isCalendarOpen(): Promise; openCalendar(): Promise; closeCalendar(): Promise; hasCalendar(): Promise; getCalendar(filter?: CalendarHarnessFilters): Promise; } /** Base class for harnesses that can trigger a calendar. */ export declare abstract class DatepickerTriggerHarnessBase extends ComponentHarness implements DatepickerTrigger { /** Whether the trigger is disabled. */ abstract isDisabled(): Promise; /** Whether the calendar associated with the trigger is open. */ abstract isCalendarOpen(): Promise; /** Opens the calendar associated with the trigger. */ protected abstract _openCalendar(): Promise; /** Opens the calendar if the trigger is enabled and it has a calendar. */ openCalendar(): Promise; /** Closes the calendar if it is open. */ closeCalendar(): Promise; /** Gets whether there is a calendar associated with the trigger. */ hasCalendar(): Promise; /** * Gets the `MatCalendarHarness` that is associated with the trigger. * @param filter Optionally filters which calendar is included. */ getCalendar(filter?: CalendarHarnessFilters): Promise; } /** Gets the ID of the calendar that a particular test element can trigger. */ export declare function getCalendarId(host: Promise): Promise; /** Closes the calendar with a specific ID. */ export declare function closeCalendar(calendarId: Promise, documentLocator: LocatorFactory): Promise; /** Gets the test harness for a calendar associated with a particular host. */ export declare function getCalendar(filter: CalendarHarnessFilters, host: Promise, documentLocator: LocatorFactory): Promise;