diff --git a/tests/test_gui/test_gui_doceditor.py b/tests/test_gui/test_gui_doceditor.py index e2ba77ae..22a960c2 100644 --- a/tests/test_gui/test_gui_doceditor.py +++ b/tests/test_gui/test_gui_doceditor.py @@ -783,10 +783,6 @@ def testGuiEditor_BlockFormatting(qtbot, monkeypatch, nwGUI, nwMinimal, ipsumTex mp.setattr(QTextBlock, "isValid", lambda *a, **k: False) assert nwGUI.docEditor._formatBlock(nwDocAction.BLOCK_TXT) is False - # Empty Block - assert nwGUI.docEditor.setCursorLine(1) is True - assert nwGUI.docEditor._formatBlock(nwDocAction.BLOCK_TXT) is False - # Keyword assert nwGUI.docEditor.replaceText("@pov: Jane\n\n") is True assert nwGUI.docEditor.setCursorPosition(5) is True diff --git a/tests/test_gui/test_gui_mainmenu.py b/tests/test_gui/test_gui_mainmenu.py index e55e1039..f10514ad 100644 --- a/tests/test_gui/test_gui_mainmenu.py +++ b/tests/test_gui/test_gui_mainmenu.py @@ -116,6 +116,16 @@ def testGuiMenu_EditFormat(qtbot, monkeypatch, nwGUI, nwLipsum): fmtStr = "#### Pellentesque nec erat ut nulla posuere commodo." assert nwGUI.docEditor.getText()[39:91] == fmtStr + # Title Format + nwGUI.mainMenu.aFmtTitle.activate(QAction.Trigger) + fmtStr = "#! Pellentesque nec erat ut nulla posuere commodo." + assert nwGUI.docEditor.getText()[39:89] == fmtStr + + # Unnumbered Chapter + nwGUI.mainMenu.aFmtUnNum.activate(QAction.Trigger) + fmtStr = "##! Pellentesque nec erat ut nulla posuere commodo." + assert nwGUI.docEditor.getText()[39:90] == fmtStr + # Clear Format nwGUI.mainMenu.aFmtNoFormat.activate(QAction.Trigger) assert nwGUI.docEditor.getText()[39:86] == cleanText @@ -314,10 +324,6 @@ def testGuiMenu_EditFormat(qtbot, monkeypatch, nwGUI, nwLipsum): assert nwGUI.docEditor.setCursorPosition(17) assert not nwGUI.docEditor._formatBlock(nwDocAction.BLOCK_TXT) - # Cannot Format Empty Line - assert nwGUI.docEditor.setCursorPosition(13) - assert not nwGUI.docEditor._formatBlock(nwDocAction.BLOCK_TXT) - # Invalid Action assert nwGUI.docEditor.setCursorPosition(30) assert not nwGUI.docEditor._formatBlock(nwDocAction.NO_ACTION)