From ec6a5712e551c6c506fe102e705f1de32d327a49 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sun, 14 Apr 2024 23:59:57 +0200 Subject: [PATCH] Update tests --- tests/reference/coreIndex_LoadSave_tagsIndex.json | 4 ++++ tests/reference/guiEditor_Main_Final_0000000000011.nwd | 6 +++--- tests/reference/guiEditor_Main_Final_nwProject.nwx | 4 ++-- tests/test_core/test_core_index.py | 8 +++++++- tests/test_gui/test_gui_guimain.py | 2 +- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/tests/reference/coreIndex_LoadSave_tagsIndex.json b/tests/reference/coreIndex_LoadSave_tagsIndex.json index 4c10214a..5531aac2 100644 --- a/tests/reference/coreIndex_LoadSave_tagsIndex.json +++ b/tests/reference/coreIndex_LoadSave_tagsIndex.json @@ -106,5 +106,9 @@ "T0001": {"level": "H1", "title": "Ancient Europe", "line": 1, "tag": "europe", "cCount": 1770, "wCount": 259, "pCount": 3, "synopsis": ""} } } + }, + "novelWriter.textIndex": { + "comments": {}, + "footnotes": {} } } diff --git a/tests/reference/guiEditor_Main_Final_0000000000011.nwd b/tests/reference/guiEditor_Main_Final_0000000000011.nwd index ed7002ab..bd73dfd8 100644 --- a/tests/reference/guiEditor_Main_Final_0000000000011.nwd +++ b/tests/reference/guiEditor_Main_Final_0000000000011.nwd @@ -1,10 +1,10 @@ %%~name: New Note %%~path: 0000000000009/0000000000011 %%~kind: PLOT/NOTE -%%~hash: 8ff26f8a18ad6390c2ce725c441ab0c792a125cf -%%~date: 2023-08-25 18:15:35/2023-08-25 18:15:35 +%%~hash: 3d3697638a70fc86cc023df6d42202a262d93905 +%%~date: 2024-04-14 23:46:49/2024-04-14 23:46:49 # Main Plot @tag: MainPlot -This is a file detailing the main plot. +This is a file [i]detailing[/i] the main plot. diff --git a/tests/reference/guiEditor_Main_Final_nwProject.nwx b/tests/reference/guiEditor_Main_Final_nwProject.nwx index 2c6603eb..4c20bd70 100644 --- a/tests/reference/guiEditor_Main_Final_nwProject.nwx +++ b/tests/reference/guiEditor_Main_Final_nwProject.nwx @@ -1,5 +1,5 @@ - + New Project Jane Doe @@ -54,7 +54,7 @@ Plot - + New Note diff --git a/tests/test_core/test_core_index.py b/tests/test_core/test_core_index.py index 8a4c9db1..fc4ac02c 100644 --- a/tests/test_core/test_core_index.py +++ b/tests/test_core/test_core_index.py @@ -127,7 +127,13 @@ def testCoreIndex_LoadSave(qtbot, monkeypatch, prjLipsum, mockGUI, tstPaths): assert index.indexBroken is True # Write an index file that passes loading, but is still empty - writeFile(projFile, '{"novelWriter.tagsIndex": {}, "novelWriter.itemIndex": {}}') + writeFile(projFile, ( + '{' + '"novelWriter.tagsIndex": {}, ' + '"novelWriter.itemIndex": {}, ' + '"novelWriter.textIndex": {}' + '}' + )) assert index.loadIndex() is True assert index.indexBroken is False diff --git a/tests/test_gui/test_gui_guimain.py b/tests/test_gui/test_gui_guimain.py index 4de04a95..dc6ffcfc 100644 --- a/tests/test_gui/test_gui_guimain.py +++ b/tests/test_gui/test_gui_guimain.py @@ -274,7 +274,7 @@ def testGuiMain_Editing(qtbot, monkeypatch, nwGUI, projPath, tstPaths, mockRnd): qtbot.keyClick(docEditor, c, delay=KEY_DELAY) qtbot.keyClick(docEditor, Qt.Key_Return, delay=KEY_DELAY) qtbot.keyClick(docEditor, Qt.Key_Return, delay=KEY_DELAY) - for c in "This is a file detailing the main plot.": + for c in "This is a file [i]detailing[/i] the main plot.": qtbot.keyClick(docEditor, c, delay=KEY_DELAY) qtbot.keyClick(docEditor, Qt.Key_Return, delay=KEY_DELAY)