Add a wait statement to check paintEvent in Preferences

This commit is contained in:
Veronica Berglyd Olsen
2024-07-03 20:29:00 +02:00
parent 5e8892ee7c
commit f4f3f82954
+4 -2
View File
@@ -92,7 +92,8 @@ def testDlgPreferences_Actions(qtbot, monkeypatch, nwGUI):
"""Test the preferences dialog actions."""
monkeypatch.setattr(SHARED._spelling, "listDictionaries", lambda: [("en", "English [en]")])
prefs = GuiPreferences(nwGUI)
prefs.show()
with qtbot.waitExposed(prefs):
prefs.show()
# Check Navigation
vBar = prefs.mainForm.verticalScrollBar()
@@ -146,7 +147,8 @@ def testDlgPreferences_Settings(qtbot, monkeypatch, nwGUI, tstPaths):
monkeypatch.setattr(CONFIG, "listLanguages", lambda *a: languages)
prefs = GuiPreferences(nwGUI)
prefs.show()
with qtbot.waitExposed(prefs):
prefs.show()
# Appearance
prefs.guiLocale.setCurrentIndex(prefs.guiLocale.findData("en_US"))