From af4b74d9bd107168180862be67916c7504dd8bb0 Mon Sep 17 00:00:00 2001 From: Janne Savolainen Date: Fri, 29 Jul 2022 15:55:16 +0300 Subject: [PATCH 01/35] Open application only if new update is available when using tray to check for updates (#5948) * Prevent opening of application if no new updates were downloaded when checking for updates using tray when application window is closed Signed-off-by: Janne Savolainen * Fix getting initial value of sync box Signed-off-by: Janne Savolainen * Tweak naming of variable Signed-off-by: Janne Savolainen --- ...alling-update-using-topbar-button.test.tsx | 11 ++- .../installing-update-using-tray.test.ts | 94 ++++++++++++++----- .../installing-update.test.ts | 13 +-- .../periodical-checking-of-updates.test.ts | 6 +- .../selection-of-update-stability.test.ts | 2 +- .../check-for-updates-tray-item.injectable.ts | 6 +- ...process-checking-for-updates.injectable.ts | 10 +- ...nitial-values-for-sync-boxes.injectable.ts | 20 +++- 8 files changed, 110 insertions(+), 52 deletions(-) diff --git a/src/behaviours/application-update/installing-update-using-topbar-button.test.tsx b/src/behaviours/application-update/installing-update-using-topbar-button.test.tsx index 855f1332d1..c6ff69d145 100644 --- a/src/behaviours/application-update/installing-update-using-topbar-button.test.tsx +++ b/src/behaviours/application-update/installing-update-using-topbar-button.test.tsx @@ -73,15 +73,14 @@ describe("encourage user to update when sufficient time passed since update was }); describe("given the update check", () => { - let processCheckingForUpdates: (source: string) => Promise; - let processCheckingForUpdatesPromise: Promise; + let processCheckingForUpdates: (source: string) => Promise<{ updateIsReadyToBeInstalled: boolean }>; beforeEach(async () => { processCheckingForUpdates = applicationBuilder.dis.mainDi.inject( processCheckingForUpdatesInjectable, ); - processCheckingForUpdatesPromise = processCheckingForUpdates("irrelevant"); + processCheckingForUpdates("irrelevant"); }); describe("when update downloaded", () => { @@ -94,7 +93,6 @@ describe("encourage user to update when sufficient time passed since update was }); await downloadPlatformUpdateMock.resolve({ downloadWasSuccessful: true }); - await processCheckingForUpdatesPromise; button = rendered.getByTestId("update-button"); }); @@ -107,6 +105,11 @@ describe("encourage user to update when sufficient time passed since update was expect(button).toHaveAttribute("data-warning-level", "light"); }); + // TODO: Implement after starting main and renderer is separated in ApplicationBuilder + xit("given closing the application window, when starting the application window again, still shows the button", () => { + expect(button).toBeInTheDocument(); + }); + describe("given some time passes, when checking for updates again", () => { beforeEach(() => { advanceFakeTime(daysToMilliseconds(2)); diff --git a/src/behaviours/application-update/installing-update-using-tray.test.ts b/src/behaviours/application-update/installing-update-using-tray.test.ts index 251cae45c8..1f8bf8992c 100644 --- a/src/behaviours/application-update/installing-update-using-tray.test.ts +++ b/src/behaviours/application-update/installing-update-using-tray.test.ts @@ -13,13 +13,14 @@ import type { AsyncFnMock } from "@async-fn/jest"; 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 showApplicationWindowInjectable from "../../main/start-main-application/lens-window/show-application-window.injectable"; +import closeAllWindowsInjectable from "../../main/start-main-application/lens-window/hide-all-windows/close-all-windows.injectable"; +import applicationWindowInjectable from "../../main/start-main-application/lens-window/application-window/application-window.injectable"; +import type { LensWindow } from "../../main/start-main-application/lens-window/application-window/lens-window-injection-token"; describe("installing update using tray", () => { let applicationBuilder: ApplicationBuilder; let checkForPlatformUpdatesMock: AsyncFnMock; let downloadPlatformUpdateMock: AsyncFnMock; - let showApplicationWindowMock: jest.Mock; beforeEach(() => { applicationBuilder = getApplicationBuilder(); @@ -27,9 +28,6 @@ describe("installing update using tray", () => { applicationBuilder.beforeApplicationStart(({ mainDi }) => { checkForPlatformUpdatesMock = asyncFn(); downloadPlatformUpdateMock = asyncFn(); - showApplicationWindowMock = jest.fn(); - - mainDi.override(showApplicationWindowInjectable, () => showApplicationWindowMock); mainDi.override( checkForPlatformUpdatesInjectable, @@ -61,15 +59,77 @@ describe("installing update using tray", () => { expect(applicationBuilder.tray.get("install-update")).toBeNull(); }); - describe("when user checks for updates using tray", () => { - let processCheckingForUpdatesPromise: Promise; + describe("given all application windows are closed, when checking for updates", () => { + let applicationWindow: LensWindow; + let closeAllWindows: () => void; - beforeEach(async () => { - processCheckingForUpdatesPromise = applicationBuilder.tray.click("check-for-updates"); + beforeEach(() => { + const mainDi = applicationBuilder.dis.mainDi; + + closeAllWindows = mainDi.inject(closeAllWindowsInjectable); + + applicationWindow = mainDi.inject(applicationWindowInjectable); + + closeAllWindows(); + + applicationBuilder.tray.click("check-for-updates"); }); - it("does not show application window yet", () => { - expect(showApplicationWindowMock).not.toHaveBeenCalled(); + describe("when check for update resolves with new update", () => { + beforeEach(async () => { + await checkForPlatformUpdatesMock.resolve({ + updateWasDiscovered: true, + version: "some-version", + }); + }); + + it("does not show application window yet", () => { + expect(applicationWindow.isVisible).toBe(false); + }); + + describe("when download of update resolves with success", () => { + beforeEach(async () => { + + await downloadPlatformUpdateMock.resolve({ downloadWasSuccessful: true }); + }); + + it("shows the application window", () => { + expect(applicationWindow.isVisible).toBe(true); + }); + + it("given closing application window again and checking for updates again using tray, when check resolves with same version that was earlier downloaded, shows the application window", async () => { + closeAllWindows(); + + applicationBuilder.tray.click("check-for-updates"); + + await checkForPlatformUpdatesMock.resolve({ + updateWasDiscovered: true, + version: "some-version", + }); + + expect(applicationWindow.isVisible).toBe(true); + }); + }); + + it("when download of update resolves with failure, does not show the application window", async () => { + await downloadPlatformUpdateMock.resolve({ downloadWasSuccessful: false }); + + expect(applicationWindow.isVisible).toBe(false); + }); + }); + + it("when process resolves without new update, does not show the application window", async () => { + await checkForPlatformUpdatesMock.resolve({ + updateWasDiscovered: false, + }); + + expect(applicationWindow.isVisible).toBe(false); + }); + }); + + describe("when user checks for updates using tray", () => { + beforeEach(() => { + applicationBuilder.tray.click("check-for-updates"); }); it("user cannot check for updates again", () => { @@ -97,12 +157,6 @@ describe("installing update using tray", () => { await checkForPlatformUpdatesMock.resolve({ updateWasDiscovered: false, }); - - await processCheckingForUpdatesPromise; - }); - - it("shows application window", () => { - expect(showApplicationWindowMock).toHaveBeenCalled(); }); it("user cannot install update", () => { @@ -132,12 +186,6 @@ describe("installing update using tray", () => { updateWasDiscovered: true, version: "some-version", }); - - await processCheckingForUpdatesPromise; - }); - - it("shows application window", () => { - expect(showApplicationWindowMock).toHaveBeenCalled(); }); it("user cannot check for updates again yet", () => { diff --git a/src/behaviours/application-update/installing-update.test.ts b/src/behaviours/application-update/installing-update.test.ts index 305e95d525..efc7da8498 100644 --- a/src/behaviours/application-update/installing-update.test.ts +++ b/src/behaviours/application-update/installing-update.test.ts @@ -63,7 +63,7 @@ describe("installing update", () => { describe("when started", () => { let rendered: RenderResult; - let processCheckingForUpdates: (source: string) => Promise; + let processCheckingForUpdates: (source: string) => Promise<{ updateIsReadyToBeInstalled: boolean }>; beforeEach(async () => { rendered = await applicationBuilder.render(); @@ -84,10 +84,8 @@ describe("installing update", () => { }); describe("when user checks for updates", () => { - let processCheckingForUpdatesPromise: Promise; - - beforeEach(async () => { - processCheckingForUpdatesPromise = processCheckingForUpdates("irrelevant"); + beforeEach(() => { + processCheckingForUpdates("irrelevant"); }); it("checks for updates", () => { @@ -112,8 +110,6 @@ describe("installing update", () => { await checkForPlatformUpdatesMock.resolve({ updateWasDiscovered: false, }); - - await processCheckingForUpdatesPromise; }); it("shows tray icon for normal", () => { @@ -137,8 +133,6 @@ describe("installing update", () => { updateWasDiscovered: true, version: "some-version", }); - - await processCheckingForUpdatesPromise; }); it("starts downloading the update", () => { @@ -243,7 +237,6 @@ describe("installing update", () => { "/some-static-files-directory/icons/trayIconCheckingForUpdatesTemplate.png", ); }); - }); }); }); diff --git a/src/behaviours/application-update/periodical-checking-of-updates.test.ts b/src/behaviours/application-update/periodical-checking-of-updates.test.ts index 37c9d4e92b..997f46f8e9 100644 --- a/src/behaviours/application-update/periodical-checking-of-updates.test.ts +++ b/src/behaviours/application-update/periodical-checking-of-updates.test.ts @@ -7,8 +7,6 @@ import { getApplicationBuilder } from "../../renderer/components/test-utils/get- import type { RenderResult } from "@testing-library/react"; import electronUpdaterIsActiveInjectable from "../../main/electron-app/features/electron-updater-is-active.injectable"; import publishIsConfiguredInjectable from "../../main/application-update/publish-is-configured.injectable"; -import type { AsyncFnMock } from "@async-fn/jest"; -import asyncFn from "@async-fn/jest"; import processCheckingForUpdatesInjectable from "../../main/application-update/check-for-updates/process-checking-for-updates.injectable"; import periodicalCheckForUpdatesInjectable from "../../main/application-update/periodical-check-for-updates/periodical-check-for-updates.injectable"; import { advanceFakeTime, useFakeTime } from "../../common/test-utils/use-fake-time"; @@ -17,7 +15,7 @@ const ENOUGH_TIME = 1000 * 60 * 60 * 2; describe("periodical checking of updates", () => { let applicationBuilder: ApplicationBuilder; - let processCheckingForUpdatesMock: AsyncFnMock<() => Promise>; + let processCheckingForUpdatesMock: jest.Mock; beforeEach(() => { useFakeTime("2015-10-21T07:28:00Z"); @@ -28,7 +26,7 @@ describe("periodical checking of updates", () => { mainDi.unoverride(periodicalCheckForUpdatesInjectable); mainDi.permitSideEffects(periodicalCheckForUpdatesInjectable); - processCheckingForUpdatesMock = asyncFn(); + processCheckingForUpdatesMock = jest.fn(); mainDi.override( processCheckingForUpdatesInjectable, diff --git a/src/behaviours/application-update/selection-of-update-stability.test.ts b/src/behaviours/application-update/selection-of-update-stability.test.ts index e90d92770f..c2407079df 100644 --- a/src/behaviours/application-update/selection-of-update-stability.test.ts +++ b/src/behaviours/application-update/selection-of-update-stability.test.ts @@ -67,7 +67,7 @@ describe("selection of update stability", () => { describe("when started", () => { let rendered: RenderResult; - let processCheckingForUpdates: (source: string) => Promise; + let processCheckingForUpdates: (source: string) => Promise<{ updateIsReadyToBeInstalled: boolean }>; beforeEach(async () => { rendered = await applicationBuilder.render(); diff --git a/src/main/application-update/check-for-updates-tray-item.injectable.ts b/src/main/application-update/check-for-updates-tray-item.injectable.ts index 29f39fa9d5..82bdbfbbd4 100644 --- a/src/main/application-update/check-for-updates-tray-item.injectable.ts +++ b/src/main/application-update/check-for-updates-tray-item.injectable.ts @@ -59,9 +59,11 @@ const checkForUpdatesTrayItemInjectable = getInjectable({ click: pipeline( async () => { - await processCheckingForUpdates("tray"); + const { updateIsReadyToBeInstalled } = await processCheckingForUpdates("tray"); - await showApplicationWindow(); + if (updateIsReadyToBeInstalled) { + await showApplicationWindow(); + } }, withErrorLoggingFor(() => "[TRAY]: Checking for updates failed."), 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 e737c67faf..b669c6a2ea 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 @@ -9,7 +9,6 @@ import discoveredUpdateVersionInjectable from "../../../common/application-updat import { runInAction } from "mobx"; import downloadUpdateInjectable from "../download-update/download-update.injectable"; import checkForUpdatesStartingFromChannelInjectable from "./check-for-updates-starting-from-channel.injectable"; -import withOrphanPromiseInjectable from "../../../common/utils/with-orphan-promise/with-orphan-promise.injectable"; import emitEventInjectable from "../../../common/app-event-bus/emit-event.injectable"; import { getCurrentDateTime } from "../../../common/utils/date/get-current-date-time"; @@ -22,7 +21,6 @@ const processCheckingForUpdatesInjectable = getInjectable({ const checkingForUpdatesState = di.inject(updatesAreBeingDiscoveredInjectable); const discoveredVersionState = di.inject(discoveredUpdateVersionInjectable); const checkForUpdatesStartingFromChannel = di.inject(checkForUpdatesStartingFromChannelInjectable); - const withOrphanPromise = di.inject(withOrphanPromiseInjectable); const emitEvent = di.inject(emitEventInjectable); return async (source: string) => { @@ -44,7 +42,7 @@ const processCheckingForUpdatesInjectable = getInjectable({ checkingForUpdatesState.set(false); }); - return; + return { updateIsReadyToBeInstalled: false }; } const { version, actualUpdateChannel } = result; @@ -56,7 +54,7 @@ const processCheckingForUpdatesInjectable = getInjectable({ checkingForUpdatesState.set(false); }); - return; + return { updateIsReadyToBeInstalled: true }; } emitEvent({ @@ -74,7 +72,9 @@ const processCheckingForUpdatesInjectable = getInjectable({ checkingForUpdatesState.set(false); }); - withOrphanPromise(async () => await downloadUpdate())(); + const { downloadWasSuccessful } = await downloadUpdate(); + + return { updateIsReadyToBeInstalled: downloadWasSuccessful }; }; }, }); diff --git a/src/renderer/utils/sync-box/provide-initial-values-for-sync-boxes.injectable.ts b/src/renderer/utils/sync-box/provide-initial-values-for-sync-boxes.injectable.ts index d49ea9dd9c..472aee497a 100644 --- a/src/renderer/utils/sync-box/provide-initial-values-for-sync-boxes.injectable.ts +++ b/src/renderer/utils/sync-box/provide-initial-values-for-sync-boxes.injectable.ts @@ -7,6 +7,10 @@ import { beforeFrameStartsInjectionToken } from "../../before-frame-starts/befor import syncBoxInitialValueChannelInjectable from "../../../common/utils/sync-box/sync-box-initial-value-channel.injectable"; import createSyncBoxStateInjectable from "../../../common/utils/sync-box/sync-box-state.injectable"; import { requestFromChannelInjectionToken } from "../../../common/utils/channel/request-from-channel-injection-token"; +import { runInAction } from "mobx"; +import type { SyncBox } from "../../../common/utils/sync-box/sync-box-injection-token"; +import { syncBoxInjectionToken } from "../../../common/utils/sync-box/sync-box-injection-token"; +import assert from "assert"; const provideInitialValuesForSyncBoxesInjectable = getInjectable({ id: "provide-initial-values-for-sync-boxes", @@ -14,14 +18,24 @@ const provideInitialValuesForSyncBoxesInjectable = getInjectable({ instantiate: (di) => { const requestFromChannel = di.inject(requestFromChannelInjectionToken); const syncBoxInitialValueChannel = di.inject(syncBoxInitialValueChannelInjectable); - const setSyncBoxState = (id: string, state: any) => di.inject(createSyncBoxStateInjectable, id).set(state); + + const syncBoxes = di.injectMany(syncBoxInjectionToken); + + const setSyncBoxState = (syncBox: SyncBox, state: any) => + di.inject(createSyncBoxStateInjectable, syncBox.id).set(state); return { run: async () => { const initialValues = await requestFromChannel(syncBoxInitialValueChannel); - initialValues.forEach(({ id, value }) => { - setSyncBoxState(id, value); + runInAction(() => { + initialValues.forEach(({ id, value }) => { + const syncBox = syncBoxes.find((box) => box.id === id); + + assert(syncBox); + + setSyncBoxState(syncBox, value); + }); }); }, }; From 94f82626e560c274cbab144396c5d35011e25348 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Jul 2022 14:31:20 -0400 Subject: [PATCH 02/35] Bump webpack from 5.73.0 to 5.74.0 (#5929) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 0caa48feed..6f45cb257b 100644 --- a/package.json +++ b/package.json @@ -418,7 +418,7 @@ "typedoc-plugin-markdown": "^3.13.1", "typescript": "^4.7.4", "typescript-plugin-css-modules": "^3.4.0", - "webpack": "^5.73.0", + "webpack": "^5.74.0", "webpack-cli": "^4.9.2", "webpack-dev-server": "^4.9.3", "webpack-node-externals": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index fa262e6abe..a28abd1153 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5241,10 +5241,10 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: dependencies: once "^1.4.0" -enhanced-resolve@^5.0.0, enhanced-resolve@^5.9.3: - version "5.9.3" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz#44a342c012cbc473254af5cc6ae20ebd0aae5d88" - integrity sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow== +enhanced-resolve@^5.0.0, enhanced-resolve@^5.10.0: + version "5.10.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz#0dc579c3bb2a1032e357ac45b8f3a6f3ad4fb1e6" + integrity sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" @@ -13228,10 +13228,10 @@ walker@^1.0.8: dependencies: makeerror "1.0.12" -watchpack@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.3.1.tgz#4200d9447b401156eeca7767ee610f8809bc9d25" - integrity sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA== +watchpack@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" + integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== dependencies: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" @@ -13360,21 +13360,21 @@ webpack-sources@^3.2.3: resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@^5, webpack@^5.1.0, webpack@^5.73.0: - version "5.73.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.73.0.tgz#bbd17738f8a53ee5760ea2f59dce7f3431d35d38" - integrity sha512-svjudQRPPa0YiOYa2lM/Gacw0r6PvxptHj4FuEKQ2kX05ZLkjbVc5MnPs6its5j7IZljnIqSVo/OsY2X0IpHGA== +webpack@^5, webpack@^5.1.0, webpack@^5.74.0: + version "5.74.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.74.0.tgz#02a5dac19a17e0bb47093f2be67c695102a55980" + integrity sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA== dependencies: "@types/eslint-scope" "^3.7.3" "@types/estree" "^0.0.51" "@webassemblyjs/ast" "1.11.1" "@webassemblyjs/wasm-edit" "1.11.1" "@webassemblyjs/wasm-parser" "1.11.1" - acorn "^8.4.1" + acorn "^8.7.1" acorn-import-assertions "^1.7.6" browserslist "^4.14.5" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.9.3" + enhanced-resolve "^5.10.0" es-module-lexer "^0.9.0" eslint-scope "5.1.1" events "^3.2.0" @@ -13387,7 +13387,7 @@ webpack@^5, webpack@^5.1.0, webpack@^5.73.0: schema-utils "^3.1.0" tapable "^2.1.1" terser-webpack-plugin "^5.1.3" - watchpack "^2.3.1" + watchpack "^2.4.0" webpack-sources "^3.2.3" websocket-driver@>=0.5.1, websocket-driver@^0.7.4: From f162c8b6ebba6a3cc7babb94908c0fc55fe670d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Jul 2022 14:31:27 -0400 Subject: [PATCH 03/35] Bump @typescript-eslint/parser from 5.30.5 to 5.31.0 (#5899) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 80 ++++++++++++++++++++++++++-------------------------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/package.json b/package.json index 6f45cb257b..7d04de70a7 100644 --- a/package.json +++ b/package.json @@ -352,7 +352,7 @@ "@types/webpack-env": "^1.17.0", "@types/webpack-node-externals": "^2.5.3", "@typescript-eslint/eslint-plugin": "^5.30.7", - "@typescript-eslint/parser": "^5.30.5", + "@typescript-eslint/parser": "^5.31.0", "ansi_up": "^5.1.0", "chart.js": "^2.9.4", "circular-dependency-plugin": "^5.2.2", diff --git a/yarn.lock b/yarn.lock index a28abd1153..7370e84284 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2546,24 +2546,16 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/parser@^5.30.5": - version "5.30.5" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.30.5.tgz#f667c34e4e4c299d98281246c9b1e68c03a92522" - integrity sha512-zj251pcPXI8GO9NDKWWmygP6+UjwWmrdf9qMW/L/uQJBM/0XbU2inxe5io/234y/RCvwpKEYjZ6c1YrXERkK4Q== +"@typescript-eslint/parser@^5.31.0": + version "5.31.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.31.0.tgz#7f42d7dcc68a0a6d80a0f3d9a65063aee7bb8d2c" + integrity sha512-UStjQiZ9OFTFReTrN+iGrC6O/ko9LVDhreEK5S3edmXgR396JGq7CoX2TWIptqt/ESzU2iRKXAHfSF2WJFcWHw== dependencies: - "@typescript-eslint/scope-manager" "5.30.5" - "@typescript-eslint/types" "5.30.5" - "@typescript-eslint/typescript-estree" "5.30.5" + "@typescript-eslint/scope-manager" "5.31.0" + "@typescript-eslint/types" "5.31.0" + "@typescript-eslint/typescript-estree" "5.31.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.30.5": - version "5.30.5" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.30.5.tgz#7f90b9d6800552c856a5f3644f5e55dd1469d964" - integrity sha512-NJ6F+YHHFT/30isRe2UTmIGGAiXKckCyMnIV58cE3JkHmaD6e5zyEYm5hBDv0Wbin+IC0T1FWJpD3YqHUG/Ydg== - dependencies: - "@typescript-eslint/types" "5.30.5" - "@typescript-eslint/visitor-keys" "5.30.5" - "@typescript-eslint/scope-manager@5.30.7": version "5.30.7" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.30.7.tgz#8269a931ef1e5ae68b5eb80743cc515c4ffe3dd7" @@ -2572,6 +2564,14 @@ "@typescript-eslint/types" "5.30.7" "@typescript-eslint/visitor-keys" "5.30.7" +"@typescript-eslint/scope-manager@5.31.0": + version "5.31.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.31.0.tgz#f47a794ba84d9b818ab7f8f44fff55a61016c606" + integrity sha512-8jfEzBYDBG88rcXFxajdVavGxb5/XKXyvWgvD8Qix3EEJLCFIdVloJw+r9ww0wbyNLOTYyBsR+4ALNGdlalLLg== + dependencies: + "@typescript-eslint/types" "5.31.0" + "@typescript-eslint/visitor-keys" "5.31.0" + "@typescript-eslint/type-utils@5.30.7": version "5.30.7" resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.30.7.tgz#5693dc3db6f313f302764282d614cfdbc8a9fcfd" @@ -2581,28 +2581,15 @@ debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@5.30.5": - version "5.30.5" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.30.5.tgz#36a0c05a72af3623cdf9ee8b81ea743b7de75a98" - integrity sha512-kZ80w/M2AvsbRvOr3PjaNh6qEW1LFqs2pLdo2s5R38B2HYXG8Z0PP48/4+j1QHJFL3ssHIbJ4odPRS8PlHrFfw== - "@typescript-eslint/types@5.30.7": version "5.30.7" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.30.7.tgz#18331487cc92d0f1fb1a6f580c8ec832528079d0" integrity sha512-ocVkETUs82+U+HowkovV6uxf1AnVRKCmDRNUBUUo46/5SQv1owC/EBFkiu4MOHeZqhKz2ktZ3kvJJ1uFqQ8QPg== -"@typescript-eslint/typescript-estree@5.30.5": - version "5.30.5" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.5.tgz#c520e4eba20551c4ec76af8d344a42eb6c9767bb" - integrity sha512-qGTc7QZC801kbYjAr4AgdOfnokpwStqyhSbiQvqGBLixniAKyH+ib2qXIVo4P9NgGzwyfD9I0nlJN7D91E1VpQ== - dependencies: - "@typescript-eslint/types" "5.30.5" - "@typescript-eslint/visitor-keys" "5.30.5" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - semver "^7.3.7" - tsutils "^3.21.0" +"@typescript-eslint/types@5.31.0": + version "5.31.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.31.0.tgz#7aa389122b64b18e473c1672fb3b8310e5f07a9a" + integrity sha512-/f/rMaEseux+I4wmR6mfpM2wvtNZb1p9hAV77hWfuKc3pmaANp5dLAZSiE3/8oXTYTt3uV9KW5yZKJsMievp6g== "@typescript-eslint/typescript-estree@5.30.7": version "5.30.7" @@ -2617,6 +2604,19 @@ semver "^7.3.7" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@5.31.0": + version "5.31.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.31.0.tgz#eb92970c9d6e3946690d50c346fb9b1d745ee882" + integrity sha512-3S625TMcARX71wBc2qubHaoUwMEn+l9TCsaIzYI/ET31Xm2c9YQ+zhGgpydjorwQO9pLfR/6peTzS/0G3J/hDw== + dependencies: + "@typescript-eslint/types" "5.31.0" + "@typescript-eslint/visitor-keys" "5.31.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + "@typescript-eslint/utils@5.30.7": version "5.30.7" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.30.7.tgz#7135be070349e9f7caa262b0ca59dc96123351bb" @@ -2629,14 +2629,6 @@ eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/visitor-keys@5.30.5": - version "5.30.5" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.5.tgz#d4bb969202019d5d5d849a0aaedc7370cc044b14" - integrity sha512-D+xtGo9HUMELzWIUqcQc0p2PO4NyvTrgIOK/VnSH083+8sq0tiLozNRKuLarwHYGRuA6TVBQSuuLwJUDWd3aaA== - dependencies: - "@typescript-eslint/types" "5.30.5" - eslint-visitor-keys "^3.3.0" - "@typescript-eslint/visitor-keys@5.30.7": version "5.30.7" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.7.tgz#c093abae75b4fd822bfbad9fc337f38a7a14909a" @@ -2645,6 +2637,14 @@ "@typescript-eslint/types" "5.30.7" eslint-visitor-keys "^3.3.0" +"@typescript-eslint/visitor-keys@5.31.0": + version "5.31.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.31.0.tgz#b0eca264df01ce85dceb76aebff3784629258f54" + integrity sha512-ZK0jVxSjS4gnPirpVjXHz7mgdOsZUHzNYSfTw2yPa3agfbt9YfqaBiBZFSSxeBWnpWkzCxTfUpnzA3Vily/CSg== + dependencies: + "@typescript-eslint/types" "5.31.0" + eslint-visitor-keys "^3.3.0" + "@webassemblyjs/ast@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7" From 485f213461c18fcf9a6563b3fc83449b2b696465 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Mon, 1 Aug 2022 03:22:49 -0700 Subject: [PATCH 04/35] Remove duplicate 'Controlled by' section on Jobs' details (#5943) Signed-off-by: Sebastian Malton --- .../+workloads-jobs/job-details.tsx | 30 +------------------ 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/src/renderer/components/+workloads-jobs/job-details.tsx b/src/renderer/components/+workloads-jobs/job-details.tsx index 81ca2ba8d2..24e6f9487e 100644 --- a/src/renderer/components/+workloads-jobs/job-details.tsx +++ b/src/renderer/components/+workloads-jobs/job-details.tsx @@ -11,7 +11,6 @@ import { disposeOnUnmount, observer } from "mobx-react"; import { DrawerItem } from "../drawer"; import { Badge } from "../badge"; import { PodDetailsStatuses } from "../+workloads-pods/pod-details-statuses"; -import { Link } from "react-router-dom"; import { PodDetailsTolerations } from "../+workloads-pods/pod-details-tolerations"; import { PodDetailsAffinities } from "../+workloads-pods/pod-details-affinities"; import type { JobStore } from "./store"; @@ -23,7 +22,6 @@ import { makeObservable, observable, reaction } from "mobx"; import { podMetricTabs, PodCharts } from "../+workloads-pods/pod-charts"; import { ClusterMetricsResourceType } from "../../../common/cluster-types"; import { ResourceMetrics } from "../resource-metrics"; -import type { ApiManager } from "../../../common/k8s-api/api-manager"; import logger from "../../../common/logger"; import { withInjectables } from "@ogre-tools/injectable-react"; import type { SubscribeStores } from "../../kube-watch-api/kube-watch-api"; @@ -32,9 +30,6 @@ import type { PodStore } from "../+workloads-pods/store"; import podStoreInjectable from "../+workloads-pods/store.injectable"; import jobStoreInjectable from "./store.injectable"; import type { GetActiveClusterEntity } from "../../api/catalog/entity/get-active-cluster-entity.injectable"; -import type { GetDetailsUrl } from "../kube-detail-params/get-details-url.injectable"; -import getDetailsUrlInjectable from "../kube-detail-params/get-details-url.injectable"; -import apiManagerInjectable from "../../../common/k8s-api/api-manager/manager.injectable"; import getActiveClusterEntityInjectable from "../../api/catalog/entity/get-active-cluster-entity.injectable"; export interface JobDetailsProps extends KubeObjectDetailsProps { @@ -45,8 +40,6 @@ interface Dependencies { podStore: PodStore; jobStore: JobStore; getActiveClusterEntity: GetActiveClusterEntity; - getDetailsUrl: GetDetailsUrl; - apiManager: ApiManager; } @observer @@ -76,7 +69,7 @@ class NonInjectedJobDetails extends React.Component )} - {ownerRefs.length > 0 && ( - - { - ownerRefs.map(ref => { - const { name, kind } = ref; - const detailsUrl = getDetailsUrl(apiManager.lookupApiLink(ref, job)); - - return ( -

- {kind} - {" "} - {name} -

- ); - }) - } -
- )} (NonInje subscribeStores: di.inject(subscribeStoresInjectable), podStore: di.inject(podStoreInjectable), jobStore: di.inject(jobStoreInjectable), - getDetailsUrl: di.inject(getDetailsUrlInjectable), - apiManager: di.inject(apiManagerInjectable), getActiveClusterEntity: di.inject(getActiveClusterEntityInjectable), }), }); From 07568839f60de2365e87d512990067d49b57865e Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Mon, 1 Aug 2022 03:25:29 -0700 Subject: [PATCH 05/35] Fix KubeObjectDetails drawer not working for Cluster scoped resources (#5954) - Fix not displaying spinner while object is not defined - Fix not displaying loading error if object is not defined Signed-off-by: Sebastian Malton --- src/common/k8s-api/kube-object.store.ts | 2 +- .../kube-object-details.tsx | 55 ++++++++----------- 2 files changed, 24 insertions(+), 33 deletions(-) diff --git a/src/common/k8s-api/kube-object.store.ts b/src/common/k8s-api/kube-object.store.ts index 8634e222ac..0af08e560c 100644 --- a/src/common/k8s-api/kube-object.store.ts +++ b/src/common/k8s-api/kube-object.store.ts @@ -355,7 +355,7 @@ export abstract class KubeObjectStore< async loadFromPath(resourcePath: string) { const { namespace, name } = parseKubeApi(resourcePath); - assert(name && namespace, "Both name and namesapce must be part of resourcePath"); + assert(name, "name must be part of resourcePath"); return this.load({ name, namespace }); } diff --git a/src/renderer/components/kube-object-details/kube-object-details.tsx b/src/renderer/components/kube-object-details/kube-object-details.tsx index 047df72cd4..e049cc4640 100644 --- a/src/renderer/components/kube-object-details/kube-object-details.tsx +++ b/src/renderer/components/kube-object-details/kube-object-details.tsx @@ -8,7 +8,7 @@ import "./kube-object-details.scss"; import React from "react"; import { disposeOnUnmount, observer } from "mobx-react"; import type { IComputedValue } from "mobx"; -import { computed, observable, reaction, makeObservable } from "mobx"; +import { observable, reaction, makeObservable } from "mobx"; import { Drawer } from "../drawer"; import type { KubeObject } from "../../../common/k8s-api/kube-object"; import { Spinner } from "../spinner"; @@ -51,11 +51,11 @@ class NonInjectedKubeObjectDetails extends React.Component { makeObservable(this); } - @computed get path() { + get path() { return this.props.kubeDetailsUrlParam.get(); } - @computed get object() { + get object() { return this.props.kubeObject.get(); } @@ -102,43 +102,32 @@ class NonInjectedKubeObjectDetails extends React.Component { } renderContents(object: KubeObject) { - const { isLoading, loadingError } = this; const details = this.props.detailComponents.get(); - const getContents = () => { - if (details.length === 0) { - const crd = this.props.customResourceDefinitionStore.getByObject(object); + if (details.length === 0) { + const crd = this.props.customResourceDefinitionStore.getByObject(object); - /** + /** * This is a fallback so that if a custom resource object doesn't have * any defined details we should try and display at least some details */ - if (crd) { - return ( - - ); - } else { - // if we still don't have any details to show, just show the standard object metadata - return ; - } + if (crd) { + return ( + + ); + } else { + // if we still don't have any details to show, just show the standard object metadata + return ; } + } - return details.map((DetailComponent, index) => ( - - )); - }; - - return ( - <> - {isLoading && } - {loadingError &&
{loadingError}
} - {getContents()} - - ); + return details.map((DetailComponent, index) => ( + + )); } render() { @@ -152,6 +141,8 @@ class NonInjectedKubeObjectDetails extends React.Component { toolbar={object && } onClose={this.props.hideDetails} > + {isLoading && } + {loadingError &&
{loadingError}
} {object && this.renderContents(object)} ); From 3d62d1c029fe9398f3d91839541a7a105dfe1ae6 Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Tue, 2 Aug 2022 15:24:53 +0300 Subject: [PATCH 06/35] Fix ingress list line heights (#5949) * Split ingress rules by multiple lines Signed-off-by: Alex Andreev * Force updating virtual list when rowHeights changed Signed-off-by: Alex Andreev * Replacing simple div selectors with more specific .ingressRule classnames Signed-off-by: Alex Andreev --- .../components/+network-ingresses/ingresses.scss | 13 +++++++++++-- .../components/+network-ingresses/ingresses.tsx | 8 ++++---- .../components/virtual-list/virtual-list.tsx | 2 +- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/renderer/components/+network-ingresses/ingresses.scss b/src/renderer/components/+network-ingresses/ingresses.scss index 6b072b5ed5..960ba3702f 100644 --- a/src/renderer/components/+network-ingresses/ingresses.scss +++ b/src/renderer/components/+network-ingresses/ingresses.scss @@ -5,6 +5,10 @@ .Ingresses { .TableCell { + &.checkbox .Checkbox { + align-items: flex-start; + } + &.rules { flex-grow: 3.0; overflow-x: scroll; @@ -14,8 +18,13 @@ display: none; } - span:not(:last-of-type) { - margin-right: 1em; + .ingressRule { + overflow: hidden; + text-overflow: ellipsis; + } + + .ingressRule + .ingressRule { + margin-top: 6px; } } diff --git a/src/renderer/components/+network-ingresses/ingresses.tsx b/src/renderer/components/+network-ingresses/ingresses.tsx index e117bc5a8e..1ca8589f80 100644 --- a/src/renderer/components/+network-ingresses/ingresses.tsx +++ b/src/renderer/components/+network-ingresses/ingresses.tsx @@ -58,7 +58,7 @@ export class Ingresses extends React.Component { computeRouteDeclarations(ingress).map(decl => ( decl.displayAsLink ? ( - + ) : ( - +
{`${decl.url} ⇢ ${decl.service}`} - +
) )), , diff --git a/src/renderer/components/virtual-list/virtual-list.tsx b/src/renderer/components/virtual-list/virtual-list.tsx index 3f318b5e9f..3ea0aebb1c 100644 --- a/src/renderer/components/virtual-list/virtual-list.tsx +++ b/src/renderer/components/virtual-list/virtual-list.tsx @@ -87,7 +87,7 @@ function VirtualListInner({ useEffect(() => { try { if (prevItems.current.length !== items.length || !isEqual(prevRowHeights.current, rowHeights)) { - listRef.current?.resetAfterIndex(0, false); + listRef.current?.resetAfterIndex(0); } } finally { prevItems.current = items; From 57e4e29a16007b9df44e1422dbcea9c10076f36d Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Tue, 2 Aug 2022 07:05:15 -0700 Subject: [PATCH 07/35] Fix not being able to switch metrics if none are available (#5430) Co-authored-by: Alex Andreev --- .../+cluster/cluster-metric-switchers.tsx | 38 ++++++++++++++----- .../+cluster/cluster-metrics.module.scss | 2 +- src/renderer/components/radio/radio.scss | 5 +++ src/renderer/components/radio/radio.tsx | 1 + 4 files changed, 35 insertions(+), 11 deletions(-) diff --git a/src/renderer/components/+cluster/cluster-metric-switchers.tsx b/src/renderer/components/+cluster/cluster-metric-switchers.tsx index 32c3dce572..716084026d 100644 --- a/src/renderer/components/+cluster/cluster-metric-switchers.tsx +++ b/src/renderer/components/+cluster/cluster-metric-switchers.tsx @@ -6,13 +6,13 @@ import React from "react"; import { observer } from "mobx-react"; import type { NodeStore } from "../+nodes/store"; -import { cssNames } from "../../utils"; import { Radio, RadioGroup } from "../radio"; import type { ClusterOverviewStore } from "./cluster-overview-store/cluster-overview-store"; import { MetricNodeRole, MetricType } from "./cluster-overview-store/cluster-overview-store"; import clusterOverviewStoreInjectable from "./cluster-overview-store/cluster-overview-store.injectable"; import { withInjectables } from "@ogre-tools/injectable-react"; import nodeStoreInjectable from "../+nodes/store.injectable"; +import { normalizeMetrics } from "../../../common/k8s-api/endpoints/metrics.api"; interface Dependencies { clusterOverviewStore: ClusterOverviewStore; @@ -24,32 +24,50 @@ const NonInjectedClusterMetricSwitchers = observer(({ nodeStore, }: Dependencies) => { const { masterNodes, workerNodes } = nodeStore; - const metricsValues = clusterOverviewStore.getMetricsValues(clusterOverviewStore.metrics); - const disableRoles = !masterNodes.length || !workerNodes.length; - const disableMetrics = !metricsValues.length; + const { cpuUsage, memoryUsage } = clusterOverviewStore.metrics; + const hasMasterNodes = masterNodes.length > 0; + const hasWorkerNodes = workerNodes.length > 0; + const hasCpuMetrics = normalizeMetrics(cpuUsage).data.result[0].values.length > 0; + const hasMemoryMetrics = normalizeMetrics(memoryUsage).data.result[0].values.length > 0; return (
clusterOverviewStore.metricNodeRole = metric} > - - + +
clusterOverviewStore.metricType = value} > - - + +
diff --git a/src/renderer/components/+cluster/cluster-metrics.module.scss b/src/renderer/components/+cluster/cluster-metrics.module.scss index 06bba97b0d..8f45b01913 100644 --- a/src/renderer/components/+cluster/cluster-metrics.module.scss +++ b/src/renderer/components/+cluster/cluster-metrics.module.scss @@ -17,7 +17,7 @@ } .empty { - margin-top: -45px; text-align: center; + padding-bottom: 45px; } } diff --git a/src/renderer/components/radio/radio.scss b/src/renderer/components/radio/radio.scss index 21d0e8f81b..c74c9f5058 100644 --- a/src/renderer/components/radio/radio.scss +++ b/src/renderer/components/radio/radio.scss @@ -21,6 +21,11 @@ white-space: nowrap; transition: 250ms color; + &.disabled { + opacity: 0.6; + pointer-events: none; + } + &:not(.checked):not(.disabled) { cursor: pointer; &:not(:active):focus { diff --git a/src/renderer/components/radio/radio.tsx b/src/renderer/components/radio/radio.tsx index 554b54de21..bcfd43de9a 100644 --- a/src/renderer/components/radio/radio.tsx +++ b/src/renderer/components/radio/radio.tsx @@ -85,6 +85,7 @@ export function Radio({ type="radio" checked={checked} onChange={() => ctx.onSelect(value)} + disabled={disabled || ctx.disabled} /> {label ?
{label}
: null} From 83232440dc2d449b453f3f268d443c32ec82d55a Mon Sep 17 00:00:00 2001 From: Janne Savolainen Date: Tue, 2 Aug 2022 17:06:37 +0300 Subject: [PATCH 08/35] Replace individual mocks for withTooltip with global mock (#5962) --- ...ation-using-application-menu.test.tsx.snap | 7 +- ...navigation-using-application-menu.test.tsx | 10 - .../order-of-sidebar-items.test.tsx.snap | 38 +- ...-and-tab-navigation-for-core.test.tsx.snap | 133 +++--- ...ab-navigation-for-extensions.test.tsx.snap | 128 ++++-- .../visibility-of-sidebar-items.test.tsx.snap | 38 +- ...when-cluster-is-not-relevant.test.tsx.snap | 57 ++- ...when-cluster-is-not-relevant.test.tsx.snap | 57 ++- ...when-cluster-is-not-relevant.test.tsx.snap | 87 ++-- ...when-cluster-is-not-relevant.test.tsx.snap | 57 ++- ...how-status-for-a-kube-object.test.tsx.snap | 24 -- ...when-cluster-is-not-relevant.test.tsx.snap | 87 +++- .../show-status-for-a-kube-object.test.tsx | 25 -- .../edit-namespace-from-new-tab.test.tsx.snap | 78 ---- ...e-from-previously-opened-tab.test.tsx.snap | 8 - .../edit-namespace-from-new-tab.test.tsx | 25 -- ...espace-from-previously-opened-tab.test.tsx | 25 -- ...and-tab-navigation-for-extensions.test.tsx | 5 - ...when-cluster-is-not-relevant.test.tsx.snap | 57 ++- ...elm-repository-in-preferences.test.ts.snap | 106 ++++- ...tory-from-list-in-preferences.test.ts.snap | 60 ++- ...m-repositories-in-preferences.test.ts.snap | 12 +- ...ive-repository-in-preferences.test.ts.snap | 12 +- ...tom-helm-repository-in-preferences.test.ts | 5 - ...epository-from-list-in-preferences.test.ts | 5 - ...lling-helm-chart-from-new-tab.test.ts.snap | 328 +++++++++++---- ...rt-from-previously-opened-tab.test.ts.snap | 32 +- ...tab-for-installing-helm-chart.test.ts.snap | 84 +++- ...installing-helm-chart-from-new-tab.test.ts | 5 - ...m-chart-from-previously-opened-tab.test.ts | 5 - ...dock-tab-for-installing-helm-chart.test.ts | 5 - ...e-helm-repositories-in-preferences.test.ts | 5 - ...f-active-repository-in-preferences.test.ts | 5 - ...wing-details-for-helm-release.test.ts.snap | 398 +++++++++++++----- .../showing-details-for-helm-release.test.ts | 5 - src/jest.setup.ts | 1 + .../tooltip/__mocks__/withTooltip.tsx | 24 ++ .../__snapshots__/cluster-frame.test.tsx.snap | 57 ++- 38 files changed, 1347 insertions(+), 753 deletions(-) create mode 100644 src/renderer/components/tooltip/__mocks__/withTooltip.tsx diff --git a/src/behaviours/add-cluster/__snapshots__/navigation-using-application-menu.test.tsx.snap b/src/behaviours/add-cluster/__snapshots__/navigation-using-application-menu.test.tsx.snap index 46cb3aeaa1..991a77480a 100644 --- a/src/behaviours/add-cluster/__snapshots__/navigation-using-application-menu.test.tsx.snap +++ b/src/behaviours/add-cluster/__snapshots__/navigation-using-application-menu.test.tsx.snap @@ -288,7 +288,11 @@ exports[`add-cluster - navigation using application menu when navigating to add

+ > +