From 03db815723d0992b167cec63f1988cd667a53572 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sat, 1 Oct 2022 22:35:26 +0200 Subject: [PATCH] Update test coverage --- tests/reference/guiEditor_Main_Final_000000000000f.nwd | 2 ++ tests/reference/guiEditor_Main_Final_nwProject.nwx | 8 ++++---- tests/test_gui/test_gui_guimain.py | 9 +++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/reference/guiEditor_Main_Final_000000000000f.nwd b/tests/reference/guiEditor_Main_Final_000000000000f.nwd index 1ac700fb..ab603231 100644 --- a/tests/reference/guiEditor_Main_Final_000000000000f.nwd +++ b/tests/reference/guiEditor_Main_Final_000000000000f.nwd @@ -35,6 +35,8 @@ Some “ double quoted text with spaces padded ”. Add space before this colon : See? +But don’t add a double space : See? + “Tab-indented text” >“Paragraph-indented text” diff --git a/tests/reference/guiEditor_Main_Final_nwProject.nwx b/tests/reference/guiEditor_Main_Final_nwProject.nwx index 5496b5b3..f61d3493 100644 --- a/tests/reference/guiEditor_Main_Final_nwProject.nwx +++ b/tests/reference/guiEditor_Main_Final_nwProject.nwx @@ -1,5 +1,5 @@ - + New Project New Novel @@ -17,8 +17,8 @@ None 0000000000008 0000000000008 - 145 - 118 + 153 + 126 27 @@ -59,7 +59,7 @@ New Chapter - + New Scene diff --git a/tests/test_gui/test_gui_guimain.py b/tests/test_gui/test_gui_guimain.py index b2e446bc..1dd69314 100644 --- a/tests/test_gui/test_gui_guimain.py +++ b/tests/test_gui/test_gui_guimain.py @@ -412,6 +412,7 @@ def testGuiMain_Editing(qtbot, monkeypatch, nwGUI, fncProj, refDir, outDir, mock # Insert spaces before and after quotes nwGUI.mainConf.fmtPadBefore = "\u201d" nwGUI.mainConf.fmtPadAfter = "\u201c" + nwGUI.docEditor.initEditor() for c in "Some \"double quoted text with spaces padded\".": qtbot.keyClick(nwGUI.docEditor, c, delay=typeDelay) @@ -420,9 +421,11 @@ def testGuiMain_Editing(qtbot, monkeypatch, nwGUI, fncProj, refDir, outDir, mock nwGUI.mainConf.fmtPadBefore = "" nwGUI.mainConf.fmtPadAfter = "" + nwGUI.docEditor.initEditor() # Insert spaces before colon, but ignore tags and synopsis nwGUI.mainConf.fmtPadBefore = ":" + nwGUI.docEditor.initEditor() for c in "@object: NoSpaceAdded": qtbot.keyClick(nwGUI.docEditor, c, delay=typeDelay) @@ -439,7 +442,13 @@ def testGuiMain_Editing(qtbot, monkeypatch, nwGUI, fncProj, refDir, outDir, mock qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=keyDelay) qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=keyDelay) + for c in "But don't add a double space : See?": + qtbot.keyClick(nwGUI.docEditor, c, delay=typeDelay) + qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=keyDelay) + qtbot.keyClick(nwGUI.docEditor, Qt.Key_Return, delay=keyDelay) + nwGUI.mainConf.fmtPadBefore = "" + nwGUI.docEditor.initEditor() # Indent and Align # ================