source: trip-planner-front/node_modules/@angular/material/slider/testing/slider-harness.d.ts@ 571e0df

Last change on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 2.5 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
9import { SliderHarnessFilters } from './slider-harness-filters';
10/** Harness for interacting with a standard mat-slider in tests. */
11export declare class MatSliderHarness extends ComponentHarness {
12 /** The selector for the host element of a `MatSlider` instance. */
13 static hostSelector: string;
14 /**
15 * Gets a `HarnessPredicate` that can be used to search for a `MatSliderHarness` that meets
16 * certain criteria.
17 * @param options Options for filtering which slider instances are considered a match.
18 * @return a `HarnessPredicate` configured with the given options.
19 */
20 static with(options?: SliderHarnessFilters): HarnessPredicate<MatSliderHarness>;
21 private _textLabel;
22 private _wrapper;
23 /** Gets the slider's id. */
24 getId(): Promise<string | null>;
25 /**
26 * Gets the current display value of the slider. Returns a null promise if the thumb label is
27 * disabled.
28 */
29 getDisplayValue(): Promise<string | null>;
30 /** Gets the current percentage value of the slider. */
31 getPercentage(): Promise<number>;
32 /** Gets the current value of the slider. */
33 getValue(): Promise<number>;
34 /** Gets the maximum value of the slider. */
35 getMaxValue(): Promise<number>;
36 /** Gets the minimum value of the slider. */
37 getMinValue(): Promise<number>;
38 /** Whether the slider is disabled. */
39 isDisabled(): Promise<boolean>;
40 /** Gets the orientation of the slider. */
41 getOrientation(): Promise<'horizontal' | 'vertical'>;
42 /**
43 * Sets the value of the slider by clicking on the slider track.
44 *
45 * Note that in rare cases the value cannot be set to the exact specified value. This
46 * can happen if not every value of the slider maps to a single pixel that could be
47 * clicked using mouse interaction. In such cases consider using the keyboard to
48 * select the given value or expand the slider's size for a better user experience.
49 */
50 setValue(value: number): Promise<void>;
51 /** Focuses the slider. */
52 focus(): Promise<void>;
53 /** Blurs the slider. */
54 blur(): Promise<void>;
55 /** Whether the slider is focused. */
56 isFocused(): Promise<boolean>;
57 /** Calculates the percentage of the given value. */
58 private _calculatePercentage;
59}
Note: See TracBrowser for help on using the repository browser.