checkForValidationsOfTest()

in lib/RunnerFiles/CreateAndRunTest.js [267:289]


    checkForValidationsOfTest(testObj) {
        var _a, _b, _c;
        let validationStatus = (_c = (_b = (_a = testObj.inputArtifacts) === null || _a === void 0 ? void 0 : _a.testScriptFileInfo) === null || _b === void 0 ? void 0 : _b.validationStatus) !== null && _c !== void 0 ? _c : PayloadModels_1.FileStatus.VALIDATION_INITIATED;
        console.log("Validation status of the test plan: " + validationStatus);
        if (Util.isTerminalFileStatusSucceeded(validationStatus)) {
            console.log(`Validated test plan for the test successfully.`);
            // Get errors from all files
            let fileErrors = Util.getAllFileErrors(testObj);
            if (Object.keys(fileErrors).length > 0) {
                console.log("Validation failed for the following files:");
                for (const [file, error] of Object.entries(fileErrors)) {
                    console.log(`File: ${file}, Error: ${error}`);
                }
                throw new Error("Validation of one or more files failed. Please correct the errors and try again.");
            }
        }
        else if (!Util.isTerminalFileStatus(validationStatus)) {
            throw new Error("TestPlan validation timeout. Please try again.");
        }
        else {
            throw new Error("TestPlan validation Failed.");
        }
    }