UNPKG

@microsoft/windows-admin-center-sdk

Version:

Microsoft - Windows Admin Center Shell

81 lines (79 loc) 7.41 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MainDebugger = void 0; const tslib_1 = require("tslib"); const assert_1 = tslib_1.__importDefault(require("assert")); const file_comparison_1 = require("./file-comparison"); const logger_1 = require("./logger"); const command_runner_1 = require("./command-runner"); /** * the main debugger test. */ class MainDebugger { /** * the main debugger test to update test data. * @param input the input. */ updateTestData(input) { input.packageJsonFilePath = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\package.json\\before.json'; input.packageJsonFilePathAfter = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\package.json\\after.json'; input.versionJsonFilePath = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\version.json\\before.json'; input.versionJsonFilePathAfter = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\version.json\\after.json'; input.tsconfigBaseFilePath = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\tsconfig.base.json\\before.json'; input.tsconfigBaseFilePathAfter = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\tsconfig.base.json\\after.json'; input.tsconfigFilePath = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\tsconfig.json\\before.json'; input.tsconfigFilePathAfter = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\tsconfig.json\\after.json'; input.gitIgnoreFilePath = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\gitignore\\before'; input.gitIngoreFilePathAfter = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\gitignore\\after'; input.angularJsonFilePath = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\angular.json\\before.json'; input.angularJsonFilePathAfter = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\angular.json\\after.json'; input.cIBuildYmlFilePath = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\ci-build.yml\\before.yml'; input.cIBuildYmlFilePathAfter = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\ci-build.yml\\after.yml'; input.pullRequestYmlFilePath = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\pull-request.yml\\before.yml'; input.pullRequestYmlFilePathAfter = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\pull-request.yml\\after.yml'; input.srcTsConfigLibProdFilePath = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\tsconfig.lib.prod.json\\before.json'; input.srcTsConfigLibProdFilePathAfter = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\tsconfig.lib.prod.json\\after.json'; input.srcTsConfigSpecFilePath = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\tsconfig.spec.json\\before.json'; input.srcTsConfigSpecFilePathAfter = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\tsconfig.spec.json\\after.json'; input.testTsFilePath = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\test.ts\\before.ts'; input.testTsFilePathAfter = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\test.ts\\after.ts'; input.gulpCompileTsFilePath = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\gulpfiles\\compile.ts'; input.gulpCompileTsFilePathAfter = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\module-template\\angular15\\gulpfile.ts\\common\\compile.ts'; input.gulpIndexTsFilePath = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\gulpfiles\\index.ts'; input.gulpIndexTsFilePathAfter = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\module-template\\angular15\\gulpfile.ts\\index.ts'; input.uiTestAutomationLegacyFilePath = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\ui-test-automation-package.json\\before.json'; input.uiTestAutomationLegacyFilePathAfter = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\ui-test-automation-package.json\\after.json'; input.logFilePath = 'C:\\Branches\\shell2\\msft-sme-shell\\packages\\tools\\wac-cli\\src\\angular15\\test\\gulpbuild\\log3.txt'; } /** * the main debugger test to verify test data. * @param input the input. */ async verifyTestData(input) { (0, assert_1.default)((0, file_comparison_1.fileComparison)(input.packageJsonFilePath, input.packageJsonFilePathAfter)); (0, assert_1.default)((0, file_comparison_1.fileComparison)(input.versionJsonFilePath, input.versionJsonFilePathAfter)); (0, assert_1.default)((0, file_comparison_1.fileComparison)(input.tsconfigBaseFilePath, input.tsconfigBaseFilePathAfter)); (0, assert_1.default)((0, file_comparison_1.fileComparison)(input.tsconfigFilePath, input.tsconfigFilePathAfter)); (0, assert_1.default)((0, file_comparison_1.fileComparison)(input.gitIgnoreFilePath, input.gitIngoreFilePathAfter)); (0, assert_1.default)((0, file_comparison_1.fileComparison)(input.angularJsonFilePath, input.angularJsonFilePathAfter)); (0, assert_1.default)((0, file_comparison_1.fileComparison)(input.testTsFilePath, input.testTsFilePathAfter)); (0, assert_1.default)((0, file_comparison_1.fileComparison)(input.cIBuildYmlFilePath, input.cIBuildYmlFilePathAfter)); (0, assert_1.default)((0, file_comparison_1.fileComparison)(input.pullRequestYmlFilePath, input.pullRequestYmlFilePathAfter)); (0, assert_1.default)((0, file_comparison_1.fileComparison)(input.srcTsConfigLibProdFilePath, input.srcTsConfigLibProdFilePathAfter)); (0, assert_1.default)((0, file_comparison_1.fileComparison)(input.srcTsConfigSpecFilePath, input.srcTsConfigSpecFilePathAfter)); (0, assert_1.default)((0, file_comparison_1.fileComparison)(input.gulpCompileTsFilePath, input.gulpCompileTsFilePathAfter)); (0, assert_1.default)((0, file_comparison_1.fileComparison)(input.gulpIndexTsFilePath, input.gulpIndexTsFilePathAfter)); (0, assert_1.default)((0, file_comparison_1.fileComparison)(input.uiTestAutomationLegacyFilePath, input.uiTestAutomationLegacyFilePathAfter)); await this.cleanUpTestData(); } /** * the main debugger test to clean up test data. */ async cleanUpTestData() { const cmd = 'git checkout packages\\tools\\wac-cli\\src\\angular15\\test'; logger_1.Logger.log(cmd); await (0, command_runner_1.runCommand)(cmd); } } exports.MainDebugger = MainDebugger; //# sourceMappingURL=main-debugger.js.map