import { ElementAction } from './ElementAction'; import { IsVisibleOptions, ClickOptions, DropdownSelectOptions, DragAndDropOptions } from '../enum/Options'; /** * Dual-behavior chain returned by `steps.on(el, page).visible(options?)` and * `steps.visible(el, page, options?)`. Consolidates the old `isVisible()` * probe and `ifVisible()` modifier into one entry point. * * Two modes of use: * * **1. Probe (`await chain`)** — resolves to `boolean`, never throws. * Replaces the deprecated `isVisible(...)` probe. * * ```ts * const ok = await steps.on('banner', 'Page').visible({ timeout: 500 }); * if (ok) { … } * ``` * * **2. Gate (`chain.click()` / `.fill(...)` / matcher tree)** — runs the same * probe, then either executes the action or silently skips it. Replaces * the deprecated `ifVisible(...)` modifier. * * ```ts * await steps.on('cookieBanner', 'Page').visible().click(); * await steps.on('promo', 'Page').visible({ timeout: 500 }).text.toBe('Promo'); * ``` * * Every probe and gate decision is logged under `tester:visible` with a * `[probe]` or `[gate]` tag so test failures that end in a silently-skipped * action remain traceable without sprinkling `console.log` through user code: * * tester:visible [probe] "banner" @ "HomePage" (timeout=500ms) → true * tester:visible [gate] skipping click() on "cookieBanner" @ "HomePage" — not visible * tester:visible [gate] executing fill() on "searchInput" @ "SearchPage" — visible */ export declare class VisibleChain implements PromiseLike { private action; private options; constructor(action: ElementAction, options?: IsVisibleOptions); then(onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike) | null): Promise; /** * Runs the visibility check (and optional `containsText` filter) without * throwing. Resolves the probe target through the action's `probeTarget()` * so scoped `findBy*` chains probe their child locator (the stamped scoped * name has no repository entry) while repository chains keep the raw-selector * construction where the caller-supplied `timeout` is the only wait — * avoiding the 15s repository-resolution default that `repo.get(...)` * would impose. */ private probe; /** Click — gated on visibility. Silently skips if hidden. */ click(options?: ClickOptions): Promise; /** `clickIfPresent` gated on visibility. Returns `false` when the gate skips. */ clickIfPresent(options?: ClickOptions): Promise; /** Hover — gated. */ hover(): Promise; /** Fill — gated. */ fill(text: string): Promise; /** Scroll into view — gated. */ scrollIntoView(): Promise; /** Check — gated. */ check(): Promise; /** Uncheck — gated. */ uncheck(): Promise; /** Double-click — gated. */ doubleClick(): Promise; /** Right-click — gated. */ rightClick(): Promise; /** Type sequentially — gated. */ typeSequentially(text: string, delay?: number): Promise; /** Upload file — gated. */ uploadFile(filePath: string): Promise; /** Clear input — gated. */ clearInput(): Promise; /** Select dropdown — gated. Returns the selected value, or empty string when skipped. */ selectDropdown(options?: DropdownSelectOptions): Promise; /** Set slider value — gated. */ setSliderValue(value: number): Promise; /** Select multiple — gated. Returns the selected values, or empty array when skipped. */ selectMultiple(values: string[]): Promise; /** Drag and drop — gated. */ dragAndDrop(options: DragAndDropOptions): Promise; get text(): import("./ExpectMatchers").TextMatcher; get value(): import("./ExpectMatchers").ValueMatcher; get count(): import("./ExpectMatchers").CountMatcher; get enabled(): import("./ExpectMatchers").BooleanMatcher; get visible(): import("./ElementAction").VisibleField; get attributes(): import("./ExpectMatchers").AttributesMatcher; css(property: string): import("./ExpectMatchers").CssMatcher; satisfy(predicate: Parameters[0]): import("./ExpectMatchers").ExpectBuilder; get not(): import("./ExpectMatchers").ExpectBuilder; private gate; private gateReturning; }