-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix failing to start shell being hidden from user #5626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 8 commits
Commits
Show all changes
86 commits
Select commit
Hold shift + click to select a range
ed6f522
Fix failing to start shell being hidden from user
Nokel81 87dc14c
Cleanup
Nokel81 dba4f59
Add enough code to get first couple terminal tests to pass
Nokel81 8136e23
Fix type errors from testing in dev mode
Nokel81 f111450
Introduce and use ApplicationBuilder.quit in afterEach() hooks
Nokel81 c9f1594
Upgrade XTermJs to v5 to get snapshot testing working
Nokel81 2de3068
Use webgl when available, add search and better weblinks
Nokel81 d293554
Get tests passing
Nokel81 988307e
Add script to download the correct version of canvas
Nokel81 071ba8a
Fix installing canvas on all platforms
Nokel81 ea603c7
Fix the script
Nokel81 78b05ba
Remove console logs
Nokel81 aa41117
Fix lint
Nokel81 19466f1
Temporarily upgrade to beta version of xterm to verify fix
Nokel81 d1acca4
Fix post install script because of temp version of xterm
Nokel81 f2d19e7
Fix some more lint
Nokel81 2a96eb8
Fix usage of new asyncComputed type
Nokel81 862cd2a
Update (mostly just) snapshots and a few other tests
Nokel81 3c9791e
Fix type error
Nokel81 c340256
Replace last use of customRequestPromise with di
Nokel81 f522d23
Replace usage of request in setupLensProxy
Nokel81 37955f0
Replace usage of request in k8sRequest and cluster detectors
Nokel81 b86bc6d
Remove direct dependency on request et al
Nokel81 4c1d076
Add process of cleaning up lens proxy startup if down quickly
Nokel81 c6a9d56
Fix bad vscode rename
Nokel81 e49b0f6
Remove calls to show error popup on stopping
Nokel81 d173e45
Fix starting of lens proxy
Nokel81 b96e115
Fix type errors
Nokel81 6ce833c
Make ApplicationBuilder.quit more realistic
Nokel81 0dabbb6
Replace override of catalogSyncToRenderer with a global override
Nokel81 a82a120
Fix many tests by changing injectables
Nokel81 e90a181
Fix listing-active-helm-repositories-in-preferences.test.ts
Nokel81 9c75199
Update snapshot
Nokel81 97dfe4d
Fix new tests
Nokel81 e8bc887
Fix postinstall script
Nokel81 58cbf5f
Fix bad imports of node-fetch
Nokel81 8761aa1
Fix type errors
Nokel81 8fd732b
Fix unit tests
Nokel81 e9e248e
Fix tests not stopping by forcing cleanup
Nokel81 71ad8e1
Generate tray icons before installing canvas
Nokel81 3a7ac10
Add updated icons
Nokel81 c11d8c6
Fix lint
Nokel81 0088add
Fix code after rebase
Nokel81 6321b10
Fix test failures
Nokel81 9683a7c
Fix tests and lint
Nokel81 a271c83
Update snapshots
Nokel81 3b72137
Remove unused (but newly added) dep
Nokel81 19a8691
Update snapshots
Nokel81 f6b5214
Fixup new test file after rebase
Nokel81 78614af
Update snapshots
Nokel81 56703cd
Update snapshots
Nokel81 a1d2fa0
Fix lint
Nokel81 3fbbf02
Fix errors blocking compilation
Nokel81 8b18e58
Update snapshots
Nokel81 d9a7a48
Fix lint
Nokel81 ea49929
Fix types
Nokel81 0e1b2c0
Fix test failures
Nokel81 12bd506
Fix lint
Nokel81 2f43d24
Fix build
Nokel81 14f50a3
Fix unit tests
Nokel81 6d0e527
Fix build type errors
Nokel81 d22af76
Fix most tests
Nokel81 3492741
Fix kubeconfig-manager tests
Nokel81 6dd926a
Fix tests not using ApplicationBuilder
Nokel81 cfad2c0
Fix expected URL
Nokel81 186d7f9
Fix tests not using ApplicationBuilder
Nokel81 9adddaf
Fix top bar tests
Nokel81 e88743d
Add suspend plugin
Nokel81 4885461
More work to get tests to pass in a more realistic way
Nokel81 120a5f7
Fix tests by faking the version detector
Nokel81 91cd2c8
Remove debug logging
Nokel81 7971755
Cleanup uses and overrides of requestAnimationFrame
Nokel81 c658a0b
Get terminal tests to pass again
Nokel81 9b7e77d
Remove unneccessary causesSideEffects
Nokel81 4815510
Update cluster-frame test snapshots
Nokel81 3471397
Fix edit-namespace-from-new-tab tests
Nokel81 e77411a
Fix tests failing due to allow resources not updateing
Nokel81 d1eb149
Fix tooltip tests
Nokel81 6880d52
Update install-helm-chart-from-new-tab snapshots
Nokel81 d2ee54f
Update showing-details-for-helm-release snapshots
Nokel81 8704067
Update sidebar-and-tab-navigation-for-extensions snapshots
Nokel81 9539c1c
Fix cluster-store tests
Nokel81 5f30b81
Fix kube-auth-proxy tests
Nokel81 4edfa40
Update more snapshots
Nokel81 29a7e2a
Fix kube-api-version-detection tests
Nokel81 51b8c91
Fix build
Nokel81 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,6 +56,10 @@ describe("app-paths", () => { | |
| }); | ||
| }); | ||
|
|
||
| afterEach(() => { | ||
| builder.quit(); | ||
| }); | ||
|
|
||
|
||
| describe("normally", () => { | ||
| let windowDi: DiContainer; | ||
| let mainDi: DiContainer; | ||
|
|
||
11 changes: 11 additions & 0 deletions
11
src/common/fs/change-path-mode.global-override-for-injectable.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| /** | ||
| * Copyright (c) OpenLens Authors. All rights reserved. | ||
| * Licensed under MIT License. See LICENSE in root directory for more information. | ||
| */ | ||
|
|
||
| import { getGlobalOverride } from "../test-utils/get-global-override"; | ||
| import changePathModeInjectable from "./change-path-mode.injectable"; | ||
|
|
||
| export default getGlobalOverride(changePathModeInjectable, () => () => { | ||
| throw new Error("tried to change path mode without override"); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| /** | ||
| * Copyright (c) OpenLens Authors. All rights reserved. | ||
| * Licensed under MIT License. See LICENSE in root directory for more information. | ||
| */ | ||
|
|
||
| import { getInjectable } from "@ogre-tools/injectable"; | ||
| import fsInjectable from "./fs.injectable"; | ||
|
|
||
| export type ChangePathMode = (path: string, newMode: number) => Promise<void>; | ||
|
|
||
| const changePathModeInjectable = getInjectable({ | ||
| id: "change-path-mode", | ||
| instantiate: (di): ChangePathMode => di.inject(fsInjectable).chmod, | ||
| }); | ||
|
|
||
| export default changePathModeInjectable; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| /** | ||
| * Copyright (c) OpenLens Authors. All rights reserved. | ||
| * Licensed under MIT License. See LICENSE in root directory for more information. | ||
| */ | ||
|
|
||
| import { getGlobalOverride } from "../test-utils/get-global-override"; | ||
| import copyFileInjectable from "./copy-file.injectable"; | ||
|
|
||
| export default getGlobalOverride(copyFileInjectable, () => () => { | ||
| throw new Error("tried to copy a file without override"); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| /** | ||
| * Copyright (c) OpenLens Authors. All rights reserved. | ||
| * Licensed under MIT License. See LICENSE in root directory for more information. | ||
| */ | ||
| import { getInjectable } from "@ogre-tools/injectable"; | ||
| import fsInjectable from "./fs.injectable"; | ||
|
|
||
| export type CopyFile = (fromPath: string, toPath: string) => Promise<void>; | ||
|
|
||
| const copyFileInjectable = getInjectable({ | ||
| id: "copy-file", | ||
| instantiate: (di): CopyFile => di.inject(fsInjectable).copyFile, | ||
| }); | ||
|
|
||
| export default copyFileInjectable; |
11 changes: 11 additions & 0 deletions
11
src/common/fs/create-read-file-stream.global-override-for-injectable.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| /** | ||
| * Copyright (c) OpenLens Authors. All rights reserved. | ||
| * Licensed under MIT License. See LICENSE in root directory for more information. | ||
| */ | ||
|
|
||
| import { getGlobalOverride } from "../test-utils/get-global-override"; | ||
| import createReadFileStreamInjectable from "./create-read-file-stream.injectable"; | ||
|
|
||
| export default getGlobalOverride(createReadFileStreamInjectable, () => () => { | ||
| throw new Error("tried to create read stream for a file without override"); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| /** | ||
| * Copyright (c) OpenLens Authors. All rights reserved. | ||
| * Licensed under MIT License. See LICENSE in root directory for more information. | ||
| */ | ||
|
|
||
| import { getInjectable } from "@ogre-tools/injectable"; | ||
| import type { createWriteStream } from "fs"; | ||
| import fsInjectable from "./fs.injectable"; | ||
|
|
||
| export type CreateWriteFileStream = typeof createWriteStream; | ||
|
|
||
| const createWriteFileStreamInjectable = getInjectable({ | ||
| id: "create-write-file-stream", | ||
| instantiate: (di) => di.inject(fsInjectable).createWriteStream, | ||
| }); | ||
|
|
||
| export default createWriteFileStreamInjectable; |
11 changes: 11 additions & 0 deletions
11
src/common/fs/create-write-stream.global-override-for-injectable.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| /** | ||
| * Copyright (c) OpenLens Authors. All rights reserved. | ||
| * Licensed under MIT License. See LICENSE in root directory for more information. | ||
| */ | ||
|
|
||
| import { getGlobalOverride } from "../test-utils/get-global-override"; | ||
| import createWriteFileStreamInjectable from "./create-write-file-stream.injectable"; | ||
|
|
||
| export default getGlobalOverride(createWriteFileStreamInjectable, () => () => { | ||
| throw new Error("tried to create a file write stream without override"); | ||
| }); |
11 changes: 11 additions & 0 deletions
11
src/common/fs/ensure-directory.global-override-for-injectable.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| /** | ||
| * Copyright (c) OpenLens Authors. All rights reserved. | ||
| * Licensed under MIT License. See LICENSE in root directory for more information. | ||
| */ | ||
|
|
||
| import { getGlobalOverride } from "../test-utils/get-global-override"; | ||
| import ensureDirectoryInjectable from "./ensure-directory.injectable"; | ||
|
|
||
| export default getGlobalOverride(ensureDirectoryInjectable, () => async () => { | ||
| throw new Error("tried to ensure directory without override"); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/common/path/delimiter.global-override-for-injectable.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /** | ||
| * Copyright (c) OpenLens Authors. All rights reserved. | ||
| * Licensed under MIT License. See LICENSE in root directory for more information. | ||
| */ | ||
|
|
||
| import path from "path"; | ||
| import { getGlobalOverride } from "../test-utils/get-global-override"; | ||
| import pathDelimiterInjectable from "./delimiter.injectable"; | ||
|
|
||
| export default getGlobalOverride(pathDelimiterInjectable, () => path.posix.delimiter); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| /** | ||
| * Copyright (c) OpenLens Authors. All rights reserved. | ||
| * Licensed under MIT License. See LICENSE in root directory for more information. | ||
| */ | ||
| import { getInjectable } from "@ogre-tools/injectable"; | ||
| import path from "path"; | ||
|
|
||
| const pathDelimiterInjectable = getInjectable({ | ||
| id: "path-delimiter", | ||
| instantiate: () => path.delimiter, | ||
| causesSideEffects: true, | ||
| }); | ||
|
|
||
| export default pathDelimiterInjectable; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit removes the last usage for earlier introduce image-snapshot dependency. Could you remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure also