mirror of
https://github.com/material-components/material-web.git
synced 2024-09-21 02:27:12 +03:00
9694191ec0
Swapped switch's interactive element back to an `<input>` to more easily support platform validation messages. PiperOrigin-RevId: 559671594
20 lines
439 B
TypeScript
20 lines
439 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import {Harness} from '../testing/harness.js';
|
|
|
|
import {Switch} from './internal/switch.js';
|
|
|
|
/**
|
|
* Test harness for switch elements.
|
|
*/
|
|
export class SwitchHarness extends Harness<Switch> {
|
|
protected override async getInteractiveElement() {
|
|
await this.element.updateComplete;
|
|
return this.element.renderRoot.querySelector('input')!;
|
|
}
|
|
}
|