UNPKG

askui

Version:

Reliable, automated end-to-end-testing that depends on what is shown on your screen instead of the technology you are running on

25 lines (24 loc) 1.2 kB
import { ControlCommand } from '../ui-control-commands'; import { CacheInterface } from './cache-interface'; import { CacheEntry } from './cache-entry'; import { CacheConfig, ValidationType } from './cache-config'; import { CustomElement } from '../model/custom-element'; export declare class CacheManager implements CacheInterface { private relevantData; validationType: ValidationType; private cacheFile; private readonly referenceWidth; private readonly referenceHeight; private readonly defaultValidationType; constructor(config: CacheConfig); loadFromFile(): void; saveToFile(): void; add(key: string, value: CacheEntry): void; addCacheEntryFromControlCommand(instruction: string, controlCommand: ControlCommand, customElements: CustomElement[], image?: string): Promise<void>; isImageRequired(instruction: string, customElements: CustomElement[]): boolean | undefined; getCachedControlCommand(instruction: string, customElements: CustomElement[], image?: string): Promise<ControlCommand | undefined>; private encodeKey; private getCacheEntriesByKey; private getValidCacheEntry; private validateAccordingToPixelPerfect; }