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
+ >
+
+
@@ -299,6 +303,7 @@ exports[`add-cluster - navigation using application menu when navigating to add
>
Add clusters
+
({
- withTooltip: (Target: any) => ({ tooltip, tooltipOverrideDisabled, ...props }: any) =>
,
-}));
-
-jest.mock("../../renderer/components/monaco-editor/monaco-editor", () => ({
- MonacoEditor: () => null,
-}));
describe("add-cluster - navigation using application menu", () => {
let applicationBuilder: ApplicationBuilder;
diff --git a/src/behaviours/cluster/__snapshots__/order-of-sidebar-items.test.tsx.snap b/src/behaviours/cluster/__snapshots__/order-of-sidebar-items.test.tsx.snap
index 0b424f4ce2..3dccc2e925 100644
--- a/src/behaviours/cluster/__snapshots__/order-of-sidebar-items.test.tsx.snap
+++ b/src/behaviours/cluster/__snapshots__/order-of-sidebar-items.test.tsx.snap
@@ -503,7 +503,6 @@ exports[`cluster - order of sidebar items when rendered renders 1`] = `
>
close
-
+
+ Close ⌘+W
+
@@ -537,12 +538,13 @@ exports[`cluster - order of sidebar items when rendered renders 1`] = `
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
@@ -1135,7 +1140,6 @@ exports[`cluster - order of sidebar items when rendered when parent is expanded
>
close
-
+
+ Close ⌘+W
+
@@ -1169,12 +1175,13 @@ exports[`cluster - order of sidebar items when rendered when parent is expanded
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
diff --git a/src/behaviours/cluster/__snapshots__/sidebar-and-tab-navigation-for-core.test.tsx.snap b/src/behaviours/cluster/__snapshots__/sidebar-and-tab-navigation-for-core.test.tsx.snap
index a8c3fc1cd3..8928a59b25 100644
--- a/src/behaviours/cluster/__snapshots__/sidebar-and-tab-navigation-for-core.test.tsx.snap
+++ b/src/behaviours/cluster/__snapshots__/sidebar-and-tab-navigation-for-core.test.tsx.snap
@@ -472,7 +472,6 @@ exports[`cluster - sidebar and tab navigation for core given core registrations
>
close
-
+
+ Close ⌘+W
+
@@ -506,12 +507,13 @@ exports[`cluster - sidebar and tab navigation for core given core registrations
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
@@ -1015,7 +1020,6 @@ exports[`cluster - sidebar and tab navigation for core given core registrations
>
close
-
+
+ Close ⌘+W
+
@@ -1049,12 +1055,13 @@ exports[`cluster - sidebar and tab navigation for core given core registrations
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
@@ -1580,7 +1590,6 @@ exports[`cluster - sidebar and tab navigation for core given core registrations
>
close
-
+
+ Close ⌘+W
+
@@ -1614,12 +1625,13 @@ exports[`cluster - sidebar and tab navigation for core given core registrations
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
@@ -2026,7 +2041,6 @@ exports[`cluster - sidebar and tab navigation for core given core registrations
>
close
-
+
+ Close ⌘+W
+
@@ -2060,12 +2076,13 @@ exports[`cluster - sidebar and tab navigation for core given core registrations
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
@@ -2449,7 +2469,6 @@ exports[`cluster - sidebar and tab navigation for core given core registrations
>
close
-
+
+ Close ⌘+W
+
@@ -2483,12 +2504,13 @@ exports[`cluster - sidebar and tab navigation for core given core registrations
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
@@ -3014,7 +3039,6 @@ exports[`cluster - sidebar and tab navigation for core given core registrations
>
close
-
+
+ Close ⌘+W
+
@@ -3048,12 +3074,13 @@ exports[`cluster - sidebar and tab navigation for core given core registrations
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
@@ -3557,7 +3587,6 @@ exports[`cluster - sidebar and tab navigation for core given core registrations
>
close
-
+
+ Close ⌘+W
+
@@ -3591,12 +3622,13 @@ exports[`cluster - sidebar and tab navigation for core given core registrations
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
diff --git a/src/behaviours/cluster/__snapshots__/sidebar-and-tab-navigation-for-extensions.test.tsx.snap b/src/behaviours/cluster/__snapshots__/sidebar-and-tab-navigation-for-extensions.test.tsx.snap
index 4c2b28d53e..b9cc0addaf 100644
--- a/src/behaviours/cluster/__snapshots__/sidebar-and-tab-navigation-for-extensions.test.tsx.snap
+++ b/src/behaviours/cluster/__snapshots__/sidebar-and-tab-navigation-for-extensions.test.tsx.snap
@@ -473,7 +473,6 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
+
+ Close ⌘+W
+
@@ -498,7 +500,6 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Open
+
@@ -1013,7 +1021,6 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
+
+ Close ⌘+W
+
@@ -1038,7 +1048,6 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Open
+
@@ -1593,7 +1609,6 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
+
+ Close ⌘+W
+
@@ -1618,7 +1636,6 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Open
+
@@ -2093,7 +2117,6 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
+
+ Close ⌘+W
+
@@ -2118,7 +2144,6 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Open
+
@@ -2593,7 +2625,6 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
+
+ Close ⌘+W
+
@@ -2618,7 +2652,6 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Open
+
@@ -3052,7 +3092,6 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
+
+ Close ⌘+W
+
@@ -3077,7 +3119,6 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Open
+
@@ -3632,7 +3680,6 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
+
+ Close ⌘+W
+
@@ -3657,7 +3707,6 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Open
+
@@ -4172,7 +4228,6 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
+
+ Close ⌘+W
+
@@ -4197,7 +4255,6 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Open
+
diff --git a/src/behaviours/cluster/__snapshots__/visibility-of-sidebar-items.test.tsx.snap b/src/behaviours/cluster/__snapshots__/visibility-of-sidebar-items.test.tsx.snap
index 52e34c351e..bba303f5b7 100644
--- a/src/behaviours/cluster/__snapshots__/visibility-of-sidebar-items.test.tsx.snap
+++ b/src/behaviours/cluster/__snapshots__/visibility-of-sidebar-items.test.tsx.snap
@@ -442,7 +442,6 @@ exports[`cluster - visibility of sidebar items given kube resource for route is
>
close
-
+
+ Close ⌘+W
+
@@ -476,12 +477,13 @@ exports[`cluster - visibility of sidebar items given kube resource for route is
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
@@ -999,7 +1004,6 @@ exports[`cluster - visibility of sidebar items given kube resource for route is
>
close
-
+
+ Close ⌘+W
+
@@ -1033,12 +1039,13 @@ exports[`cluster - visibility of sidebar items given kube resource for route is
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
diff --git a/src/behaviours/cluster/extension-api/__snapshots__/disable-cluster-pages-when-cluster-is-not-relevant.test.tsx.snap b/src/behaviours/cluster/extension-api/__snapshots__/disable-cluster-pages-when-cluster-is-not-relevant.test.tsx.snap
index 06e67e8ef2..1ec0fb09cb 100644
--- a/src/behaviours/cluster/extension-api/__snapshots__/disable-cluster-pages-when-cluster-is-not-relevant.test.tsx.snap
+++ b/src/behaviours/cluster/extension-api/__snapshots__/disable-cluster-pages-when-cluster-is-not-relevant.test.tsx.snap
@@ -324,7 +324,6 @@ exports[`disable-cluster-pages-when-cluster-is-not-relevant given extension shou
>
close
-
+
+ Close ⌘+W
+
@@ -358,12 +359,13 @@ exports[`disable-cluster-pages-when-cluster-is-not-relevant given extension shou
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
@@ -839,7 +844,6 @@ exports[`disable-cluster-pages-when-cluster-is-not-relevant given extension shou
>
close
-
+
+ Close ⌘+W
+
@@ -873,12 +879,13 @@ exports[`disable-cluster-pages-when-cluster-is-not-relevant given extension shou
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
@@ -1354,7 +1364,6 @@ exports[`disable-cluster-pages-when-cluster-is-not-relevant given not yet known
>
close
-
+
+ Close ⌘+W
+
@@ -1388,12 +1399,13 @@ exports[`disable-cluster-pages-when-cluster-is-not-relevant given not yet known
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
diff --git a/src/behaviours/cluster/extension-api/__snapshots__/disable-sidebar-items-when-cluster-is-not-relevant.test.tsx.snap b/src/behaviours/cluster/extension-api/__snapshots__/disable-sidebar-items-when-cluster-is-not-relevant.test.tsx.snap
index f145e3fb44..2a7214e3cd 100644
--- a/src/behaviours/cluster/extension-api/__snapshots__/disable-sidebar-items-when-cluster-is-not-relevant.test.tsx.snap
+++ b/src/behaviours/cluster/extension-api/__snapshots__/disable-sidebar-items-when-cluster-is-not-relevant.test.tsx.snap
@@ -463,7 +463,6 @@ exports[`disable sidebar items when cluster is not relevant given extension shou
>
close
-
+
+ Close ⌘+W
+
@@ -497,12 +498,13 @@ exports[`disable sidebar items when cluster is not relevant given extension shou
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
@@ -978,7 +983,6 @@ exports[`disable sidebar items when cluster is not relevant given extension shou
>
close
-
+
+ Close ⌘+W
+
@@ -1012,12 +1018,13 @@ exports[`disable sidebar items when cluster is not relevant given extension shou
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
@@ -1493,7 +1503,6 @@ exports[`disable sidebar items when cluster is not relevant given not yet known
>
close
-
+
+ Close ⌘+W
+
@@ -1527,12 +1538,13 @@ exports[`disable sidebar items when cluster is not relevant given not yet known
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
diff --git a/src/behaviours/cluster/kube-object-details/extension-api/__snapshots__/disable-kube-object-detail-items-when-cluster-is-not-relevant.test.tsx.snap b/src/behaviours/cluster/kube-object-details/extension-api/__snapshots__/disable-kube-object-detail-items-when-cluster-is-not-relevant.test.tsx.snap
index 0db43bda6f..4d415c6ae4 100644
--- a/src/behaviours/cluster/kube-object-details/extension-api/__snapshots__/disable-kube-object-detail-items-when-cluster-is-not-relevant.test.tsx.snap
+++ b/src/behaviours/cluster/kube-object-details/extension-api/__snapshots__/disable-kube-object-detail-items-when-cluster-is-not-relevant.test.tsx.snap
@@ -281,7 +281,6 @@ exports[`disable kube object detail items when cluster is not relevant given ext
some-kind: some-name
content_copy
-
+
+ Copy
+
close
-
+
+ Close
+
@@ -413,12 +416,13 @@ exports[`disable kube object detail items when cluster is not relevant given ext
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
@@ -732,7 +739,6 @@ exports[`disable kube object detail items when cluster is not relevant given ext
some-kind: some-name
content_copy
-
+
+ Copy
+
close
-
+
+ Close
+
@@ -902,12 +912,13 @@ exports[`disable kube object detail items when cluster is not relevant given ext
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
@@ -1221,7 +1235,6 @@ exports[`disable kube object detail items when cluster is not relevant given not
some-kind: some-name
content_copy
-
+
+ Copy
+
close
-
+
+ Close
+
@@ -1391,12 +1408,13 @@ exports[`disable kube object detail items when cluster is not relevant given not
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
diff --git a/src/behaviours/cluster/kube-object-menu/extension-api/__snapshots__/disable-kube-object-menu-items-when-cluster-is-not-relevant.test.tsx.snap b/src/behaviours/cluster/kube-object-menu/extension-api/__snapshots__/disable-kube-object-menu-items-when-cluster-is-not-relevant.test.tsx.snap
index 8f3d0685f6..9ae3f382cf 100644
--- a/src/behaviours/cluster/kube-object-menu/extension-api/__snapshots__/disable-kube-object-menu-items-when-cluster-is-not-relevant.test.tsx.snap
+++ b/src/behaviours/cluster/kube-object-menu/extension-api/__snapshots__/disable-kube-object-menu-items-when-cluster-is-not-relevant.test.tsx.snap
@@ -329,7 +329,6 @@ exports[`disable kube object menu items when cluster is not relevant given exten
>
close
-
+
+ Close ⌘+W
+
@@ -363,12 +364,13 @@ exports[`disable kube object menu items when cluster is not relevant given exten
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
@@ -724,7 +729,6 @@ exports[`disable kube object menu items when cluster is not relevant given exten
>
close
-
+
+ Close ⌘+W
+
@@ -758,12 +764,13 @@ exports[`disable kube object menu items when cluster is not relevant given exten
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
@@ -1119,7 +1129,6 @@ exports[`disable kube object menu items when cluster is not relevant given not y
>
close
-
+
+ Close ⌘+W
+
@@ -1153,12 +1164,13 @@ exports[`disable kube object menu items when cluster is not relevant given not y
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
diff --git a/src/behaviours/cluster/kube-object-status-icon/__snapshots__/show-status-for-a-kube-object.test.tsx.snap b/src/behaviours/cluster/kube-object-status-icon/__snapshots__/show-status-for-a-kube-object.test.tsx.snap
index ec1b142188..3a9398de2c 100644
--- a/src/behaviours/cluster/kube-object-status-icon/__snapshots__/show-status-for-a-kube-object.test.tsx.snap
+++ b/src/behaviours/cluster/kube-object-status-icon/__snapshots__/show-status-for-a-kube-object.test.tsx.snap
@@ -319,7 +319,6 @@ exports[`show status for a kube object given application starts and in test page
+
@@ -366,12 +393,13 @@ exports[`disable kube object statuses when cluster is not relevant given extensi
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
@@ -722,7 +753,6 @@ exports[`disable kube object statuses when cluster is not relevant given extensi
>
close
-
+
+ Close ⌘+W
+
@@ -756,12 +788,13 @@ exports[`disable kube object statuses when cluster is not relevant given extensi
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
@@ -1112,7 +1148,6 @@ exports[`disable kube object statuses when cluster is not relevant given not yet
>
close
-
+
+ Close ⌘+W
+
@@ -1146,12 +1183,13 @@ exports[`disable kube object statuses when cluster is not relevant given not yet
>
add
-
+
+ New tab
+
fullscreen
-
+
+ Fit to window
+
keyboard_arrow_up
-
+
+ Open
+
diff --git a/src/behaviours/cluster/kube-object-status-icon/show-status-for-a-kube-object.test.tsx b/src/behaviours/cluster/kube-object-status-icon/show-status-for-a-kube-object.test.tsx
index b8af696848..a63344271d 100644
--- a/src/behaviours/cluster/kube-object-status-icon/show-status-for-a-kube-object.test.tsx
+++ b/src/behaviours/cluster/kube-object-status-icon/show-status-for-a-kube-object.test.tsx
@@ -21,31 +21,6 @@ import { observer } from "mobx-react";
import { kubeObjectStatusTextInjectionToken } from "../../../renderer/components/kube-object-status-icon/kube-object-status-text-injection-token";
import { KubeObjectStatusIcon } from "../../../renderer/components/kube-object-status-icon";
-// TODO: Make tooltips free of side effects by making it deterministic
-jest.mock("../../../renderer/components/tooltip/withTooltip", () => ({
- withTooltip:
- (Target: any) =>
- ({ tooltip, ...props }: any) => {
- if (tooltip) {
- const testId = props["data-testid"];
-
- return (
- <>
-
-
- {tooltip.children || tooltip}
-
- >
- );
- }
-
- return ;
- },
-}));
-
describe("show status for a kube object", () => {
let builder: ApplicationBuilder;
let infoStatusIsShown: boolean;
diff --git a/src/behaviours/cluster/namespaces/__snapshots__/edit-namespace-from-new-tab.test.tsx.snap b/src/behaviours/cluster/namespaces/__snapshots__/edit-namespace-from-new-tab.test.tsx.snap
index 3ae620ccf6..3d062ac38e 100644
--- a/src/behaviours/cluster/namespaces/__snapshots__/edit-namespace-from-new-tab.test.tsx.snap
+++ b/src/behaviours/cluster/namespaces/__snapshots__/edit-namespace-from-new-tab.test.tsx.snap
@@ -489,7 +489,6 @@ exports[`cluster/namespaces - edit namespace from new tab when navigating to nam
>
+
+ Remove
+
@@ -4017,7 +4033,6 @@ exports[`add helm repository from list in preferences when navigating to prefere
class="Icon material interactive focusable"
data-testid="remove-helm-repository-Some already active repository"
tabindex="0"
- tooltip="Remove"
>
+
+ Remove
+
@@ -4634,7 +4658,6 @@ exports[`add helm repository from list in preferences when navigating to prefere
class="Icon material interactive focusable"
data-testid="remove-helm-repository-Some already active repository"
tabindex="0"
- tooltip="Remove"
>
+
+ Remove
+
@@ -5310,7 +5342,6 @@ exports[`add helm repository from list in preferences when navigating to prefere
class="Icon material interactive focusable"
data-testid="remove-helm-repository-Some already active repository"
tabindex="0"
- tooltip="Remove"
>
+
+ Remove
+
diff --git a/src/behaviours/helm-charts/__snapshots__/listing-active-helm-repositories-in-preferences.test.ts.snap b/src/behaviours/helm-charts/__snapshots__/listing-active-helm-repositories-in-preferences.test.ts.snap
index f98cea253c..146fb371aa 100644
--- a/src/behaviours/helm-charts/__snapshots__/listing-active-helm-repositories-in-preferences.test.ts.snap
+++ b/src/behaviours/helm-charts/__snapshots__/listing-active-helm-repositories-in-preferences.test.ts.snap
@@ -3720,7 +3720,6 @@ exports[`listing active helm repositories in preferences when navigating to pref
class="Icon material interactive focusable"
data-testid="remove-helm-repository-some-repository"
tabindex="0"
- tooltip="Remove"
>
+
+ Remove
+
diff --git a/src/behaviours/helm-charts/__snapshots__/remove-helm-repository-from-list-of-active-repository-in-preferences.test.ts.snap b/src/behaviours/helm-charts/__snapshots__/remove-helm-repository-from-list-of-active-repository-in-preferences.test.ts.snap
index 8724f1900e..2cb3b4e60d 100644
--- a/src/behaviours/helm-charts/__snapshots__/remove-helm-repository-from-list-of-active-repository-in-preferences.test.ts.snap
+++ b/src/behaviours/helm-charts/__snapshots__/remove-helm-repository-from-list-of-active-repository-in-preferences.test.ts.snap
@@ -1046,7 +1046,6 @@ exports[`remove helm repository from list of active repositories in preferences
class="Icon material interactive focusable"
data-testid="remove-helm-repository-some-active-repository"
tabindex="0"
- tooltip="Remove"
>
+
+ Remove
+
@@ -1631,7 +1635,6 @@ exports[`remove helm repository from list of active repositories in preferences
class="Icon material interactive focusable"
data-testid="remove-helm-repository-some-active-repository"
tabindex="0"
- tooltip="Remove"
>
+
+ Remove
+
diff --git a/src/behaviours/helm-charts/add-custom-helm-repository-in-preferences.test.ts b/src/behaviours/helm-charts/add-custom-helm-repository-in-preferences.test.ts
index 943aca900f..b8d9fd0661 100644
--- a/src/behaviours/helm-charts/add-custom-helm-repository-in-preferences.test.ts
+++ b/src/behaviours/helm-charts/add-custom-helm-repository-in-preferences.test.ts
@@ -18,11 +18,6 @@ import showSuccessNotificationInjectable from "../../renderer/components/notific
import showErrorNotificationInjectable from "../../renderer/components/notifications/show-error-notification.injectable";
import type { AsyncResult } from "../../common/utils/async-result";
-// TODO: Make tooltips free of side effects by making it deterministic
-jest.mock("../../renderer/components/tooltip/withTooltip", () => ({
- withTooltip: (target: any) => target,
-}));
-
describe("add custom helm repository in preferences", () => {
let applicationBuilder: ApplicationBuilder;
let showSuccessNotificationMock: jest.Mock;
diff --git a/src/behaviours/helm-charts/add-helm-repository-from-list-in-preferences.test.ts b/src/behaviours/helm-charts/add-helm-repository-from-list-in-preferences.test.ts
index 74e57cb693..c16fcd893f 100644
--- a/src/behaviours/helm-charts/add-helm-repository-from-list-in-preferences.test.ts
+++ b/src/behaviours/helm-charts/add-helm-repository-from-list-in-preferences.test.ts
@@ -16,11 +16,6 @@ import showSuccessNotificationInjectable from "../../renderer/components/notific
import showErrorNotificationInjectable from "../../renderer/components/notifications/show-error-notification.injectable";
import type { AsyncResult } from "../../common/utils/async-result";
-// TODO: Make tooltips free of side effects by making it deterministic
-jest.mock("../../renderer/components/tooltip/withTooltip", () => ({
- withTooltip: (target: any) => target,
-}));
-
describe("add helm repository from list in preferences", () => {
let applicationBuilder: ApplicationBuilder;
let showSuccessNotificationMock: jest.Mock;
diff --git a/src/behaviours/helm-charts/installing-chart/__snapshots__/installing-helm-chart-from-new-tab.test.ts.snap b/src/behaviours/helm-charts/installing-chart/__snapshots__/installing-helm-chart-from-new-tab.test.ts.snap
index 745c657614..2a9f1f3ed8 100644
--- a/src/behaviours/helm-charts/installing-chart/__snapshots__/installing-helm-chart-from-new-tab.test.ts.snap
+++ b/src/behaviours/helm-charts/installing-chart/__snapshots__/installing-helm-chart-from-new-tab.test.ts.snap
@@ -660,7 +660,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
@@ -693,7 +695,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
+
+ Copy
+
+
+ Close
+
@@ -1629,7 +1637,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Minimize
+
@@ -2390,7 +2406,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Minimize
+
@@ -3395,7 +3419,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Minimize
+
@@ -4374,7 +4406,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Minimize
+
@@ -5348,7 +5388,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Minimize
+
@@ -6322,7 +6370,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Minimize
+
+
+ YAMLException: end of the stream or a document separator is expected (1:1)
+
+ 1 | @some-invalid-configuration@
+-----^
+
+
+ Close ⌘+W
+
@@ -7316,7 +7374,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Minimize
+
@@ -8321,7 +8387,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Minimize
+
@@ -9295,7 +9369,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Minimize
+
@@ -10324,7 +10406,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Minimize
+
@@ -11151,7 +11241,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
class="Icon material interactive focusable"
data-testid="close-helm-release-detail"
tabindex="0"
- tooltip="Close"
>
+
+ Close
+
@@ -11932,7 +12028,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Minimize
+
@@ -12786,7 +12890,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Minimize
+
+
+ Close
+
@@ -14024,7 +14140,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
+
+ Close ⌘+W
+
@@ -14049,7 +14167,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Minimize
+
@@ -14832,7 +14958,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
+
+ Close ⌘+W
+
@@ -14857,7 +14985,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Minimize
+
@@ -15855,7 +15991,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
+
+ Close ⌘+W
+
@@ -15880,7 +16018,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Minimize
+
@@ -16854,7 +17000,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Minimize
+
@@ -17828,7 +17982,6 @@ exports[`installing helm chart from new tab given tab for installing chart was n
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Minimize
+
diff --git a/src/behaviours/helm-charts/installing-chart/__snapshots__/installing-helm-chart-from-previously-opened-tab.test.ts.snap b/src/behaviours/helm-charts/installing-chart/__snapshots__/installing-helm-chart-from-previously-opened-tab.test.ts.snap
index 8c5475a888..7bd7f19eae 100644
--- a/src/behaviours/helm-charts/installing-chart/__snapshots__/installing-helm-chart-from-previously-opened-tab.test.ts.snap
+++ b/src/behaviours/helm-charts/installing-chart/__snapshots__/installing-helm-chart-from-previously-opened-tab.test.ts.snap
@@ -444,7 +444,6 @@ exports[`installing helm chart from previously opened tab given tab for installi
+
+ Close ⌘+W
+
@@ -469,7 +471,6 @@ exports[`installing helm chart from previously opened tab given tab for installi
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Minimize
+
@@ -991,7 +1001,6 @@ exports[`installing helm chart from previously opened tab given tab for installi
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Minimize
+
@@ -1175,7 +1177,6 @@ exports[`opening dock tab for installing helm chart given application is started
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
@@ -1854,7 +1858,6 @@ exports[`opening dock tab for installing helm chart given application is started
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
@@ -1887,7 +1893,6 @@ exports[`opening dock tab for installing helm chart given application is started
+
+ Copy
+
+
+ Close
+
@@ -2619,7 +2631,6 @@ exports[`opening dock tab for installing helm chart given application is started
+
+ Copy
+
+
+ Close
+
@@ -3530,7 +3548,6 @@ exports[`opening dock tab for installing helm chart given application is started
+
+ Copy
+
+
+ Close
+
@@ -4451,7 +4475,6 @@ exports[`opening dock tab for installing helm chart given application is started
+
+ Copy
+
+
+ Close
+
@@ -5362,7 +5392,6 @@ exports[`opening dock tab for installing helm chart given application is started
+
+ Copy
+
+
+ Close
+
@@ -6298,7 +6334,6 @@ exports[`opening dock tab for installing helm chart given application is started
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Minimize
+
({
- withTooltip: (target: any) => target,
-}));
-
describe("installing helm chart from new tab", () => {
let builder: ApplicationBuilder;
let rendererDi: DiContainer;
diff --git a/src/behaviours/helm-charts/installing-chart/installing-helm-chart-from-previously-opened-tab.test.ts b/src/behaviours/helm-charts/installing-chart/installing-helm-chart-from-previously-opened-tab.test.ts
index 1fdde9130c..c9fa77f8aa 100644
--- a/src/behaviours/helm-charts/installing-chart/installing-helm-chart-from-previously-opened-tab.test.ts
+++ b/src/behaviours/helm-charts/installing-chart/installing-helm-chart-from-previously-opened-tab.test.ts
@@ -24,11 +24,6 @@ import { controlWhenStoragesAreReady } from "../../../renderer/utils/create-stor
import type { DiContainer } from "@ogre-tools/injectable";
import callForCreateHelmReleaseInjectable from "../../../renderer/components/+helm-releases/create-release/call-for-create-helm-release.injectable";
-// TODO: Make tooltips free of side effects by making it deterministic
-jest.mock("../../../renderer/components/tooltip/withTooltip", () => ({
- withTooltip: (target: any) => target,
-}));
-
describe("installing helm chart from previously opened tab", () => {
let builder: ApplicationBuilder;
let rendererDi: DiContainer;
diff --git a/src/behaviours/helm-charts/installing-chart/opening-dock-tab-for-installing-helm-chart.test.ts b/src/behaviours/helm-charts/installing-chart/opening-dock-tab-for-installing-helm-chart.test.ts
index 79ad98a1dc..16c4f236a3 100644
--- a/src/behaviours/helm-charts/installing-chart/opening-dock-tab-for-installing-helm-chart.test.ts
+++ b/src/behaviours/helm-charts/installing-chart/opening-dock-tab-for-installing-helm-chart.test.ts
@@ -25,11 +25,6 @@ import hostedClusterIdInjectable from "../../../renderer/cluster-frame-context/h
import dockStoreInjectable from "../../../renderer/components/dock/dock/store.injectable";
import type { DiContainer } from "@ogre-tools/injectable";
-// TODO: Make tooltips free of side effects by making it deterministic
-jest.mock("../../../renderer/components/tooltip/withTooltip", () => ({
- withTooltip: (target: any) => target,
-}));
-
describe("opening dock tab for installing helm chart", () => {
let builder: ApplicationBuilder;
let rendererDi: DiContainer;
diff --git a/src/behaviours/helm-charts/listing-active-helm-repositories-in-preferences.test.ts b/src/behaviours/helm-charts/listing-active-helm-repositories-in-preferences.test.ts
index a801487d10..d7939e890a 100644
--- a/src/behaviours/helm-charts/listing-active-helm-repositories-in-preferences.test.ts
+++ b/src/behaviours/helm-charts/listing-active-helm-repositories-in-preferences.test.ts
@@ -17,11 +17,6 @@ import type { Logger } from "../../common/logger";
import callForPublicHelmRepositoriesInjectable from "../../renderer/components/+preferences/kubernetes/helm-charts/adding-of-public-helm-repository/public-helm-repositories/call-for-public-helm-repositories.injectable";
import showErrorNotificationInjectable from "../../renderer/components/notifications/show-error-notification.injectable";
-// TODO: Make tooltips free of side effects by making it deterministic
-jest.mock("../../renderer/components/tooltip/withTooltip", () => ({
- withTooltip: (target: any) => target,
-}));
-
describe("listing active helm repositories in preferences", () => {
let applicationBuilder: ApplicationBuilder;
let rendered: RenderResult;
diff --git a/src/behaviours/helm-charts/remove-helm-repository-from-list-of-active-repository-in-preferences.test.ts b/src/behaviours/helm-charts/remove-helm-repository-from-list-of-active-repository-in-preferences.test.ts
index 096d37ed68..ca7ec95b24 100644
--- a/src/behaviours/helm-charts/remove-helm-repository-from-list-of-active-repository-in-preferences.test.ts
+++ b/src/behaviours/helm-charts/remove-helm-repository-from-list-of-active-repository-in-preferences.test.ts
@@ -15,11 +15,6 @@ import type { HelmRepo } from "../../common/helm/helm-repo";
import callForPublicHelmRepositoriesInjectable from "../../renderer/components/+preferences/kubernetes/helm-charts/adding-of-public-helm-repository/public-helm-repositories/call-for-public-helm-repositories.injectable";
import type { AsyncResult } from "../../common/utils/async-result";
-// TODO: Make tooltips free of side effects by making it deterministic
-jest.mock("../../renderer/components/tooltip/withTooltip", () => ({
- withTooltip: (target: any) => target,
-}));
-
describe("remove helm repository from list of active repositories in preferences", () => {
let applicationBuilder: ApplicationBuilder;
let rendered: RenderResult;
diff --git a/src/behaviours/helm-releases/__snapshots__/showing-details-for-helm-release.test.ts.snap b/src/behaviours/helm-releases/__snapshots__/showing-details-for-helm-release.test.ts.snap
index ba191595b2..ae169ab2f4 100644
--- a/src/behaviours/helm-releases/__snapshots__/showing-details-for-helm-release.test.ts.snap
+++ b/src/behaviours/helm-releases/__snapshots__/showing-details-for-helm-release.test.ts.snap
@@ -676,7 +676,6 @@ exports[`showing details for helm release given application is started when navi
+
+ Close ⌘+W
+
@@ -701,7 +703,6 @@ exports[`showing details for helm release given application is started when navi
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Open
+
@@ -1425,7 +1433,6 @@ exports[`showing details for helm release given application is started when navi
+
+ Close ⌘+W
+
@@ -1450,7 +1460,6 @@ exports[`showing details for helm release given application is started when navi
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Open
+
@@ -2342,7 +2358,6 @@ exports[`showing details for helm release given application is started when navi
+
+ Close ⌘+W
+
@@ -2367,7 +2385,6 @@ exports[`showing details for helm release given application is started when navi
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Open
+
@@ -3259,7 +3283,6 @@ exports[`showing details for helm release given application is started when navi
+
+ Close ⌘+W
+
@@ -3284,7 +3310,6 @@ exports[`showing details for helm release given application is started when navi
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Open
+
@@ -3344,7 +3376,6 @@ exports[`showing details for helm release given application is started when navi
class="Icon material interactive focusable"
data-testid="close-helm-release-detail"
tabindex="0"
- tooltip="Close"
>
+
+ Close
+
@@ -4244,7 +4282,6 @@ exports[`showing details for helm release given application is started when navi
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Open
+
@@ -5136,7 +5180,6 @@ exports[`showing details for helm release given application is started when navi
+
+ Close ⌘+W
+
@@ -5161,7 +5207,6 @@ exports[`showing details for helm release given application is started when navi
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Open
+
@@ -5221,7 +5273,6 @@ exports[`showing details for helm release given application is started when navi
class="Icon material interactive focusable"
data-testid="close-helm-release-detail"
tabindex="0"
- tooltip="Close"
>
+
+ Close
+
@@ -6121,7 +6179,6 @@ exports[`showing details for helm release given application is started when navi
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Open
+
@@ -6181,7 +6245,6 @@ exports[`showing details for helm release given application is started when navi
class="Icon material interactive focusable"
data-testid="close-helm-release-detail"
tabindex="0"
- tooltip="Close"
>
+
+ Close
+
@@ -7081,7 +7151,6 @@ exports[`showing details for helm release given application is started when navi
class="Icon new-dock-tab material interactive focusable"
id="menu-actions-for-dock"
tabindex="0"
- tooltip="New tab"
>
+
+ New tab
+
+
+ Fit to window
+
+
+ Open
+
@@ -7139,7 +7215,6 @@ exports[`showing details for helm release given application is started when navi
+
+ Copy
+