@nova-ui/bits
Version:
SolarWinds Nova Framework
42 lines (41 loc) • 1.79 kB
TypeScript
import { JSHandle, Page } from "@playwright/test";
export declare enum Animations {
ALL = 0,
TRANSITIONS = 1,
TRANSFORMS = 2,
ANIMATIONS = 3,
TRANSFORMS_AND_ANIMATIONS = 4,
TRANSITIONS_AND_ANIMATIONS = 5,
TRANSITIONS_AND_TRANSFORMS = 6
}
interface AxeFixture {
runA11yScan: (context?: string | any, disabledRules?: string[]) => Promise<void>;
}
export { expect } from "@playwright/test";
export declare const test: import("playwright/test").TestType<import("playwright/test").PlaywrightTestArgs & import("playwright/test").PlaywrightTestOptions & AxeFixture, import("playwright/test").PlaywrightWorkerArgs & import("playwright/test").PlaywrightWorkerOptions>;
export declare class Helpers {
static page: Page;
static setPage(page: Page): void;
static getActiveElement(): Promise<JSHandle | null>;
static prepareBrowser(pageName: string, page: Page): Promise<void>;
static clickOnEmptySpace(): Promise<void>;
static setLocation(url: string): Promise<void>;
static pressKey(key: string, times?: number): Promise<void>;
static evaluateActiveElementHtml(): Promise<string | null>;
static disableCSSAnimations(type: Animations): Promise<any>;
static switchDarkTheme(mode: "on" | "off"): Promise<void>;
/**
* Apply a browser zoom via CSS zoom to stabilize visual snapshots.
* Works in Chromium-based engines used by Playwright.
* @param percent Zoom percentage (e.g., 100 = default, 55 = zoomed out)
*/
static browserZoom(percent: number): Promise<void>;
/**
* Reset browser zoom to default (100%).
*/
static resetBrowserZoom(): Promise<void>;
/**
* Set a custom width on an element by its id.
*/
static setCustomWidth(size: string, id: string): Promise<void>;
}