UNPKG

ui-coverage-scenario-tool-js

Version:

**UI Coverage Scenario Tool** is an innovative, no-overhead solution for tracking and visualizing UI test coverage — directly on your actual application, not static snapshots. The tool collects coverage during UI test execution and generates an interactiv

82 lines (76 loc) 1.97 kB
declare enum ActionType { Fill = "FILL", Type = "TYPE", Select = "SELECT", Click = "CLICK", Hover = "HOVER", Text = "TEXT", Value = "VALUE", Hidden = "HIDDEN", Visible = "VISIBLE", Checked = "CHECKED", Enabled = "ENABLED", Disabled = "DISABLED", Unchecked = "UNCHECKED" } declare enum SelectorType { CSS = "CSS", XPath = "XPATH" } type AppKey = string; type AppName = string; type AppConfig = { key: AppKey; url: string; name: AppName; tags?: string[]; repository?: string; }; type Settings = { apps: AppConfig[]; resultsDir: string; historyFile: string | null; historyRetentionLimit: number; htmlReportFile: string | null; jsonReportFile: string | null; htmlReportTemplateFile: string; }; type UICoverageTrackerProps = { app: string; settings?: Settings; }; type StartScenarioProps = { url: string | null; name: string; }; type TrackPageProps = { url: string; page: string; priority: number; }; type TrackElementProps = { selector: string; actionType: ActionType; selectorType: SelectorType; }; type TrackTransitionProps = { toPage: string; fromPage: string; }; declare class UICoverageTracker { private readonly app; private readonly storage; private readonly settings; private scenario; constructor({ app, settings }: UICoverageTrackerProps); startScenario({ url, name }: StartScenarioProps): void; endScenario(): Promise<void>; /** * @deprecated Method is deprecated, use `trackElement` instead. */ trackCoverage(props: TrackElementProps): Promise<void>; trackPage({ url, page, priority }: TrackPageProps): Promise<void>; trackElement({ selector, actionType, selectorType }: TrackElementProps): Promise<void>; trackTransition({ toPage, fromPage }: TrackTransitionProps): Promise<void>; } export { ActionType, SelectorType, UICoverageTracker };