creevey
Version:
Cross-browser screenshot testing tool for Storybook with fancy UI Runner
38 lines (37 loc) • 1.71 kB
TypeScript
import { API } from '@storybook/api';
import { SetStoriesPayload } from '@storybook/api/dist/ts3.9/lib/stories';
import { CreeveyStatus, CreeveyUpdate, TestData, TestStatus, StoriesRaw } from '../../types';
import { CreeveyClientApi } from '../shared/creeveyClientApi';
export declare class CreeveyManager {
storybookApi: API;
storyId: string;
activeBrowser: string;
selectedTestId: string;
status: CreeveyStatus;
creeveyApi: CreeveyClientApi | null;
stories: StoriesRaw;
updateStatusListeners: Array<(update: CreeveyUpdate) => void>;
changeTestListeners: Array<(testId: string) => void>;
constructor(storybookApi: API);
initAll: () => Promise<void>;
onUpdateStatus(listener: (update: CreeveyUpdate) => void): () => void;
onChangeTest(listener: (testId: string) => void): () => void;
handleCreeveyUpdate: (update: CreeveyUpdate) => void;
getCurrentTest: () => TestData | undefined;
onStoryRendered: (storyId: string) => void;
onStart: () => void;
onStop: () => void;
onImageApprove: (id: string, retry: number, image: string) => void;
onStartAllStoryTests: () => void;
onStartAllTests: () => void;
onSetStories: (data: SetStoriesPayload) => void;
setActiveBrowser: (browser: string) => void;
setSelectedTestId: (testId: string) => void;
getStoryTests: (storyId: string) => TestData[];
getBrowsers: () => string[];
getTestsByStoryIdAndBrowser: (browser: string) => TestData[];
getTabTitle: (browser: string) => string;
setPanelsTitle: () => void;
addStatusesToSideBar(): Promise<void>;
addStatusToStoryName(name: string, status: TestStatus | undefined, skip: string | boolean): string;
}