import { type TestInfoForCi } from './ci-test-info'; /** Optional pause (ms) after the last `set` so the app can process the VIEW intent before the next Playwright step. */ export declare function resolvePostSetSettleMs(): number; export interface MobileRumAutomationUrls { setUrlPrefix: string; clearUrl: string; flushUrl: string; } /** Mobilewright worker fixtures used by TrueCoverage hooks (`device` absent in non-mobile projects, e.g. setup). */ export type MobileDeviceWorkerFixtures = { device?: { openUrl: (url: string) => Promise; launchApp?: (bundleId: string) => Promise; } | null; bundleId?: string; }; /** Disable automatic TrueCoverage SET after mobilecli/WebSocket transport errors (`TESTCHIMP_RUM_TRANSPORT_RESYNC=0`). */ export declare function transportResyncDisabled(): boolean; /** * When true, each test's `beforeEach` sends `/v1/clear` before `SET` (legacy). * Default false: skip clear between tests so the app keeps CI until overwritten by `SET`, * avoiding a clear→set gap where RUM emits snapshot nil. Opt in with `TESTCHIMP_RUM_AUTOMATION_CLEAR_BETWEEN_TESTS=1`. */ export declare function clearBetweenTestsEnabled(): boolean; /** * When true, register `afterAll` to send `/v1/clear` then `/v1/flush` after the spec file finishes. * Default false: no automatic clear at file end (avoids clearing CI before the next spec file's `SET`, * and matches "no clear during suite" unless explicitly opted in). * Opt in with `TESTCHIMP_RUM_AUTOMATION_SUITE_TEARDOWN_CLEAR=1`. */ export declare function suiteTeardownClearEnabled(): boolean; /** * Heuristic: mobilecli / WebSocket abnormal close or connection drop (e.g. code 1006). * Used to re-send TrueCoverage `SET` so the next RUM emit can carry `ci_test_info` again. */ export declare function isLikelyMobileTransportFailure(err: unknown): boolean; /** * URL prefix and clear URL for Mobilewright TrueCoverage (`device.openUrl`). * Optional overrides: `TESTCHIMP_RUM_AUTOMATION_SET_PREFIX`, `TESTCHIMP_RUM_AUTOMATION_CLEAR_URL`, * `TESTCHIMP_RUM_AUTOMATION_FLUSH_URL`, `TESTCHIMP_RUM_AUTOMATION_OPEN_URL_TIMEOUT_MS` (per `openUrl`/`launchApp` call, default 25000, clamp 100–120000), * `TESTCHIMP_RUM_AUTOMATION_CLEAR_BETWEEN_TESTS` (default off: no `/v1/clear` before each test; see {@link clearBetweenTestsEnabled}), * `TESTCHIMP_RUM_AUTOMATION_SUITE_TEARDOWN_CLEAR` (default off: no `afterAll` clear+flush; see {@link suiteTeardownClearEnabled}). */ export declare function getMobileRumAutomationUrls(): MobileRumAutomationUrls; export declare function buildAutomationSetOpenUrl(setUrlPrefix: string, ciJson: string): string | { error: string; }; /** * Wrap Mobilewright `test` so TrueCoverage SET runs in the `device` fixture immediately after * Mobilewright's own `launchApp`, before fixtures that depend on `device` (e.g. `screen`). * Wired only from {@link installTrueCoverage} when `uiFixture: 'screen'`. * No platform gate here (0.1.43 parity): SET runs whenever `device.openUrl` exists. */ export declare function extendMobileTestWithTrueCoverageDevice(test: any): any; /** * Re-send a single TrueCoverage `v1/set` for the current test (e.g. after a mobilecli/WebSocket transport drop) * so the next RUM emit can attach `ci_test_info` again. */ export declare function resyncTrueCoverageSetForCurrentTest(device: MobileDeviceWorkerFixtures['device'], testInfo: TestInfoForCi): Promise; /** * Register `afterEach` (and optionally `afterAll`) on the given Playwright `TestType` for mobile TrueCoverage. * **SET + settle + optional `/v1/clear`** run in the extended `device` fixture from {@link extendMobileTestWithTrueCoverageDevice} * (wired by `installTrueCoverage` when `uiFixture: 'screen'`). * * By default, **`/v1/clear` is not sent** between tests unless `TESTCHIMP_RUM_AUTOMATION_CLEAR_BETWEEN_TESTS=1` * (handled in the device fixture). **`afterEach`:** trailing `SET` then `/v1/flush`. **`afterAll`:** only when * `TESTCHIMP_RUM_AUTOMATION_SUITE_TEARDOWN_CLEAR=1`: `clear` + `flush` after the file's tests. */ export declare function attachMobileRumAutomationHooks(testType: any): any; //# sourceMappingURL=rum-automation-mobile.d.ts.map