Fix closing app with no project bug

This commit is contained in:
Veronica Berglyd Olsen
2024-11-08 17:30:54 +01:00
parent b28921d6c2
commit b0bcf8605c
3 changed files with 33 additions and 18 deletions
+7
View File
@@ -100,6 +100,13 @@ def testGuiMain_Launch(qtbot, monkeypatch, nwGUI, projPath):
assert nwGUI.openProject(projPath) is True
nwGUI.closeProject()
# Check that closes can be blocked
with monkeypatch.context() as mp:
mp.setattr(QMessageBox, "result", lambda *a: QMessageBox.StandardButton.No)
assert nwGUI.openProject(projPath) is True
assert nwGUI.closeMain() is False
nwGUI.closeProject()
# Check that latest release info updated
assert CONFIG.lastNotes != "0x0"