Fix tests and a bug in GuiMain

This commit is contained in:
Veronica K. B. Olsen
2021-02-15 16:48:12 +01:00
parent df19ced50c
commit 8087e8ad75
7 changed files with 13 additions and 12 deletions
+3 -4
View File
@@ -595,10 +595,9 @@ def testGuiMenu_Insert(qtbot, monkeypatch, nwGUI, fncDir, fncProj):
nwGUI.mainMenu.aFileDetails.activate(QAction.Trigger)
theBits = theMessage.split("<br>")
assert len(theBits) == 3
assert theBits[0] == "File details for the currently open file"
assert theBits[1] == "Handle: 0e17daca5f3e1"
assert theBits[2] == "Location: %s" % os.path.join(fncProj, "content", "0e17daca5f3e1.nwd")
assert len(theBits) == 2
assert theBits[0] == "The currently open file is saved in:"
assert theBits[1] == os.path.join(fncProj, "content", "0e17daca5f3e1.nwd")
# qtbot.stopForInteraction()
+3 -3
View File
@@ -248,9 +248,9 @@ def testGuiPreferences_Main(qtbot, monkeypatch, fncDir, outDir, refDir):
ignoreLines = [
2, # Timestamp
9, # Release Notes
12, 13, 14, 15, # Window sizes
16, 17, 18, 19, # Window sizes
7, 29, # Fonts (depends on system default)
13, 14, 15, 16, # Window sizes
17, 18, 19, 20, # Window sizes
7, 30, 31, # Fonts (depends on system default)
]
assert cmpFiles(testFile, compFile, ignoreLines)