From bb2c78c0f6c9eee90d2d20c615d0a9e0c763a4b8 Mon Sep 17 00:00:00 2001
From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com>
Date: Sun, 31 Jul 2022 18:50:43 +0200
Subject: [PATCH] Update tests
---
tests/lipsum/nwProject.nwx | 1 -
tests/minimal/nwProject.nwx | 1 -
tests/reference/coreProject_NewCustomA_nwProject.nwx | 3 +--
tests/reference/coreProject_NewCustomB_nwProject.nwx | 1 -
tests/reference/coreProject_NewFileFolder_nwProject.nwx | 3 +--
tests/reference/coreProject_NewMinimal_nwProject.nwx | 3 +--
tests/reference/coreProject_NewRoot_nwProject.nwx | 3 +--
tests/reference/guiEditor_Main_Final_nwProject.nwx | 5 ++---
tests/reference/guiEditor_Main_Initial_nwProject.nwx | 3 +--
tests/reference/guiProjSettings_Dialog_nwProject.nwx | 3 +--
tests/test_core/test_core_project.py | 6 ------
tests/test_gui/test_gui_guimain.py | 4 +---
tests/test_gui/test_gui_outline.py | 9 ++-------
13 files changed, 11 insertions(+), 34 deletions(-)
diff --git a/tests/lipsum/nwProject.nwx b/tests/lipsum/nwProject.nwx
index a8cf6393..4eac7bc6 100644
--- a/tests/lipsum/nwProject.nwx
+++ b/tests/lipsum/nwProject.nwx
@@ -13,7 +13,6 @@
en_GB
False
None
- True
7a992350f3eb6
None
None
diff --git a/tests/minimal/nwProject.nwx b/tests/minimal/nwProject.nwx
index 430ecf17..5862d48c 100644
--- a/tests/minimal/nwProject.nwx
+++ b/tests/minimal/nwProject.nwx
@@ -14,7 +14,6 @@
en_GB
False
None
- True
None
None
None
diff --git a/tests/reference/coreProject_NewCustomA_nwProject.nwx b/tests/reference/coreProject_NewCustomA_nwProject.nwx
index f046fceb..48ae6363 100644
--- a/tests/reference/coreProject_NewCustomA_nwProject.nwx
+++ b/tests/reference/coreProject_NewCustomA_nwProject.nwx
@@ -1,5 +1,5 @@
-
+
Test Custom
Test Novel
@@ -14,7 +14,6 @@
None
False
None
- True
None
None
None
diff --git a/tests/reference/coreProject_NewCustomB_nwProject.nwx b/tests/reference/coreProject_NewCustomB_nwProject.nwx
index 5d02172c..9399dd3f 100644
--- a/tests/reference/coreProject_NewCustomB_nwProject.nwx
+++ b/tests/reference/coreProject_NewCustomB_nwProject.nwx
@@ -14,7 +14,6 @@
None
False
None
- True
None
None
None
diff --git a/tests/reference/coreProject_NewFileFolder_nwProject.nwx b/tests/reference/coreProject_NewFileFolder_nwProject.nwx
index 20aeb027..b8df1c93 100644
--- a/tests/reference/coreProject_NewFileFolder_nwProject.nwx
+++ b/tests/reference/coreProject_NewFileFolder_nwProject.nwx
@@ -1,5 +1,5 @@
-
+
New Project
New Novel
@@ -13,7 +13,6 @@
None
False
None
- True
None
None
None
diff --git a/tests/reference/coreProject_NewMinimal_nwProject.nwx b/tests/reference/coreProject_NewMinimal_nwProject.nwx
index ba08600f..633f9f4c 100644
--- a/tests/reference/coreProject_NewMinimal_nwProject.nwx
+++ b/tests/reference/coreProject_NewMinimal_nwProject.nwx
@@ -1,5 +1,5 @@
-
+
New Project
@@ -12,7 +12,6 @@
None
False
None
- True
None
None
None
diff --git a/tests/reference/coreProject_NewRoot_nwProject.nwx b/tests/reference/coreProject_NewRoot_nwProject.nwx
index 0a606137..9102601d 100644
--- a/tests/reference/coreProject_NewRoot_nwProject.nwx
+++ b/tests/reference/coreProject_NewRoot_nwProject.nwx
@@ -1,5 +1,5 @@
-
+
New Project
New Novel
@@ -13,7 +13,6 @@
None
False
None
- True
None
None
None
diff --git a/tests/reference/guiEditor_Main_Final_nwProject.nwx b/tests/reference/guiEditor_Main_Final_nwProject.nwx
index ecc96604..884ab272 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
@@ -13,11 +13,10 @@
None
True
None
- True
000000000000f
None
0000000000008
- None
+ 0000000000008
129
102
27
diff --git a/tests/reference/guiEditor_Main_Initial_nwProject.nwx b/tests/reference/guiEditor_Main_Initial_nwProject.nwx
index 1a79d2c2..0563c440 100644
--- a/tests/reference/guiEditor_Main_Initial_nwProject.nwx
+++ b/tests/reference/guiEditor_Main_Initial_nwProject.nwx
@@ -1,5 +1,5 @@
-
+
New Project
New Novel
@@ -13,7 +13,6 @@
None
False
None
- True
None
None
None
diff --git a/tests/reference/guiProjSettings_Dialog_nwProject.nwx b/tests/reference/guiProjSettings_Dialog_nwProject.nwx
index 883cb26d..1db9d48c 100644
--- a/tests/reference/guiProjSettings_Dialog_nwProject.nwx
+++ b/tests/reference/guiProjSettings_Dialog_nwProject.nwx
@@ -1,5 +1,5 @@
-
+
Project Name
Project Title
@@ -14,7 +14,6 @@
None
False
en
- True
None
None
None
diff --git a/tests/test_core/test_core_project.py b/tests/test_core/test_core_project.py
index a6409b98..3be812e1 100644
--- a/tests/test_core/test_core_project.py
+++ b/tests/test_core/test_core_project.py
@@ -934,12 +934,6 @@ def testCoreProject_Methods(monkeypatch, mockGUI, tmpDir, fncDir, mockRnd):
assert theProject.localLookup(1) == "One"
assert theProject.localLookup(10) == "Ten"
- # Automatic outline update
- theProject.projChanged = False
- assert theProject.setAutoOutline(True)
- assert not theProject.setAutoOutline(False)
- assert theProject.projChanged
-
# Last edited
theProject.projChanged = False
assert theProject.setLastEdited("0123456789abc")
diff --git a/tests/test_gui/test_gui_guimain.py b/tests/test_gui/test_gui_guimain.py
index 6407b84b..a27fc816 100644
--- a/tests/test_gui/test_gui_guimain.py
+++ b/tests/test_gui/test_gui_guimain.py
@@ -149,9 +149,7 @@ def testGuiMain_ProjectTreeItems(qtbot, monkeypatch, nwGUI, fncProj, mockRnd):
with monkeypatch.context() as mp:
mp.setattr(GuiOutlineView, "treeHasFocus", lambda *a: True)
assert nwGUI.docEditor.docHandle() is None
- actItem = nwGUI.outlineView.outlineTree.topLevelItem(0)
- chpItem = actItem.child(0)
- selItem = chpItem.child(0)
+ selItem = nwGUI.outlineView.outlineTree.topLevelItem(2)
nwGUI.outlineView.outlineTree.setCurrentItem(selItem)
nwGUI._keyPressReturn()
assert nwGUI.docEditor.docHandle() == sHandle
diff --git a/tests/test_gui/test_gui_outline.py b/tests/test_gui/test_gui_outline.py
index 26ca9803..f530b418 100644
--- a/tests/test_gui/test_gui_outline.py
+++ b/tests/test_gui/test_gui_outline.py
@@ -232,9 +232,7 @@ def testGuiOutline_Content(qtbot, monkeypatch, nwGUI, nwLipsum):
assert outlineData.pCValue.text() == "3"
# Scene One
- actItem = outlineTree.topLevelItem(1)
- chpItem = actItem.child(0)
- selItem = chpItem.child(0)
+ selItem = outlineTree.topLevelItem(4)
outlineTree.setCurrentItem(selItem)
tHandle, tLine = outlineTree.getSelectedHandle()
@@ -252,10 +250,7 @@ def testGuiOutline_Content(qtbot, monkeypatch, nwGUI, nwLipsum):
assert nwGUI.docViewer.docHandle() == "4c4f28287af27"
# Scene One, Section Two
- actItem = outlineTree.topLevelItem(1)
- chpItem = actItem.child(0)
- scnItem = chpItem.child(0)
- selItem = scnItem.child(0)
+ selItem = outlineTree.topLevelItem(5)
outlineTree.setCurrentItem(selItem)
tHandle, tLine = outlineTree.getSelectedHandle()