diff --git a/lib/common/commands/preuninstall.ts b/lib/common/commands/preuninstall.ts index 478458f47a..780cf29438 100644 --- a/lib/common/commands/preuninstall.ts +++ b/lib/common/commands/preuninstall.ts @@ -3,14 +3,15 @@ import { doesCurrentNpmCommandMatch, isInteractive } from "../helpers"; import { TrackActionNames, AnalyticsEventLabelDelimiter } from "../../constants"; export class PreUninstallCommand implements ICommand { - private static FEEDBACK_FORM_URL = "https://www.nativescript.org/uninstall-feedback"; + // disabled for now (6/24/2020) + // private static FEEDBACK_FORM_URL = "https://www.nativescript.org/uninstall-feedback"; public allowedParameters: ICommandParameter[] = []; constructor(private $analyticsService: IAnalyticsService, private $extensibilityService: IExtensibilityService, private $fs: IFileSystem, - private $opener: IOpener, + // private $opener: IOpener, private $packageInstallationManager: IPackageInstallationManager, private $settingsService: ISettingsService) { } @@ -37,9 +38,11 @@ export class PreUninstallCommand implements ICommand { } private async handleFeedbackForm(): Promise { - if (isInteractive()) { - this.$opener.open(PreUninstallCommand.FEEDBACK_FORM_URL); - } + // disabled for now (6/24/2020) + // if (isInteractive()) { + // this.$opener.open(PreUninstallCommand.FEEDBACK_FORM_URL); + // } + return Promise.resolve(); } } diff --git a/lib/common/test/unit-tests/preuninstall.ts b/lib/common/test/unit-tests/preuninstall.ts index d1ca796b27..0d257f5265 100644 --- a/lib/common/test/unit-tests/preuninstall.ts +++ b/lib/common/test/unit-tests/preuninstall.ts @@ -135,19 +135,20 @@ describe("preuninstall", () => { assert.isTrue(isClearInspectorCacheCalled, "When uninstall is called, `clearInspectorCache` method must be called"); }); - it("opens the uninstall feedback form when terminal is interactive and uninstall is called", async () => { - helpers.doesCurrentNpmCommandMatch = () => true; - helpers.isInteractive = () => true; - - const testInjector = createTestInjector(); - const opener = testInjector.resolve("opener"); - const openParams: any[] = []; - opener.open = (filename: string, appname?: string) => { - openParams.push({ filename, appname }); - }; - - const preUninstallCommand: ICommand = testInjector.resolveCommand("dev-preuninstall"); - await preUninstallCommand.execute([]); - assert.deepEqual(openParams, [{ filename: "https://www.nativescript.org/uninstall-feedback", appname: undefined }]); - }); + // disabled (6/24/2020) + // it("opens the uninstall feedback form when terminal is interactive and uninstall is called", async () => { + // helpers.doesCurrentNpmCommandMatch = () => true; + // helpers.isInteractive = () => true; + + // const testInjector = createTestInjector(); + // const opener = testInjector.resolve("opener"); + // const openParams: any[] = []; + // opener.open = (filename: string, appname?: string) => { + // openParams.push({ filename, appname }); + // }; + + // const preUninstallCommand: ICommand = testInjector.resolveCommand("dev-preuninstall"); + // await preUninstallCommand.execute([]); + // assert.deepEqual(openParams, [{ filename: "https://www.nativescript.org/uninstall-feedback", appname: undefined }]); + // }); });