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

@@ -9,17 +9,20 @@ import platformInjectable from "../../common/vars/platform.injectable";
import { type ApplicationBuilder, getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
describe("Command Pallet: keyboard shortcut tests", () => {
let applicationBuilder: ApplicationBuilder;
let builder: ApplicationBuilder;
let rendered: RenderResult;
beforeEach(async () => {
applicationBuilder = getApplicationBuilder();
builder = getApplicationBuilder();
});
describe("when on macOS", () => {
beforeEach(async () => {
applicationBuilder.dis.rendererDi.override(platformInjectable, () => "darwin");
rendered = await applicationBuilder.render();
builder.beforeWindowStart((windowDi) => {
windowDi.override(platformInjectable, () => "darwin");
});
rendered = await builder.render();
});
it("renders", () => {
@@ -83,8 +86,11 @@ describe("Command Pallet: keyboard shortcut tests", () => {
describe("when on linux", () => {
beforeEach(async () => {
applicationBuilder.dis.rendererDi.override(platformInjectable, () => "linux");
rendered = await applicationBuilder.render();
builder.beforeWindowStart((windowDi) => {
windowDi.override(platformInjectable, () => "linux");
});
rendered = await builder.render();
});
it("renders", () => {