From c15ffb0813e8a1b8439a3d57c6c7d01197673397 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Mon, 15 Jan 2024 15:59:46 +0100 Subject: [PATCH] Update test coverage --- tests/test_gui/test_gui_docviewerpanel.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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