import type { Page, TestInfo } from '@playwright/test'; export type InitDumpsOptions = { /** * Path to the root directory of the project, relative to which the calculation will be made * path to the dump directory (if not specified, the path is absolute) */ rootPath?: string; /** * Mode of writing requests to a file instead of reading from it * @defaultValue `false` */ update?: boolean; /** * Always update dumps if they are missing * @defaultValue `false` */ forceUpdateIfHarMissing?: boolean; /** * Custom timeout for updating tests. Milliseconds. * Useful for long updates */ updateTimeout?: number; /** * Operating mode for requests not found in the archive * @defaultValue `'abort'` */ notFound?: 'abort' | 'fallback'; /** * The address template of the requests to be processed */ url?: string | RegExp; /** * Pack the result into an archive * @defaultValue `true` */ zip?: boolean; /** * Custom path to the dump file. Overrides the path generated by dumpsPath. * @param params Parameters for constructing a path: * @param params.testInfo TestInfo information about the current test * @param params.zip Flag to use zip archive for .har * * @returns string path to dump file */ dumpsFilePath?: (params: { testInfo: TestInfo; zip: boolean; }) => string; }; /** * Makes the necessary preparations for saving query dumps * @returns boolean - true if update mode is active, false if mock mode is active */ export declare function initDumps(page: Page, testInfo: TestInfo, { dumpsFilePath: dumpsFilePathBuilder, rootPath, forceUpdateIfHarMissing, updateTimeout, notFound, url, zip, update, }?: InitDumpsOptions): Promise;