diff --git a/src/studio/ui/StudioWindow.java b/src/studio/ui/StudioWindow.java index 0ab6f1fd..4e794e55 100755 --- a/src/studio/ui/StudioWindow.java +++ b/src/studio/ui/StudioWindow.java @@ -835,11 +835,9 @@ public void close() { } else { boolean result = execute(editorTab -> editorTab.getEditorsPanel().closeTab(editorTab)); if (!result) return; - log.info("StudioWindow closing"); // closing the last tab would trigger this code again if (allWindows.contains(this)) { allWindows.remove(this); - log.info("StudioWindow disposing"); dispose(); refreshAllMenus(); } diff --git a/test-integration/studio/ui/EditorTest.java b/test-integration/studio/ui/EditorTest.java index f9ee3403..f72b10a4 100644 --- a/test-integration/studio/ui/EditorTest.java +++ b/test-integration/studio/ui/EditorTest.java @@ -11,8 +11,10 @@ import java.io.File; import java.io.IOException; import java.nio.file.Files; +import java.util.concurrent.TimeUnit; import static org.assertj.swing.edt.GuiActionRunner.execute; +import static org.assertj.swing.timing.Pause.pause; import static org.junit.Assert.assertEquals; public class EditorTest extends StudioTest { @@ -112,11 +114,14 @@ protected boolean isMatching(StudioWindow f) { newFrameFixture.textBox("editor1").enterText("x"); newFrameFixture.menuItem("Close Window").click(); optionPaneButtonClick("Cancel"); + + pause(50, TimeUnit.MILLISECONDS); // wait as closure happens asynchronously newFrameFixture.requireVisible(); //tear down newFrameFixture.close(); optionPaneButtonClick("No"); + pause(50, TimeUnit.MILLISECONDS); // wait as closure happens asynchronously newFrameFixture.requireNotVisible(); } }