diff --git a/src/tests/flows/externalResize.ts b/src/tests/flows/externalResize.ts index 4d4e46f..ceb335f 100644 --- a/src/tests/flows/externalResize.ts +++ b/src/tests/flows/externalResize.ts @@ -25,9 +25,18 @@ tests.register("External resize", 1, () => { workspaceMock.createWindow(client); Assert.equalRects(client.frameGeometry, getTiledFrame(100), { message: "We should tile the window, respecting its desired width" }); - client.frameGeometry = getClientDesiredFrame(110); - Assert.equalRects(client.frameGeometry, getTiledFrame(110), { message: "We should re-arrange the window, respecting its new desired width" }); + function testExternalResizing() { + client.frameGeometry = getClientDesiredFrame(110); + Assert.equalRects(client.frameGeometry, getTiledFrame(110), { message: "We should re-arrange the window, respecting its new desired width" }); - client.frameGeometry = getClientDesiredFrame(120); - Assert.equalRects(client.frameGeometry, getClientDesiredFrame(120), { message: "We should give up and let the client have its desired frame" }); + client.frameGeometry = getClientDesiredFrame(120); + Assert.equalRects(client.frameGeometry, getClientDesiredFrame(120), { message: "We should give up and let the client have its desired frame" }); + } + + testExternalResizing(); + + setTimeout(() => { + // the concession has expired, let's test again + testExternalResizing(); + }, 1000); }); diff --git a/src/tests/utils/extern/node.ts b/src/tests/utils/extern/node.ts index 4b2f603..a858a21 100644 --- a/src/tests/utils/extern/node.ts +++ b/src/tests/utils/extern/node.ts @@ -1,3 +1,5 @@ declare const process: { exit(code?: number): void, }; + +declare const setTimeout: (callback: () => void, timeout: number) => void;