import type { TriggerOptions } from './createDomEvent'; import { ComponentInternalInstance, ComponentOptions, ComponentPublicInstance, ComputedOptions, CreateComponentPublicInstance, FunctionalComponent, MethodOptions } from 'vue'; import { DomEventNameWithModifier } from './constants/dom-events'; import type { VueWrapper } from './vueWrapper'; import { DefinedComponent, FindAllComponentsSelector, FindComponentSelector, NameSelector, RefSelector, VueNode } from './types'; import WrapperLike from './interfaces/wrapperLike'; import type { DOMWrapper } from './domWrapper'; export default abstract class BaseWrapper implements WrapperLike { protected readonly wrapperElement: VueNode; protected abstract getRootNodes(): VueNode[]; get element(): VueNode; constructor(element: ElementType); protected findAllDOMElements(selector: string): Element[]; find(selector: K): DOMWrapper; find(selector: K): DOMWrapper; find(selector: string): DOMWrapper; find(selector: string | RefSelector): DOMWrapper; abstract findAll(selector: K): DOMWrapper[]; abstract findAll(selector: K): DOMWrapper[]; abstract findAll(selector: string): DOMWrapper[]; abstract findAll(selector: string): DOMWrapper[]; findComponent(selector: string): WrapperLike; findComponent(selector: ComponentOptions): VueWrapper>; findComponent(selector: string): VueWrapper ? CreateComponentPublicInstance : VueWrapper>; findComponent(selector: T | Exclude): VueWrapper>; findComponent(selector: T): DOMWrapper; findComponent(selector: string): DOMWrapper; findComponent(selector: NameSelector | RefSelector): VueWrapper; findComponent(selector: T | FindComponentSelector): VueWrapper; findComponent(selector: FindComponentSelector): WrapperLike; findAllComponents(selector: string): WrapperLike[]; findAllComponents(selector: T | Exclude): VueWrapper>[]; findAllComponents(selector: T): DOMWrapper[]; findAllComponents(selector: string): DOMWrapper[]; findAllComponents(selector: NameSelector): VueWrapper[]; findAllComponents(selector: T | FindAllComponentsSelector): VueWrapper[]; findAllComponents(selector: FindAllComponentsSelector): WrapperLike[]; abstract setValue(value?: any): Promise; html(): string; classes(): string[]; classes(className: string): boolean; attributes(): { [key: string]: string; }; attributes(key: string): string | undefined; text(): string; exists(): boolean; get(selector: K): Omit, 'exists'>; get(selector: K): Omit, 'exists'>; get(selector: string): Omit, 'exists'>; get(selector: string | RefSelector): Omit, 'exists'>; getComponent(selector: string): Omit; getComponent(selector: T | Exclude): Omit>, 'exists'>; getComponent(selector: T | string): Omit, 'exists'>; getComponent(selector: NameSelector | RefSelector): Omit; getComponent(selector: T | FindComponentSelector): Omit, 'exists'>; getComponent(selector: FindComponentSelector): Omit; protected isDisabled: () => boolean; isVisible(): boolean; protected abstract getCurrentComponent(): ComponentInternalInstance | void; trigger(eventString: DomEventNameWithModifier, options?: TriggerOptions): Promise; trigger(eventString: string, options?: TriggerOptions): Promise; }