/**
 * Copyright (c) 2020-present, Goldman Sachs
 *
 * 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 { type Test, type AtomicTest, type Testable, type TestAssertion, type TestResult, type TestDebug, UnknownTestDebug, TestExecutionPlanDebug, TestSuite } from '@finos/legend-graph';
import { type GeneratorFn, ActionState } from '@finos/legend-shared';
import type { EditorStore } from '../../../EditorStore.js';
import { TestAssertionEditorState } from './TestAssertionState.js';
import type { ElementEditorState } from '../ElementEditorState.js';
import { ExecutionPlanState } from '@finos/legend-query-builder';
export declare class TestableTestResultState {
    readonly editorStore: EditorStore;
    readonly testState: TestableTestEditorState;
    result: TestResult | undefined;
    constructor(testState: TestableTestEditorState, editorStore: EditorStore);
    setResult(val: TestResult | undefined): void;
}
export declare abstract class TestableDebugTestResultState {
    readonly editorStore: EditorStore;
    readonly testState: TestableTestEditorState;
    testDebug: TestDebug | undefined;
    constructor(testState: TestableTestEditorState, editorStore: EditorStore);
    abstract initialize(): TestableDebugTestResultState;
}
export declare class TestExecutionPlanDebugState extends TestableDebugTestResultState {
    testDebug: TestExecutionPlanDebug;
    executionPlanState: ExecutionPlanState;
    constructor(result: TestExecutionPlanDebug, testState: TestableTestEditorState, editorStore: EditorStore);
    initialize(): TestableDebugTestResultState;
}
export declare class TestUnknownDebugState extends TestableDebugTestResultState {
    testDebug: UnknownTestDebug;
    executionPlanState: ExecutionPlanState;
    constructor(result: UnknownTestDebug, testState: TestableTestEditorState, editorStore: EditorStore);
    initialize(): TestableDebugTestResultState;
}
export declare enum TESTABLE_TEST_TAB {
    SETUP = "SETUP",
    ASSERTION = "ASSERTION"
}
export declare abstract class TestableTestEditorState {
    readonly editorStore: EditorStore;
    testable: Testable;
    test: AtomicTest;
    selectedAsertionState: TestAssertionEditorState | undefined;
    assertionEditorStates: TestAssertionEditorState[];
    selectedTab: TESTABLE_TEST_TAB;
    assertionToRename: TestAssertion | undefined;
    runningTestAction: ActionState;
    testResultState: TestableTestResultState;
    debugTestResultState: TestableDebugTestResultState | undefined;
    isReadOnly: boolean;
    debuggingTestAction: ActionState;
    constructor(testable: Testable, test: AtomicTest, isReadOnly: boolean, editorStore: EditorStore);
    setSelectedTab(val: TESTABLE_TEST_TAB): void;
    setAssertionToRename(assertion: TestAssertion | undefined): void;
    addAssertion(): void;
    deleteAssertion(assertionState: TestAssertionEditorState): void;
    openAssertion(val: TestAssertion): void;
    fetchTestResult(): Promise<TestResult>;
    fetchDebugTestResult(): Promise<TestDebug>;
    resetResult(): void;
    handleTestResult(testResult: TestResult): void;
    correspondsToTestResult(val: TestResult): boolean;
    get assertionCount(): number;
    get assertionPassed(): number;
    get assertionFailed(): number;
    runTest(): GeneratorFn<void>;
    debugTest(): GeneratorFn<void>;
    setDebugState(val: TestableDebugTestResultState | undefined): void;
    buildTestDebugState(testDebug: TestDebug): TestableDebugTestResultState | undefined;
}
export declare abstract class TestableTestSuiteEditorState {
    readonly editorStore: EditorStore;
    testable: Testable;
    suite: TestSuite;
    isReadOnly: boolean;
    testStates: TestableTestEditorState[];
    runningSuiteState: ActionState;
    selectTestState: TestableTestEditorState | undefined;
    constructor(testable: Testable, suite: TestSuite, isReadOnly: boolean, editorStore: EditorStore);
    runSuite(): GeneratorFn<void>;
    runFailingTests(): GeneratorFn<void>;
    deleteTest(val: AtomicTest): void;
    removeTestState(val: AtomicTest): void;
    changeTest(val: AtomicTest): void;
}
export declare abstract class TestablePackageableElementEditorState {
    readonly editorStore: EditorStore;
    readonly editorState: ElementEditorState;
    readonly testable: Testable;
    testableResults: TestResult[] | undefined;
    selectedTestSuite: TestableTestSuiteEditorState | undefined;
    runningSuite: TestSuite | undefined;
    testableComponentToRename: Test | undefined;
    isRunningTestableSuitesState: ActionState;
    isRunningFailingSuitesState: ActionState;
    constructor(editorState: ElementEditorState, testable: Testable);
    abstract init(): void;
    get suiteCount(): number;
    get suites(): TestSuite[];
    get passingSuites(): TestSuite[];
    get failingSuites(): TestSuite[];
    resolveSuiteResults(suite: TestSuite): TestResult[] | undefined;
    clearTestResultsForSuite(suite: TestSuite): void;
    get staticSuites(): TestSuite[];
    setTestableResults(val: TestResult[] | undefined): void;
    setRenameComponent(testSuite: Test | undefined): void;
    renameTestableComponent(val: string | undefined): void;
    deleteTestSuite(testSuite: TestSuite): void;
    runAllFailingSuites(): GeneratorFn<void>;
    runTestable(): GeneratorFn<void>;
    runSuite(suite: TestSuite): GeneratorFn<void>;
    handleNewResults(results: TestResult[]): void;
}
//# sourceMappingURL=TestableEditorState.d.ts.map