UNPKG

@nova-ui/bits

Version:

SolarWinds Nova Framework

40 lines (39 loc) 1.96 kB
import { ElementFinder, ProtractorBrowser } from "protractor"; import { WebElementPromise } from "selenium-webdriver"; import { Atom, IAtomClass } from "./atom"; import { Camera } from "./virtual-camera/Camera"; export declare enum Animations { ALL = 0, TRANSITIONS = 1, TRANSFORMS = 2, ANIMATIONS = 3, TRANSFORMS_AND_ANIMATIONS = 4, TRANSITIONS_AND_ANIMATIONS = 5, TRANSITIONS_AND_TRANSFORMS = 6 } export declare function getCurrentBranchName(potentialGitRoot?: string): string | undefined; export declare function assertA11y<T extends Atom>(browser: ProtractorBrowser, atomClassOrSelector: IAtomClass<T> | string, disabledRules?: string[]): Promise<void>; export declare class Helpers { static prepareBrowser(pageName?: string): Promise<void>; static prepareCamera(testName: string, suiteName?: string): Camera; static getElementByXpath(elementXpath: string): WebElementPromise; static getElementByCSS(elementCSS: string): WebElementPromise; static setCustomWidth(size: string, id: string): Promise<any>; static browserZoom(percent: number): Promise<unknown>; static pressKey(key: string, times?: number): Promise<void>; static clickOnEmptySpace(x?: number, y?: number): Promise<void>; static switchDarkTheme(mode: "on" | "off"): Promise<void>; /** * TODO: make this method configurable, so that we would be able to partly disable * or enable the animations: * * https://jira.solarwinds.com/browse/NUI-2034 */ static disableCSSAnimations(type: Animations): Promise<any>; static saveScreenShot(filename: string): Promise<void>; static setLocation(url: string): Promise<void>; static delayPromise(timeout: number): Promise<void>; static timed<T>(fn: (() => Promise<T>) | (() => T), name?: string): Promise<T>; static waitElementVisible(el: ElementFinder): Promise<void>; static waitElementToBeClickable(el: ElementFinder): Promise<void>; }