Update test coverage

This commit is contained in:
Veronica Berglyd Olsen
2024-03-28 14:10:01 +01:00
parent 247cd65bb6
commit c05463f0ae
+8
View File
@@ -20,6 +20,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
from __future__ import annotations
from time import time
import pytest
from PyQt5.QtCore import Qt
@@ -58,6 +60,7 @@ def testGuiDocSearch_Main(qtbot, monkeypatch, nwGUI, prjLipsum):
assert result == (handle, 3, 5)
# Move down
search.searchText.setFocus()
qtbot.keyClick(search, Qt.Key.Key_Down)
assert firstDoc.isSelected() is True
@@ -119,6 +122,11 @@ def testGuiDocSearch_Main(qtbot, monkeypatch, nwGUI, prjLipsum):
assert search.searchResult.topLevelItemCount() == 10
assert totalCount() == 34
# Re-run search should not change the result
search.textChanged(handle, time() + 1000.0)
assert search.searchResult.topLevelItemCount() == 10
assert totalCount() == 34
# qtbot.stop()
nwGUI.closeProject()