material-web/progress/harness.ts
Andrew Jakubowicz 15df1d5f1a fix(progress): squash linearprogress and circular progress into progress
This changes the following imports from:

```js
import '@material/web/circularprogress/circular-progress.js';
import '@material/web/linearprogress/linear-progress.js';
```

to

```js
import '@material/web/progress/circular-progress.js';
import '@material/web/progress/linear-progress.js';
```

PiperOrigin-RevId: 547860610
2023-07-13 11:18:24 -07:00

33 lines
880 B
TypeScript

/**
* @license
* Copyright 2023 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {Harness} from '../testing/harness.js';
import {CircularProgress} from './lib/circular-progress.js';
import {LinearProgress} from './lib/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')!;
}
}