import type { TestCase, TestResult } from '@playwright/test/reporter'; import type { TestTimings } from './types.js'; type TestTimingsOptions = { configDir: string; pwVersion: string; }; export declare class TestTimingsBuilder { private beforeHooks; private beforeFixtures; private allBeforeFixtures; private afterHooks; private afterFixtures; private allAfterFixtures; private testFixturesExtraRuns; private testStartTime; private testBody; private errors; private pwFeatures; private test; private result; private options; constructor(test: TestCase, result: TestResult, options: TestTimingsOptions); build(): TestTimings; private getProjectName; private handleWorkerCleanup; private handleAfterStage; private handleBeforeStage; /** * Handle beforeAll / afterAll hooks. */ private handleWorkerHook; private handleBeforeEachHook; private handleAfterEachHook; private handleFixtureSetup; /** * In case of error in fixture setup, teardown does not run, * although there are 0-duration entries. * Remove this entries to avoid confusion. */ private removeFakeTeardowns; /** * Test start time is the earliest start time among: * - test result start time * - all beforeEach hook spans * - all before fixture spans */ private calcTestStartTime; /** * Test total duration: sum of all spans. */ private calcTestTotalDuration; private buildTestBodySpan; /** * Test body duration: result.duration - test-scoped stuff. */ private calcTestBodyDuration; /** * Test body start time: * test start time + durations of all before hooks and fixture setups. */ private calcTestBodyStartTime; /** * If there is error not registered in any hook or fixture, it's from the test body. */ private buildTestBodyError; private addHookSpan; private addFixtureSpan; private upgradeToFullRun; private addTestFixtureExtraRun; private toLocationObject; private toSpanError; } export {};