import { attributesFor } from '~/data'; import { strict } from 'assert'; import { string } from 'prop-types'; type OptionalSelector = [string, ...TOtherArgs] | TOtherArgs; export function interactor( WrappedClass: T ): T & Interactor & { new (selector?: string): T & Interactor }; export function text(selector?: string): any; export function clickable(selector?: string): () => Promise; export function findAll(selector: string): HTMLElement[]; export function isPresent(selector: string): boolean; export function selectable(selector: string): (text: string) => Promise; export function fillable(selector?: string): (text: string) => Promise; export function isHidden(selector?: string): boolean; export function hasClass(selector?: string, className?: string): boolean; export function collection(selector: string, interactors?: any): (index?: number) => any; export function value(selector?: string): string; export function is(selector: string): boolean; export function scoped(selector: string, interactors?: T): Interactor & T; export function attribute(selector: string, otherSelector?: string); export function triggerable(...args: OptionalSelector<[string, object]>): void; export class Interactor { constructor(selector?: string); isVisible: boolean; isPresent: boolean; text: string; $$(selector): [HTMLElement]; when(condition: (element?: HTMLElement) => T): this; scoped(selector?: string): Interactor; do(doFn: (element: Interactor) => void); click(selector?: string): Promise; find(findFn: (element: HTMLElement) => boolean): HTMLElement; }