From ae2430a95b35b67c3ef171e4db960a42fe769631 Mon Sep 17 00:00:00 2001 From: Jim Ehrismann Date: Wed, 29 Jun 2022 13:50:00 -0400 Subject: [PATCH] cleanup after rebase to master Signed-off-by: Jim Ehrismann --- ...g-update-using-topbar-button.test.tsx.snap | 12 +- .../installing-update-using-tray.test.ts.snap | 415 +--------------- .../installing-update.test.ts | 20 - ...process-checking-for-updates.injectable.ts | 7 +- .../__snapshots__/ask-boolean.test.ts.snap | 456 ------------------ 5 files changed, 17 insertions(+), 893 deletions(-) delete mode 100644 src/main/ask-boolean/__snapshots__/ask-boolean.test.ts.snap diff --git a/src/behaviours/application-update/__snapshots__/installing-update-using-topbar-button.test.tsx.snap b/src/behaviours/application-update/__snapshots__/installing-update-using-topbar-button.test.tsx.snap index de3b14e3d2..8d03facb2a 100644 --- a/src/behaviours/application-update/__snapshots__/installing-update-using-topbar-button.test.tsx.snap +++ b/src/behaviours/application-update/__snapshots__/installing-update-using-topbar-button.test.tsx.snap @@ -53,7 +53,17 @@ exports[`encourage user to update when sufficient time passed since update was d >
+ > +
+
+ No new updates available +
+
+
diff --git a/src/behaviours/application-update/__snapshots__/installing-update-using-tray.test.ts.snap b/src/behaviours/application-update/__snapshots__/installing-update-using-tray.test.ts.snap index 623e3785d5..a1ce8c4757 100644 --- a/src/behaviours/application-update/__snapshots__/installing-update-using-tray.test.ts.snap +++ b/src/behaviours/application-update/__snapshots__/installing-update-using-tray.test.ts.snap @@ -148,48 +148,7 @@ exports[`installing update using tray when started when user checks for updates
-
-
- - - info_outline - - -
-
- Checking for updates... -
-
- - - close - - -
-
-
+ /> `; @@ -267,88 +226,7 @@ exports[`installing update using tray when started when user checks for updates
-
-
- - - info_outline - - -
-
- Checking for updates... -
-
- - - close - - -
-
-
-
- - - info_outline - - -
-
- Download for version some-version started... -
-
- - - close - - -
-
-
+ /> `; @@ -441,128 +319,7 @@ exports[`installing update using tray when started when user checks for updates
-
-
- - - info_outline - - -
-
- Checking for updates... -
-
- - - close - - -
-
-
-
- - - info_outline - - -
-
- Download for version some-version started... -
-
- - - close - - -
-
-
-
- - - info_outline - - -
-
- Download of update failed -
-
- - - close - - -
-
-
+ /> `; @@ -655,88 +412,7 @@ exports[`installing update using tray when started when user checks for updates
-
-
- - - info_outline - - -
-
- Checking for updates... -
-
- - - close - - -
-
-
-
- - - info_outline - - -
-
- Download for version some-version started... -
-
- - - close - - -
-
-
+ /> `; @@ -811,88 +487,7 @@ exports[`installing update using tray when started when user checks for updates
-
-
- - - info_outline - - -
-
- Checking for updates... -
-
- - - close - - -
-
-
-
- - - info_outline - - -
-
- No new updates available -
-
- - - close - - -
-
-
+ /> `; diff --git a/src/behaviours/application-update/installing-update.test.ts b/src/behaviours/application-update/installing-update.test.ts index 6a8f99cc76..2fdc9cac75 100644 --- a/src/behaviours/application-update/installing-update.test.ts +++ b/src/behaviours/application-update/installing-update.test.ts @@ -15,12 +15,6 @@ import asyncFn from "@async-fn/jest"; import type { DownloadPlatformUpdate } from "../../main/application-update/download-platform-update/download-platform-update.injectable"; import downloadPlatformUpdateInjectable from "../../main/application-update/download-platform-update/download-platform-update.injectable"; import setUpdateOnQuitInjectable from "../../main/electron-app/features/set-update-on-quit.injectable"; -<<<<<<< HEAD -import showInfoNotificationInjectable from "../../renderer/components/notifications/show-info-notification.injectable"; -======= -import type { AskBoolean } from "../../main/ask-boolean/ask-boolean.injectable"; -import askBooleanInjectable from "../../main/ask-boolean/ask-boolean.injectable"; ->>>>>>> 035dcaf34f (fixed tests) import processCheckingForUpdatesInjectable from "../../main/application-update/check-for-updates/process-checking-for-updates.injectable"; describe("installing update", () => { @@ -29,11 +23,6 @@ describe("installing update", () => { let checkForPlatformUpdatesMock: AsyncFnMock; let downloadPlatformUpdateMock: AsyncFnMock; let setUpdateOnQuitMock: jest.Mock; -<<<<<<< HEAD - let showInfoNotificationMock: jest.Mock; -======= - let askBooleanMock: AsyncFnMock; ->>>>>>> 035dcaf34f (fixed tests) beforeEach(() => { jest.useFakeTimers(); @@ -45,16 +34,7 @@ describe("installing update", () => { checkForPlatformUpdatesMock = asyncFn(); downloadPlatformUpdateMock = asyncFn(); setUpdateOnQuitMock = jest.fn(); -<<<<<<< HEAD - showInfoNotificationMock = jest.fn(() => () => {}); - rendererDi.override(showInfoNotificationInjectable, () => showInfoNotificationMock); - -======= - askBooleanMock = asyncFn(); - - mainDi.override(askBooleanInjectable, () => askBooleanMock); ->>>>>>> 035dcaf34f (fixed tests) mainDi.override(setUpdateOnQuitInjectable, () => setUpdateOnQuitMock); mainDi.override( diff --git a/src/main/application-update/check-for-updates/process-checking-for-updates.injectable.ts b/src/main/application-update/check-for-updates/process-checking-for-updates.injectable.ts index 5b17dbe1ac..73cab8d300 100644 --- a/src/main/application-update/check-for-updates/process-checking-for-updates.injectable.ts +++ b/src/main/application-update/check-for-updates/process-checking-for-updates.injectable.ts @@ -64,12 +64,7 @@ const processCheckingForUpdatesInjectable = getInjectable({ checkingForUpdatesState.set(false); }); - withOrphanPromise(async () => { - const { downloadWasSuccessful } = await downloadUpdate(); - - if (!downloadWasSuccessful) { - } - })(); + withOrphanPromise(async () => await downloadUpdate())(); }; }, }); diff --git a/src/main/ask-boolean/__snapshots__/ask-boolean.test.ts.snap b/src/main/ask-boolean/__snapshots__/ask-boolean.test.ts.snap deleted file mode 100644 index bb6809e345..0000000000 --- a/src/main/ask-boolean/__snapshots__/ask-boolean.test.ts.snap +++ /dev/null @@ -1,456 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ask-boolean given started when asking multiple questions renders 1`] = ` - -
-
-
-
-
- No new updates available -
-
-
-
-
-
-
-
- - - info_outline - - -
-
-
- - some-title - -

- Some question -

-
- - -
-
-
-
- - - close - - -
-
-
-
- - - info_outline - - -
-
-
- - some-other-title - -

- Some other question -

-
- - -
-
-
-
- - - close - - -
-
-
-
- -`; - -exports[`ask-boolean given started when asking multiple questions when answering to first question renders 1`] = ` - -
-
-
-
-
- No new updates available -
-
-
-
-
-
-
-
- - - info_outline - - -
-
-
- - some-other-title - -

- Some other question -

-
- - -
-
-
-
- - - close - - -
-
-
-
- -`; - -exports[`ask-boolean given started when asking question renders 1`] = ` - -
-
-
-
-
- No new updates available -
-
-
-
-
-
-
-
- - - info_outline - - -
-
-
- - some-title - -

- Some question -

-
- - -
-
-
-
- - - close - - -
-
-
-
- -`; - -exports[`ask-boolean given started when asking question when user answers "no" renders 1`] = ` - -
-
-
-
-
- No new updates available -
-
-
-
-
-
-
- -`; - -exports[`ask-boolean given started when asking question when user answers "yes" renders 1`] = ` - -
-
-
-
-
- No new updates available -
-
-
-
-
-
-
- -`; - -exports[`ask-boolean given started when asking question when user closes notification without answering the question renders 1`] = ` - -
-
-
-
-
- No new updates available -
-
-
-
-
-
-
- -`;