Improve handling of project closing
This commit is contained in:
@@ -206,7 +206,7 @@ def testGuiMenu_EditFormat(qtbot, monkeypatch, nwGUI, prjLipsum):
|
||||
|
||||
# Clear the Text
|
||||
nwGUI.docEditor.clear()
|
||||
assert nwGUI.docEditor.isEmpty()
|
||||
assert nwGUI.docEditor.isEmpty
|
||||
|
||||
# Alignment & Indent
|
||||
# ==================
|
||||
@@ -403,17 +403,17 @@ def testGuiMenu_ContextMenus(qtbot, nwGUI, prjLipsum):
|
||||
|
||||
# Navigation History
|
||||
assert nwGUI.viewDocument("04468803b92e1")
|
||||
assert nwGUI.docViewer.docHandle() == "04468803b92e1"
|
||||
assert nwGUI.docViewer.docHandle == "04468803b92e1"
|
||||
assert nwGUI.docViewer.docHeader.backButton.isEnabled()
|
||||
assert not nwGUI.docViewer.docHeader.forwardButton.isEnabled()
|
||||
|
||||
qtbot.mouseClick(nwGUI.docViewer.docHeader.backButton, Qt.LeftButton)
|
||||
assert nwGUI.docViewer.docHandle() == "4c4f28287af27"
|
||||
assert nwGUI.docViewer.docHandle == "4c4f28287af27"
|
||||
assert not nwGUI.docViewer.docHeader.backButton.isEnabled()
|
||||
assert nwGUI.docViewer.docHeader.forwardButton.isEnabled()
|
||||
|
||||
qtbot.mouseClick(nwGUI.docViewer.docHeader.forwardButton, Qt.LeftButton)
|
||||
assert nwGUI.docViewer.docHandle() == "04468803b92e1"
|
||||
assert nwGUI.docViewer.docHandle == "04468803b92e1"
|
||||
assert nwGUI.docViewer.docHeader.backButton.isEnabled()
|
||||
assert not nwGUI.docViewer.docHeader.forwardButton.isEnabled()
|
||||
|
||||
@@ -438,10 +438,10 @@ def testGuiMenu_Insert(qtbot, monkeypatch, nwGUI, fncPath, projPath, mockRnd):
|
||||
nwGUI.docEditor.clear()
|
||||
|
||||
assert nwGUI.docEditor.insertText(nwDocInsert.NO_INSERT) is False
|
||||
assert nwGUI.docEditor.isEmpty()
|
||||
assert nwGUI.docEditor.isEmpty
|
||||
|
||||
assert nwGUI.docEditor.insertText(None) is False
|
||||
assert nwGUI.docEditor.isEmpty()
|
||||
assert nwGUI.docEditor.isEmpty
|
||||
|
||||
# qtbot.stop()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user