From 8a9b038d56fd9f15fe6a322f2a753556f5e7b3fc Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Mon, 10 Jun 2024 13:44:47 +0200 Subject: [PATCH] Use the direct insert call --- tests/test_tools/test_tools_lipsum.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_tools/test_tools_lipsum.py b/tests/test_tools/test_tools_lipsum.py index 5c4e263fc..261afeb7f 100644 --- a/tests/test_tools/test_tools_lipsum.py +++ b/tests/test_tools/test_tools_lipsum.py @@ -25,6 +25,7 @@ from PyQt5.QtWidgets import QAction from novelwriter import SHARED +from novelwriter.enum import nwDocInsert from novelwriter.tools.lipsum import GuiLipsum from tests.tools import C, buildTestProject @@ -63,7 +64,7 @@ def testToolLipsum_Main(qtbot, monkeypatch, nwGUI, projPath, mockRnd): mp.setattr(GuiLipsum, "exec", lambda *a: None) mp.setattr(GuiLipsum, "lipsumText", "FooBar") with qtbot.waitSignal(nwGUI.docEditor.textChanged): - nwGUI.mainMenu.aLipsumText.activate(QAction.Trigger) + nwGUI.docEditor.insertText(nwDocInsert.LIPSUM) assert nwGUI.docEditor.getText() == "### New Scene\n\nFooBar" # qtbot.stop()