1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Make existing tests green by adapting to newly introduced difference between started and shown window

Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

# Conflicts:
#	src/behaviours/quitting-and-restarting-the-app/opening-application-window-using-tray.test.ts
#	src/main/start-main-application/lens-window/application-window/create-lens-window.injectable.ts
This commit is contained in:
Iku-turso 2022-06-10 17:18:11 +03:00 committed by Janne Savolainen
parent 9ffe7aebec
commit 53430ab611
No known key found for this signature in database
GPG Key ID: 8C6CFB2FFFE8F68A
2 changed files with 10 additions and 10 deletions

View File

@ -70,13 +70,13 @@ describe("channel", () => {
closeAllWindows();
});
describe("given window is shown", () => {
describe("given window is started", () => {
let someWindowFake: LensWindow;
beforeEach(async () => {
someWindowFake = createTestWindow(mainDi, "some-window");
await someWindowFake.show();
await someWindowFake.start();
});
it("when sending message, triggers listener in window", () => {
@ -94,12 +94,12 @@ describe("channel", () => {
});
});
it("given multiple shown windows, when sending message, triggers listeners in all windows", async () => {
it("given multiple started started windows, when sending message, triggers listeners in all windows", async () => {
const someWindowFake = createTestWindow(mainDi, "some-window");
const someOtherWindowFake = createTestWindow(mainDi, "some-other-window");
await someWindowFake.show();
await someOtherWindowFake.show();
await someWindowFake.start();
await someOtherWindowFake.start();
messageToChannel(testMessageChannel, "some-message");

View File

@ -43,9 +43,9 @@ describe("message to channel from main", () => {
expect(sendToChannelInBrowserMock).not.toHaveBeenCalled();
});
describe("given visible window", () => {
describe("given started window", () => {
beforeEach(async () => {
await someTestWindow.show();
await someTestWindow.start();
});
it("when messaging to channel, messages to window", () => {
@ -109,9 +109,9 @@ describe("message to channel from main", () => {
});
});
it("given multiple visible windows, when messaging to channel, messages to window", async () => {
await someTestWindow.show();
await someOtherTestWindow.show();
it("given multiple started windows, when messaging to channel, messages to window", async () => {
await someTestWindow.start();
await someOtherTestWindow.start();
messageToChannel(someChannel, "some-message");