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 authored and Janne Savolainen committed 2022-06-15 08:41:15 +03:00
1 parent 9ffe7aebec
commit 53430ab611
2 files changed
+10 -10

No files matched your search

+5 -5
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");
@@ -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");