Replace static application window with ability to create many (#5979)

* Replace static application window with ability to create as many as you wish

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Adapt tests for replacing static application window with ability to create as many as you wish and separate starting of main and window in behaviours

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Make first render of application smaller in test that proves to be hard for CI

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Remove redundant code

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Simplify code

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen authored and GitHub committed 2022-08-16 15:55:42 +03:00
1 parent 299922c8a7
commit 63d5a34379
98 files changed
+3283 -2743

No files matched your search

@@ -16,24 +16,24 @@ import { getApplicationBuilder } from "../../renderer/components/test-utils/get-
import { navigateToRouteInjectionToken } from "../../common/front-end-routing/navigate-to-route-injection-token";
describe("cluster - visibility of sidebar items", () => {
let applicationBuilder: ApplicationBuilder;
let builder: ApplicationBuilder;
let rendered: RenderResult;
beforeEach(() => {
applicationBuilder = getApplicationBuilder();
builder = getApplicationBuilder();
applicationBuilder.setEnvironmentToClusterFrame();
builder.setEnvironmentToClusterFrame();
applicationBuilder.beforeApplicationStart(({ rendererDi }) => {
rendererDi.register(testRouteInjectable);
rendererDi.register(testRouteComponentInjectable);
rendererDi.register(testSidebarItemsInjectable);
builder.beforeWindowStart((windowDi) => {
windowDi.register(testRouteInjectable);
windowDi.register(testRouteComponentInjectable);
windowDi.register(testSidebarItemsInjectable);
});
});
describe("given kube resource for route is not allowed", () => {
beforeEach(async () => {
rendered = await applicationBuilder.render();
rendered = await builder.render();
});
it("renders", () => {
@@ -48,7 +48,7 @@ describe("cluster - visibility of sidebar items", () => {
describe("when kube resource becomes allowed", () => {
beforeEach(() => {
applicationBuilder.allowKubeResource("namespaces");
builder.allowKubeResource("namespaces");
});
it("renders", () => {