Add test coverage of the new options

This commit is contained in:
Veronica K. B. Olsen
2020-10-11 20:18:58 +02:00
parent ae8ec555fd
commit 2382118dad
2 changed files with 24 additions and 4 deletions
+4 -4
View File
@@ -16,8 +16,8 @@ docpane = 400, 400
viewpane = 500, 150
outlinepane = 500, 150
fullscreen = False
hidevscroll = False
hidehscroll = False
hidevscroll = True
hidehscroll = True
[Project]
autosaveproject = 40
@@ -39,8 +39,8 @@ repsquotes = True
repdquotes = True
repdash = True
repdots = True
scrollpastend = True
scollwithcursor = False
scrollpastend = False
scollwithcursor = True
fmtsinglequote = ,
fmtdoublequote = “, ”
spelltool = internal
+20
View File
@@ -1077,6 +1077,16 @@ def testPreferences(qtbot, monkeypatch, yesToAll, nwMinimal, nwTemp, nwRef, tmpC
qtbot.mouseClick(tabGeneral.showFullPath, Qt.LeftButton)
assert not tabGeneral.showFullPath.isChecked()
qtbot.wait(keyDelay)
assert not tabGeneral.hideVScroll.isChecked()
qtbot.mouseClick(tabGeneral.hideVScroll, Qt.LeftButton)
assert tabGeneral.hideVScroll.isChecked()
qtbot.wait(keyDelay)
assert not tabGeneral.hideHScroll.isChecked()
qtbot.mouseClick(tabGeneral.hideHScroll, Qt.LeftButton)
assert tabGeneral.hideHScroll.isChecked()
# Check font button
monkeypatch.setattr(QFontDialog, "getFont", lambda font, obj: (font, True))
qtbot.mouseClick(tabGeneral.fontButton, Qt.LeftButton)
@@ -1135,6 +1145,16 @@ def testPreferences(qtbot, monkeypatch, yesToAll, nwMinimal, nwTemp, nwRef, tmpC
qtbot.mouseClick(tabLayout.textJustify, Qt.LeftButton)
assert not tabLayout.textJustify.isChecked()
qtbot.wait(keyDelay)
assert tabLayout.scrollPastEnd.isChecked()
qtbot.mouseClick(tabLayout.scrollPastEnd, Qt.LeftButton)
assert not tabLayout.scrollPastEnd.isChecked()
qtbot.wait(keyDelay)
assert not tabLayout.scollWithCursor.isChecked()
qtbot.mouseClick(tabLayout.scollWithCursor, Qt.LeftButton)
assert tabLayout.scollWithCursor.isChecked()
# Editor Settings
qtbot.wait(keyDelay)
tabEditing = nwPrefs.tabEditing