From 8c4927928042437e337c376799cfc229c88eb68e Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" Date: Sat, 18 May 2019 18:20:01 +0200 Subject: [PATCH] The GUI test now covers the spell checker as well --- nw/gui/mainmenu.py | 2 +- tests/test_gui.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/nw/gui/mainmenu.py b/nw/gui/mainmenu.py index f17b9418..399e6d1b 100644 --- a/nw/gui/mainmenu.py +++ b/nw/gui/mainmenu.py @@ -98,7 +98,7 @@ class GuiMainMenu(QMenuBar): self.theProject.setSpellCheck(self.toolsSpellCheck.isChecked()) self.theParent.docEditor.setSpellCheck(self.toolsSpellCheck.isChecked()) logger.verbose("Spell check is set to %s" % str(self.theProject.spellCheck)) - return + return True def _showAbout(self): msgBox = QMessageBox() diff --git a/tests/test_gui.py b/tests/test_gui.py index c9655a0a..4f098b6c 100644 --- a/tests/test_gui.py +++ b/tests/test_gui.py @@ -47,6 +47,8 @@ def testMainWindows(qtbot, nwTempGUI, nwRef): nwGUI.treeView._getTreeItem("25fc0e7096fc6").setExpanded(True) nwGUI.treeView._getTreeItem("31489056e0916").setSelected(True) assert nwGUI.openSelectedItem() + nwGUI.mainMenu.toolsSpellCheck.setChecked(True) + assert nwGUI.mainMenu._toggleSpellCheck() # Type something into the document nwGUI.docEditor.setFocus()