create-locator
Version:
Creates HTML element locators for tests 📌
28 lines (27 loc) • 1.35 kB
TypeScript
import type { AnyLocator, CreateComponentLocator, CreateRootLocatorFunction, GetLocatorParametersFunction, RemoveMarkFromPropertiesFunction } from './oldTypes';
/**
* Proxy object that represents the locator in production mode (and, for example, in unit tests).
*/
export declare const anyLocator: AnyLocator;
/**
* Creates component locator (by component properties).
*/
export declare const createLocator: CreateComponentLocator;
/**
* Creates root locator (by prefix and options).
*/
export declare const createRootLocator: CreateRootLocatorFunction;
/**
* Get component parameters of locator from parent component (by component properties).
*/
export declare const getLocatorParameters: GetLocatorParametersFunction;
/**
* Removes locator mark from properties (or rest properties) object.
* Returns properties without locator mark.
*/
export declare const removeMarkFromProperties: RemoveMarkFromPropertiesFunction;
/**
* Set production mode for all locators at all.
*/
export declare const setGlobalProductionMode: () => void;
export type { AnyMark, CreateLocator, GetLocatorParameters, Locator, LocatorConstraint, LocatorDescriptionConstraint, LocatorOfElement, Mark, Node, ParametersConstraint, PropertiesWithMarkConstraint, PropertiesWithMarkWithParametersConstraint, RemoveMarkFromProperties, RootOptions, } from './oldTypes';