Update tests
This commit is contained in:
@@ -16,6 +16,8 @@
|
|||||||
<autoOutline>True</autoOutline>
|
<autoOutline>True</autoOutline>
|
||||||
<lastEdited>7a992350f3eb6</lastEdited>
|
<lastEdited>7a992350f3eb6</lastEdited>
|
||||||
<lastViewed>None</lastViewed>
|
<lastViewed>None</lastViewed>
|
||||||
|
<lastNovel>None</lastNovel>
|
||||||
|
<lastOutline>None</lastOutline>
|
||||||
<lastWordCount>3847</lastWordCount>
|
<lastWordCount>3847</lastWordCount>
|
||||||
<novelWordCount>3109</novelWordCount>
|
<novelWordCount>3109</novelWordCount>
|
||||||
<notesWordCount>738</notesWordCount>
|
<notesWordCount>738</notesWordCount>
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
<autoOutline>True</autoOutline>
|
<autoOutline>True</autoOutline>
|
||||||
<lastEdited>None</lastEdited>
|
<lastEdited>None</lastEdited>
|
||||||
<lastViewed>None</lastViewed>
|
<lastViewed>None</lastViewed>
|
||||||
|
<lastNovel>None</lastNovel>
|
||||||
|
<lastOutline>None</lastOutline>
|
||||||
<lastWordCount>10</lastWordCount>
|
<lastWordCount>10</lastWordCount>
|
||||||
<novelWordCount>10</novelWordCount>
|
<novelWordCount>10</novelWordCount>
|
||||||
<notesWordCount>0</notesWordCount>
|
<notesWordCount>0</notesWordCount>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<novelWriterXML appVersion="1.7-beta1" hexVersion="0x010700b1" fileVersion="1.4" timeStamp="2022-05-21 17:49:23">
|
<novelWriterXML appVersion="1.7-beta1" hexVersion="0x010700b1" fileVersion="1.4" timeStamp="2022-06-12 17:45:51">
|
||||||
<project>
|
<project>
|
||||||
<name>Test Custom</name>
|
<name>Test Custom</name>
|
||||||
<title>Test Novel</title>
|
<title>Test Novel</title>
|
||||||
@@ -17,6 +17,8 @@
|
|||||||
<autoOutline>True</autoOutline>
|
<autoOutline>True</autoOutline>
|
||||||
<lastEdited>None</lastEdited>
|
<lastEdited>None</lastEdited>
|
||||||
<lastViewed>None</lastViewed>
|
<lastViewed>None</lastViewed>
|
||||||
|
<lastNovel>None</lastNovel>
|
||||||
|
<lastOutline>None</lastOutline>
|
||||||
<lastWordCount>0</lastWordCount>
|
<lastWordCount>0</lastWordCount>
|
||||||
<novelWordCount>0</novelWordCount>
|
<novelWordCount>0</novelWordCount>
|
||||||
<notesWordCount>0</notesWordCount>
|
<notesWordCount>0</notesWordCount>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<novelWriterXML appVersion="1.7-beta1" hexVersion="0x010700b1" fileVersion="1.4" timeStamp="2022-05-21 17:48:40">
|
<novelWriterXML appVersion="1.7-beta1" hexVersion="0x010700b1" fileVersion="1.4" timeStamp="2022-06-12 17:45:51">
|
||||||
<project>
|
<project>
|
||||||
<name>Test Custom</name>
|
<name>Test Custom</name>
|
||||||
<title>Test Novel</title>
|
<title>Test Novel</title>
|
||||||
@@ -17,6 +17,8 @@
|
|||||||
<autoOutline>True</autoOutline>
|
<autoOutline>True</autoOutline>
|
||||||
<lastEdited>None</lastEdited>
|
<lastEdited>None</lastEdited>
|
||||||
<lastViewed>None</lastViewed>
|
<lastViewed>None</lastViewed>
|
||||||
|
<lastNovel>None</lastNovel>
|
||||||
|
<lastOutline>None</lastOutline>
|
||||||
<lastWordCount>0</lastWordCount>
|
<lastWordCount>0</lastWordCount>
|
||||||
<novelWordCount>0</novelWordCount>
|
<novelWordCount>0</novelWordCount>
|
||||||
<notesWordCount>0</notesWordCount>
|
<notesWordCount>0</notesWordCount>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<novelWriterXML appVersion="1.7-beta1" hexVersion="0x010700b1" fileVersion="1.4" timeStamp="2022-06-06 21:17:27">
|
<novelWriterXML appVersion="1.7-beta1" hexVersion="0x010700b1" fileVersion="1.4" timeStamp="2022-06-12 17:45:51">
|
||||||
<project>
|
<project>
|
||||||
<name>New Project</name>
|
<name>New Project</name>
|
||||||
<title>New Novel</title>
|
<title>New Novel</title>
|
||||||
@@ -16,6 +16,8 @@
|
|||||||
<autoOutline>True</autoOutline>
|
<autoOutline>True</autoOutline>
|
||||||
<lastEdited>None</lastEdited>
|
<lastEdited>None</lastEdited>
|
||||||
<lastViewed>None</lastViewed>
|
<lastViewed>None</lastViewed>
|
||||||
|
<lastNovel>None</lastNovel>
|
||||||
|
<lastOutline>None</lastOutline>
|
||||||
<lastWordCount>2</lastWordCount>
|
<lastWordCount>2</lastWordCount>
|
||||||
<novelWordCount>1</novelWordCount>
|
<novelWordCount>1</novelWordCount>
|
||||||
<notesWordCount>1</notesWordCount>
|
<notesWordCount>1</notesWordCount>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<novelWriterXML appVersion="1.7-beta1" hexVersion="0x010700b1" fileVersion="1.4" timeStamp="2022-05-21 17:50:26">
|
<novelWriterXML appVersion="1.7-beta1" hexVersion="0x010700b1" fileVersion="1.4" timeStamp="2022-06-12 17:45:51">
|
||||||
<project>
|
<project>
|
||||||
<name>New Project</name>
|
<name>New Project</name>
|
||||||
<title></title>
|
<title></title>
|
||||||
@@ -15,6 +15,8 @@
|
|||||||
<autoOutline>True</autoOutline>
|
<autoOutline>True</autoOutline>
|
||||||
<lastEdited>None</lastEdited>
|
<lastEdited>None</lastEdited>
|
||||||
<lastViewed>None</lastViewed>
|
<lastViewed>None</lastViewed>
|
||||||
|
<lastNovel>None</lastNovel>
|
||||||
|
<lastOutline>None</lastOutline>
|
||||||
<lastWordCount>0</lastWordCount>
|
<lastWordCount>0</lastWordCount>
|
||||||
<novelWordCount>0</novelWordCount>
|
<novelWordCount>0</novelWordCount>
|
||||||
<notesWordCount>0</notesWordCount>
|
<notesWordCount>0</notesWordCount>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<novelWriterXML appVersion="1.7-beta1" hexVersion="0x010700b1" fileVersion="1.4" timeStamp="2022-05-21 22:07:28">
|
<novelWriterXML appVersion="1.7-beta1" hexVersion="0x010700b1" fileVersion="1.4" timeStamp="2022-06-12 17:45:51">
|
||||||
<project>
|
<project>
|
||||||
<name>New Project</name>
|
<name>New Project</name>
|
||||||
<title>New Novel</title>
|
<title>New Novel</title>
|
||||||
@@ -16,6 +16,8 @@
|
|||||||
<autoOutline>True</autoOutline>
|
<autoOutline>True</autoOutline>
|
||||||
<lastEdited>None</lastEdited>
|
<lastEdited>None</lastEdited>
|
||||||
<lastViewed>None</lastViewed>
|
<lastViewed>None</lastViewed>
|
||||||
|
<lastNovel>None</lastNovel>
|
||||||
|
<lastOutline>None</lastOutline>
|
||||||
<lastWordCount>0</lastWordCount>
|
<lastWordCount>0</lastWordCount>
|
||||||
<novelWordCount>0</novelWordCount>
|
<novelWordCount>0</novelWordCount>
|
||||||
<notesWordCount>0</notesWordCount>
|
<notesWordCount>0</notesWordCount>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<novelWriterXML appVersion="1.7-beta1" hexVersion="0x010700b1" fileVersion="1.4" timeStamp="2022-05-21 17:27:16">
|
<novelWriterXML appVersion="1.7-beta1" hexVersion="0x010700b1" fileVersion="1.4" timeStamp="2022-06-12 17:52:44">
|
||||||
<project>
|
<project>
|
||||||
<name>New Project</name>
|
<name>New Project</name>
|
||||||
<title>New Novel</title>
|
<title>New Novel</title>
|
||||||
@@ -16,6 +16,8 @@
|
|||||||
<autoOutline>True</autoOutline>
|
<autoOutline>True</autoOutline>
|
||||||
<lastEdited>000000000000f</lastEdited>
|
<lastEdited>000000000000f</lastEdited>
|
||||||
<lastViewed>None</lastViewed>
|
<lastViewed>None</lastViewed>
|
||||||
|
<lastNovel>0000000000008</lastNovel>
|
||||||
|
<lastOutline>None</lastOutline>
|
||||||
<lastWordCount>129</lastWordCount>
|
<lastWordCount>129</lastWordCount>
|
||||||
<novelWordCount>102</novelWordCount>
|
<novelWordCount>102</novelWordCount>
|
||||||
<notesWordCount>27</notesWordCount>
|
<notesWordCount>27</notesWordCount>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<novelWriterXML appVersion="1.7-beta1" hexVersion="0x010700b1" fileVersion="1.4" timeStamp="2022-05-21 17:25:41">
|
<novelWriterXML appVersion="1.7-beta1" hexVersion="0x010700b1" fileVersion="1.4" timeStamp="2022-06-12 17:45:57">
|
||||||
<project>
|
<project>
|
||||||
<name>New Project</name>
|
<name>New Project</name>
|
||||||
<title>New Novel</title>
|
<title>New Novel</title>
|
||||||
@@ -16,6 +16,8 @@
|
|||||||
<autoOutline>True</autoOutline>
|
<autoOutline>True</autoOutline>
|
||||||
<lastEdited>None</lastEdited>
|
<lastEdited>None</lastEdited>
|
||||||
<lastViewed>None</lastViewed>
|
<lastViewed>None</lastViewed>
|
||||||
|
<lastNovel>None</lastNovel>
|
||||||
|
<lastOutline>None</lastOutline>
|
||||||
<lastWordCount>9</lastWordCount>
|
<lastWordCount>9</lastWordCount>
|
||||||
<novelWordCount>9</novelWordCount>
|
<novelWordCount>9</novelWordCount>
|
||||||
<notesWordCount>0</notesWordCount>
|
<notesWordCount>0</notesWordCount>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<novelWriterXML appVersion="1.7-beta1" hexVersion="0x010700b1" fileVersion="1.4" timeStamp="2022-05-21 17:31:17">
|
<novelWriterXML appVersion="1.7-beta1" hexVersion="0x010700b1" fileVersion="1.4" timeStamp="2022-06-12 17:45:53">
|
||||||
<project>
|
<project>
|
||||||
<name>Project Name</name>
|
<name>Project Name</name>
|
||||||
<title>Project Title</title>
|
<title>Project Title</title>
|
||||||
@@ -17,6 +17,8 @@
|
|||||||
<autoOutline>True</autoOutline>
|
<autoOutline>True</autoOutline>
|
||||||
<lastEdited>None</lastEdited>
|
<lastEdited>None</lastEdited>
|
||||||
<lastViewed>None</lastViewed>
|
<lastViewed>None</lastViewed>
|
||||||
|
<lastNovel>None</lastNovel>
|
||||||
|
<lastOutline>None</lastOutline>
|
||||||
<lastWordCount>9</lastWordCount>
|
<lastWordCount>9</lastWordCount>
|
||||||
<novelWordCount>9</novelWordCount>
|
<novelWordCount>9</novelWordCount>
|
||||||
<notesWordCount>0</notesWordCount>
|
<notesWordCount>0</notesWordCount>
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ def testGuiMain_ProjectTreeItems(qtbot, monkeypatch, nwGUI, fncProj, mockRnd):
|
|||||||
|
|
||||||
# Novel Tree has focus
|
# Novel Tree has focus
|
||||||
nwGUI.projStack.setCurrentIndex(1)
|
nwGUI.projStack.setCurrentIndex(1)
|
||||||
nwGUI.novelView.refreshTree(True)
|
nwGUI.novelView.refreshTree(rootHandle=None, overRide=True)
|
||||||
with monkeypatch.context() as mp:
|
with monkeypatch.context() as mp:
|
||||||
mp.setattr(GuiNovelView, "treeFocus", lambda *a: True)
|
mp.setattr(GuiNovelView, "treeFocus", lambda *a: True)
|
||||||
assert nwGUI.docEditor.docHandle() is None
|
assert nwGUI.docEditor.docHandle() is None
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ def testGuiNovelTree_TreeItems(qtbot, monkeypatch, nwGUI, nwMinimal):
|
|||||||
|
|
||||||
nwGUI.projStack.setCurrentIndex(nwGUI.idxNovelView)
|
nwGUI.projStack.setCurrentIndex(nwGUI.idxNovelView)
|
||||||
nwGUI.rebuildIndex()
|
nwGUI.rebuildIndex()
|
||||||
novelTree._populateTree()
|
novelTree._populateTree(rootHandle=None)
|
||||||
assert novelTree.topLevelItemCount() == 1
|
assert novelTree.topLevelItemCount() == 1
|
||||||
|
|
||||||
# Rebuild should preserve selection
|
# Rebuild should preserve selection
|
||||||
@@ -133,7 +133,7 @@ def testGuiNovelTree_TreeItems(qtbot, monkeypatch, nwGUI, nwMinimal):
|
|||||||
"#### Section\n\n"
|
"#### Section\n\n"
|
||||||
))
|
))
|
||||||
nwGUI.rebuildIndex()
|
nwGUI.rebuildIndex()
|
||||||
novelTree._populateTree()
|
novelTree._populateTree(None)
|
||||||
assert novelTree.topLevelItem(0).text(novelTree.C_TITLE) == "Section wo/Scene"
|
assert novelTree.topLevelItem(0).text(novelTree.C_TITLE) == "Section wo/Scene"
|
||||||
assert novelTree.topLevelItem(1).text(novelTree.C_TITLE) == "Scene wo/Chapter"
|
assert novelTree.topLevelItem(1).text(novelTree.C_TITLE) == "Scene wo/Chapter"
|
||||||
assert novelTree.topLevelItem(2).text(novelTree.C_TITLE) == "Chapter wo/Title"
|
assert novelTree.topLevelItem(2).text(novelTree.C_TITLE) == "Chapter wo/Title"
|
||||||
|
|||||||
Reference in New Issue
Block a user