visreg-test
Version:
A visual regression testing solution that offers an easy setup with simple yet powerful customisation options, wrapped up in a convenient CLI runner to make assessing and accepting/rejecting diffs a breeze.
59 lines (58 loc) • 1.49 kB
TypeScript
import { Endpoint } from './types';
export type Summary = {
suiteSlug: string;
approvedFiles: string[];
rejectedFiles: string[];
failed: boolean;
};
export type SiblingPath = {
type: 'baseline' | 'received' | 'diff';
previewUrl: string;
};
export type Image = {
name: string;
fileName: string;
createdAt: Date;
modifiedAt: Date;
type: string;
suiteName: string;
sizeString: string;
url: string;
siblingPaths: SiblingPath[];
fileUrl: string;
baseUrl?: string;
endpoint?: Endpoint;
fullUrl?: string;
path: string;
};
export type DiffObject = {
imageName: string;
recievedSizeString: string;
baselineModified: Date;
suite: string;
index: number;
total: number;
assessedAs?: string;
files: {
baseline: {
location: string;
fileName: string;
};
received: {
location: string;
fileName: string;
};
diff: {
location: string;
fileName: string;
};
};
};
export type WebAssessmentArgs = {
files: string[];
failed: boolean;
};
export declare const assessInWeb: (args: WebAssessmentArgs) => void;
export declare const approveOrRejectViaWeb: (action: string, index: number) => void;
export declare const getSummary: () => Summary;
export declare const processImageViaWeb: (diffImageFile: string, index: number, total: number, suiteSlug?: string) => DiffObject;