From 8d2551e0b6d1b708136a779be0a596b264ae8fa4 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Thu, 19 Jun 2025 21:35:39 +0200 Subject: [PATCH] Add notes toggle test coverage --- tests/test_gui/test_gui_docviewer.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/test_gui/test_gui_docviewer.py b/tests/test_gui/test_gui_docviewer.py index 65c31a24..8890df22 100644 --- a/tests/test_gui/test_gui_docviewer.py +++ b/tests/test_gui/test_gui_docviewer.py @@ -223,17 +223,23 @@ def testGuiViewer_Main(qtbot, monkeypatch, nwGUI, prjLipsum): CONFIG.showFullPath = True # Document footer show/hide synopsis - assert nwGUI.viewDocument("f96ec11c6a3da") is True + nwGUI.viewDocument("f96ec11c6a3da") assert len(docViewer.toPlainText()) == 4314 docViewer.docFooter._doToggleSynopsis(False) assert len(docViewer.toPlainText()) == 4098 # Document footer show/hide comments - assert nwGUI.viewDocument("846352075de7d") is True + nwGUI.viewDocument("846352075de7d") assert len(docViewer.toPlainText()) == 683 docViewer.docFooter._doToggleComments(False) assert len(docViewer.toPlainText()) == 634 + # Document footer show/hide notes + nwGUI.viewDocument("88d59a277361b") + assert len(docViewer.toPlainText()) == 900 + docViewer.docFooter._doToggleNotes(False) + assert len(docViewer.toPlainText()) == 871 + # Crash the HTML rendering with monkeypatch.context() as mp: mp.setattr(ToQTextDocument, "doConvert", causeException)