/**
 * Copyright Microsoft Corporation. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { server as coreServer } from 'playwright-core/lib/coreBundle';
import { ipc } from '../common';
import type { Transport } from '@utils/httpServer';
import type * as reporterTypes from '../../types/testReporter';
import type { ConfigLocation } from '../common';
import type { TestServerInterface, TestServerInterfaceEventEmitters } from '../isomorphic/testServerInterface';
type TraceViewerRedirectOptions = coreServer.TraceViewerRedirectOptions;
type TraceViewerServerOptions = coreServer.TraceViewerServerOptions;
export type ListTestsParams = {
    projects?: string[];
    locations?: string[];
    grep?: string;
    grepInvert?: string;
};
export type RunTestsParams = {
    locations?: string[];
    grep?: string;
    grepInvert?: string;
    testIds?: string[];
    headed?: boolean;
    workers?: number | string;
    updateSnapshots?: 'all' | 'changed' | 'missing' | 'none';
    updateSourceMethod?: 'overwrite' | 'patch' | '3way';
    reporters?: string[];
    trace?: 'on' | 'off';
    video?: 'on' | 'off';
    projects?: string[];
    reuseContext?: boolean;
    connectWsEndpoint?: string;
};
export declare class TestServerDispatcher implements TestServerInterface {
    readonly transport: Transport;
    private _serializer;
    private _closeOnDisconnect;
    private _testRunner;
    private _globalSetupReport;
    readonly _dispatchEvent: TestServerInterfaceEventEmitters['dispatchEvent'];
    constructor(configLocation: ConfigLocation, configCLIOverrides: ipc.ConfigCLIOverrides);
    private _wireReporter;
    private _collectingReporter;
    initialize(params: Parameters<TestServerInterface['initialize']>[0]): ReturnType<TestServerInterface['initialize']>;
    ping(): Promise<void>;
    open(params: Parameters<TestServerInterface['open']>[0]): ReturnType<TestServerInterface['open']>;
    resizeTerminal(params: Parameters<TestServerInterface['resizeTerminal']>[0]): ReturnType<TestServerInterface['resizeTerminal']>;
    checkBrowsers(): Promise<{
        hasBrowsers: boolean;
    }>;
    installBrowsers(): Promise<void>;
    runGlobalSetup(params: Parameters<TestServerInterface['runGlobalSetup']>[0]): ReturnType<TestServerInterface['runGlobalSetup']>;
    runGlobalTeardown(): Promise<{
        status: any;
        report: import("../isomorphic/teleReceiver").JsonEvent[];
    }>;
    clearCache(params: Parameters<TestServerInterface['clearCache']>[0]): ReturnType<TestServerInterface['clearCache']>;
    listFiles(params: Parameters<TestServerInterface['listFiles']>[0]): ReturnType<TestServerInterface['listFiles']>;
    listTests(params: Parameters<TestServerInterface['listTests']>[0]): ReturnType<TestServerInterface['listTests']>;
    runTests(params: Parameters<TestServerInterface['runTests']>[0]): ReturnType<TestServerInterface['runTests']>;
    watch(params: {
        fileNames: string[];
    }): Promise<void>;
    findRelatedTestFiles(params: Parameters<TestServerInterface['findRelatedTestFiles']>[0]): ReturnType<TestServerInterface['findRelatedTestFiles']>;
    stopTests(): Promise<void>;
    stop(): Promise<void>;
    closeGracefully(): Promise<void>;
    private _setInterceptStdio;
}
export declare function runUIMode(configFile: string | undefined, configCLIOverrides: ipc.ConfigCLIOverrides, options: TraceViewerServerOptions & TraceViewerRedirectOptions): Promise<reporterTypes.FullResult['status']>;
export declare function runTestServer(configFile: string | undefined, configCLIOverrides: ipc.ConfigCLIOverrides, options: {
    host?: string;
    port?: number;
}): Promise<reporterTypes.FullResult['status']>;
export {};
//# sourceMappingURL=testServer.d.ts.map