mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
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:
1 parent
299922c8a7
commit
63d5a34379
98 files changed
+3283
-2743
No files matched your search
@@ -12,18 +12,20 @@ import focusWindowInjectable from "../../renderer/navigation/focus-window.inject
|
||||
jest.mock("../../renderer/components/input/input");
|
||||
|
||||
describe("extensions - navigation using application menu", () => {
|
||||
let applicationBuilder: ApplicationBuilder;
|
||||
let builder: ApplicationBuilder;
|
||||
let rendered: RenderResult;
|
||||
let focusWindowMock: jest.Mock;
|
||||
|
||||
beforeEach(async () => {
|
||||
applicationBuilder = getApplicationBuilder().beforeApplicationStart(({ rendererDi }) => {
|
||||
builder = getApplicationBuilder();
|
||||
|
||||
builder.beforeWindowStart((windowDi) => {
|
||||
focusWindowMock = jest.fn();
|
||||
|
||||
rendererDi.override(focusWindowInjectable, () => focusWindowMock);
|
||||
windowDi.override(focusWindowInjectable, () => focusWindowMock);
|
||||
});
|
||||
|
||||
rendered = await applicationBuilder.render();
|
||||
rendered = await builder.render();
|
||||
});
|
||||
|
||||
it("renders", () => {
|
||||
@@ -38,7 +40,7 @@ describe("extensions - navigation using application menu", () => {
|
||||
|
||||
describe("when navigating to extensions using application menu", () => {
|
||||
beforeEach(() => {
|
||||
applicationBuilder.applicationMenu.click("root.extensions");
|
||||
builder.applicationMenu.click("root.extensions");
|
||||
});
|
||||
|
||||
it("focuses the window", () => {
|
||||
|
||||
Reference in new issue
Block a user