diff --git a/tests/test_gui/test_gui_docviewerpanel.py b/tests/test_gui/test_gui_docviewerpanel.py index 764bc3b6..b194a52f 100644 --- a/tests/test_gui/test_gui_docviewerpanel.py +++ b/tests/test_gui/test_gui_docviewerpanel.py @@ -28,6 +28,7 @@ from PyQt5.QtGui import QIcon from novelwriter import CONFIG, SHARED from novelwriter.constants import nwLists +from novelwriter.core.item import NWItem 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)) 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() # END Test testGuiViewerPanel_Tags