mirror of
https://github.com/material-components/material-web.git
synced 2024-09-11 21:57:41 +03:00
BREAKING CHANGE: Rename `@material/web/iconbutton/lib` to `@material/web/iconbutton/internal`. Prefer not using internal files. PiperOrigin-RevId: 550579461
24 lines
548 B
TypeScript
24 lines
548 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import {Harness} from '../testing/harness.js';
|
|
|
|
import {IconButton} from './internal/icon-button.js';
|
|
|
|
/**
|
|
* Test harness for icon buttons.
|
|
*/
|
|
export class IconButtonHarness extends Harness<IconButton> {
|
|
protected override async getInteractiveElement() {
|
|
await this.element.updateComplete;
|
|
if (this.element.href) {
|
|
return this.element.renderRoot.querySelector('a')!;
|
|
}
|
|
|
|
return this.element.renderRoot.querySelector('button')!;
|
|
}
|
|
}
|