Update tests

This commit is contained in:
Veronica Berglyd Olsen
2022-06-12 17:54:37 +02:00
parent 52683d5a21
commit 88b2d61cec
12 changed files with 31 additions and 11 deletions
+2 -2
View File
@@ -62,7 +62,7 @@ def testGuiNovelTree_TreeItems(qtbot, monkeypatch, nwGUI, nwMinimal):
nwGUI.projStack.setCurrentIndex(nwGUI.idxNovelView)
nwGUI.rebuildIndex()
novelTree._populateTree()
novelTree._populateTree(rootHandle=None)
assert novelTree.topLevelItemCount() == 1
# Rebuild should preserve selection
@@ -133,7 +133,7 @@ def testGuiNovelTree_TreeItems(qtbot, monkeypatch, nwGUI, nwMinimal):
"#### Section\n\n"
))
nwGUI.rebuildIndex()
novelTree._populateTree()
novelTree._populateTree(None)
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(2).text(novelTree.C_TITLE) == "Chapter wo/Title"