Update test coverage

This commit is contained in:
Veronica Berglyd Olsen
2024-01-15 15:59:46 +01:00
parent a2a62f8b26
commit c15ffb0813
+12
View File
@@ -28,6 +28,7 @@ from PyQt5.QtGui import QIcon
from novelwriter import CONFIG, SHARED from novelwriter import CONFIG, SHARED
from novelwriter.constants import nwLists from novelwriter.constants import nwLists
from novelwriter.core.item import NWItem
from novelwriter.dialogs.editlabel import GuiEditLabel from novelwriter.dialogs.editlabel import GuiEditLabel
@@ -216,6 +217,17 @@ def testGuiViewerPanel_Tags(qtbot, monkeypatch, caplog, nwGUI, projPath, mockRnd
charTab._treeItemDoubleClicked(charTab.model().index(0, charTab.C_NAME)) charTab._treeItemDoubleClicked(charTab.model().index(0, charTab.C_NAME))
assert nwGUI.docViewer.docHandle == hJane assert nwGUI.docViewer.docHandle == hJane
# Hide Inactive Tags
viewPanel.aInactive.setChecked(True)
assert charTab.topLevelItemCount() == 2
nwJohn = SHARED.project.tree[hJohn]
assert isinstance(nwJohn, NWItem)
nwJohn.setActive(False)
projTree.setTreeItemValues(hJohn)
projTree._alertTreeChange(hJohn, flush=False)
assert charTab.topLevelItemCount() == 1
# qtbot.stop() # qtbot.stop()
# END Test testGuiViewerPanel_Tags # END Test testGuiViewerPanel_Tags