material-web/progress/harness.ts
Andrew Jakubowicz 6ec3f06429 fix!: rename "lib" directory to "internal"
BREAKING CHANGE: Rename `@material/web/<component>/lib` to `@material/web/<component>/internal`. Prefer not using internal files.

PiperOrigin-RevId: 550633216
2023-07-24 12:02:59 -07:00

33 lines
890 B
TypeScript

/**
* @license
* Copyright 2023 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {Harness} from '../testing/harness.js';
import {CircularProgress} from './internal/circular-progress.js';
import {LinearProgress} from './internal/linear-progress.js';
/**
* Test harness for linear-progress.
*/
export class LinearProgressHarness extends Harness<LinearProgress> {
override async getInteractiveElement() {
await this.element.updateComplete;
// Test access to protected property
// tslint:disable-next-line:no-dict-access-on-struct-type
return this.element['rootEl'];
}
}
/**
* Test harness for circular-progress.
*/
export class CircularProgressHarness extends Harness<CircularProgress> {
override async getInteractiveElement() {
await this.element.updateComplete;
return this.element.querySelector<HTMLElement>('.circularProgresss')!;
}
}