Update tests

This commit is contained in:
Veronica Berglyd Olsen
2024-02-29 22:48:17 +01:00
parent 6e57bc0fc0
commit acf8170f29
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ def testCoreDocBuild_OpenDocument(monkeypatch, mockGUI, prjLipsum, fncPath, tstP
build = BuildSettings()
build.unpack(BUILD_CONF)
docBuild = NWBuildDocument(project, build)
docBuild = NWBuildDocument(project, build, doCount=True)
docBuild.queueAll()
assert len(docBuild) == 21
+10
View File
@@ -192,6 +192,16 @@ def testManuscript_Features(monkeypatch, qtbot: QtBot, nwGUI: GuiMain, projPath:
assert manus.docPreview.toPlainText().strip() != ""
assert cacheFile.exists() is True
# Check Preview Stats
assert manus.docStats.mainStack.currentWidget() == manus.docStats.minWidget
assert manus.docStats.minWordCount.text() == "7"
assert manus.docStats.minCharCount.text() == "31"
manus.docStats.toggleButton.toggle()
assert manus.docStats.mainStack.currentWidget() == manus.docStats.maxWidget
assert manus.docStats.maxTotalWords.text() == "7"
assert manus.docStats.maxTotalChars.text() == "31"
# Toggle justify
assert manus.docPreview.document().defaultTextOption().alignment() == Qt.AlignAbsolute
manus.docPreview.setJustify(True)