import { Page } from 'playwright'; import { ActionSchemaList } from './action-schema'; import { BrowserTypes, BrowserContextOptions } from './screenshot'; import { DiffDirection, ImageDiffResult, ScreenshotRequest, TakeScreenshotOptionsParams } from '../api/typings'; import { RequestData } from './request'; import { StoryInfo } from './story-info'; import { TestFileScreenshots } from '../api/server/services/test-file-screenshots'; import { Theme } from '@material-ui/core'; import { CompareScreenshotParams, CompareScreenshotReturnType } from './compare-screenshot'; import { MatchImageSnapshotOptions } from 'jest-image-snapshot'; type PageGotoOptions = Parameters[1]; export interface Config { storybookEndpoint: string; customActionSchema?: ActionSchemaList; pageGotoOptions?: PageGotoOptions; releaseModifierKey?: boolean; getPage: (browserType: BrowserTypes, options: BrowserContextOptions, requestData: ScreenshotRequest) => Promise; beforeScreenshot?: (page: T, data: ScreenshotRequest, requestData: RequestData) => Promise; afterScreenshot?: (page: T, data: ScreenshotRequest) => Promise; beforeStoryImageDiff?: (requestData: StoryInfo & RequestData) => Promise; beforeAllImageDiff?: (data: RequestData) => Promise; beforeFileImageDiff?: (data: TestFileScreenshots) => Promise; afterFileImageDiff?: (result: ImageDiffResult[], requestData: TestFileScreenshots) => Promise; afterStoryImageDiff?: (result: ImageDiffResult[], requestData: StoryInfo & RequestData) => Promise; afterAllImageDiff?: (result: ImageDiffResult[], requestData: RequestData) => Promise; diffDirection?: DiffDirection; enableMigration?: boolean; afterUrlConstruction?: (url: string, data: ScreenshotRequest) => string; afterNavigation?: (page: T, data: ScreenshotRequest) => Promise; concurrencyLimit?: { file?: number; story?: number; }; screenshotOptions?: TakeScreenshotOptionsParams; compareScreenshot?: (data: CompareScreenshotParams) => Promise; theme?: Theme; imageDiffOptions?: Pick; } export {};