Trigger the viewDocument call in gui test, which tests the tokenizer and converter as well

This commit is contained in:
Veronica K. B. Olsen
2019-05-18 18:23:44 +02:00
parent 8c49279280
commit 9e42e01488
2 changed files with 6 additions and 2 deletions
+2 -2
View File
@@ -242,7 +242,7 @@ class GuiMain(QMainWindow):
tHandle = self.treeView.getSelectedHandle()
if tHandle is None:
logger.warning("No document selected")
return
return False
tItem = self.theProject.getItem(tHandle)
if tItem.itemType == nwItemType.FILE:
@@ -263,7 +263,7 @@ class GuiMain(QMainWindow):
self.splitMain.setSizes(bPos)
self.docEditor.changeWidth()
return
return True
##
# Tree Item Actions
+4
View File
@@ -105,6 +105,10 @@ def testMainWindows(qtbot, nwTempGUI, nwRef):
assert nwGUI.saveDocument()
qtbot.wait(stepDelay)
# Open and view the edited document
assert nwGUI.openDocument("31489056e0916")
assert nwGUI.viewDocument("31489056e0916")
# Check the files
projFile = path.join(nwTempGUI,"nwProject.nwx")
assert cmpFiles(projFile, path.join(nwRef,"gui","1_nwProject.nwx"), [2])