mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix reactively-hide-kube-object-detail-item tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
e76d45ceb8
commit
af368985a8
@ -123,9 +123,13 @@ export class ApiManager {
|
||||
: apiOrBase;
|
||||
const api = this.getApi(apiBase);
|
||||
|
||||
if (!api) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return chain(this.dependencies.stores.get().values())
|
||||
.concat(this.externalStores.values())
|
||||
.find(store => store.api === api);
|
||||
.find(store => store.api.apiBase === api.apiBase);
|
||||
}
|
||||
|
||||
lookupApiLink(ref: ObjectReference, parentObject?: KubeObject): string {
|
||||
|
||||
@ -13,6 +13,7 @@ import apiManagerInjectable from "../../../../common/k8s-api/api-manager/manager
|
||||
import type { KubeObjectStore } from "../../../../common/k8s-api/kube-object.store";
|
||||
import type { KubeApi } from "../../../../common/k8s-api/kube-api";
|
||||
import showDetailsInjectable from "../../../../renderer/components/kube-detail-params/show-details.injectable";
|
||||
import assert from "assert";
|
||||
|
||||
describe("reactively hide kube object detail item", () => {
|
||||
let builder: ApplicationBuilder;
|
||||
@ -89,6 +90,10 @@ describe("reactively hide kube object detail item", () => {
|
||||
runInAction(() => {
|
||||
someObservable.set(true);
|
||||
});
|
||||
|
||||
const apiManager = builder.applicationWindow.only.di.inject(apiManagerInjectable);
|
||||
|
||||
assert(apiManager.getStore("/apis/some-api-version/some-kind"));
|
||||
});
|
||||
|
||||
it("renders", () => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user