diff --git a/tests/files/nwProject-1.5.nwx b/tests/files/nwProject-1.5.nwx
index ec8668f4..8bee81e4 100644
--- a/tests/files/nwProject-1.5.nwx
+++ b/tests/files/nwProject-1.5.nwx
@@ -4,7 +4,6 @@
Sample Project
Sample Project
Jane Smith
- Jay Doh
yes
diff --git a/tests/reference/coreTools_NewCustomA_nwProject.nwx b/tests/reference/coreTools_NewCustomA_nwProject.nwx
index 48330e5f..ffa4f38a 100644
--- a/tests/reference/coreTools_NewCustomA_nwProject.nwx
+++ b/tests/reference/coreTools_NewCustomA_nwProject.nwx
@@ -1,10 +1,9 @@
-
+
Test Custom
Test Novel
Jane Doe
- John Doh
yes
diff --git a/tests/reference/coreTools_NewCustomB_nwProject.nwx b/tests/reference/coreTools_NewCustomB_nwProject.nwx
index 161d1157..38084419 100644
--- a/tests/reference/coreTools_NewCustomB_nwProject.nwx
+++ b/tests/reference/coreTools_NewCustomB_nwProject.nwx
@@ -1,10 +1,9 @@
-
+
Test Custom
Test Novel
Jane Doe
- John Doh
yes
diff --git a/tests/reference/coreTools_NewMinimal_nwProject.nwx b/tests/reference/coreTools_NewMinimal_nwProject.nwx
index 1ac190ee..dc3f2d43 100644
--- a/tests/reference/coreTools_NewMinimal_nwProject.nwx
+++ b/tests/reference/coreTools_NewMinimal_nwProject.nwx
@@ -1,8 +1,9 @@
-
+
New Project
New Project
+
yes
diff --git a/tests/reference/guiBuild_Tool_Step4H_Lorem_Ipsum.json b/tests/reference/guiBuild_Tool_Step4H_Lorem_Ipsum.json
index 44666860..87915317 100644
--- a/tests/reference/guiBuild_Tool_Step4H_Lorem_Ipsum.json
+++ b/tests/reference/guiBuild_Tool_Step4H_Lorem_Ipsum.json
@@ -1,11 +1,9 @@
{
"meta": {
- "workingTitle": "Lorem Ipsum",
+ "projectName": "Lorem Ipsum",
"novelTitle": "Lorem Ipsum",
- "authors": [
- "lipsum.com"
- ],
- "buildTime": 1627336583
+ "novelAuthor": "lipsum.com",
+ "buildTime": 1669563813
},
"text": {
"css": [
diff --git a/tests/reference/guiBuild_Tool_Step4M_Lorem_Ipsum.json b/tests/reference/guiBuild_Tool_Step4M_Lorem_Ipsum.json
index cdfa694e..75a54741 100644
--- a/tests/reference/guiBuild_Tool_Step4M_Lorem_Ipsum.json
+++ b/tests/reference/guiBuild_Tool_Step4M_Lorem_Ipsum.json
@@ -1,11 +1,9 @@
{
"meta": {
- "workingTitle": "Lorem Ipsum",
+ "projectName": "Lorem Ipsum",
"novelTitle": "Lorem Ipsum",
- "authors": [
- "lipsum.com"
- ],
- "buildTime": 1627867578
+ "novelAuthor": "lipsum.com",
+ "buildTime": 1669563891
},
"text": {
"nwd": [
diff --git a/tests/reference/projectXML_ReadLegacy10.nwx b/tests/reference/projectXML_ReadLegacy10.nwx
index d4ef1259..5b189c1e 100644
--- a/tests/reference/projectXML_ReadLegacy10.nwx
+++ b/tests/reference/projectXML_ReadLegacy10.nwx
@@ -3,7 +3,6 @@
Sample Project
Sample Project
- Jane Smith
Jay Doh
diff --git a/tests/reference/projectXML_ReadLegacy11.nwx b/tests/reference/projectXML_ReadLegacy11.nwx
index c2bb4cf4..afc87cef 100644
--- a/tests/reference/projectXML_ReadLegacy11.nwx
+++ b/tests/reference/projectXML_ReadLegacy11.nwx
@@ -3,7 +3,6 @@
Sample Project
Sample Project
- Jane Smith
Jay Doh
diff --git a/tests/reference/projectXML_ReadLegacy12.nwx b/tests/reference/projectXML_ReadLegacy12.nwx
index 90408b3f..e31f035a 100644
--- a/tests/reference/projectXML_ReadLegacy12.nwx
+++ b/tests/reference/projectXML_ReadLegacy12.nwx
@@ -3,7 +3,6 @@
Sample Project
Sample Project
- Jane Smith
Jay Doh
diff --git a/tests/reference/projectXML_ReadLegacy13.nwx b/tests/reference/projectXML_ReadLegacy13.nwx
index 226affe4..d629079d 100644
--- a/tests/reference/projectXML_ReadLegacy13.nwx
+++ b/tests/reference/projectXML_ReadLegacy13.nwx
@@ -3,7 +3,6 @@
Sample Project
Sample Project
- Jane Smith
Jay Doh
diff --git a/tests/reference/projectXML_ReadLegacy14.nwx b/tests/reference/projectXML_ReadLegacy14.nwx
index 8cd18728..6bc7154c 100644
--- a/tests/reference/projectXML_ReadLegacy14.nwx
+++ b/tests/reference/projectXML_ReadLegacy14.nwx
@@ -3,7 +3,6 @@
Sample Project
Sample Project
- Jane Smith
Jay Doh
diff --git a/tests/test_core/test_core_coretools.py b/tests/test_core/test_core_coretools.py
index 0f9a54f0..a737406e 100644
--- a/tests/test_core/test_core_coretools.py
+++ b/tests/test_core/test_core_coretools.py
@@ -308,7 +308,7 @@ def testCoreTools_NewCustomA(monkeypatch, fncPath, tstPaths, mockGUI, mockRnd):
projData = {
"projName": "Test Custom",
"projTitle": "Test Novel",
- "projAuthors": "Jane Doe\nJohn Doh\n",
+ "projAuthor": "Jane Doe",
"projPath": fncPath,
"popSample": False,
"popMinimal": False,
@@ -346,7 +346,7 @@ def testCoreTools_NewCustomB(monkeypatch, fncPath, tstPaths, mockGUI, mockRnd):
projData = {
"projName": "Test Custom",
"projTitle": "Test Novel",
- "projAuthors": "Jane Doe\nJohn Doh\n",
+ "projAuthor": "Jane Doe",
"projPath": fncPath,
"popSample": False,
"popMinimal": False,
@@ -378,7 +378,7 @@ def testCoreTools_NewSample(monkeypatch, fncPath, tmpConf, tmpPath, mockGUI):
projData = {
"projName": "Test Sample",
"projTitle": "Test Novel",
- "projAuthors": "Jane Doe\nJohn Doh\n",
+ "projAuthor": "Jane Doe",
"projPath": fncPath,
"popSample": True,
"popMinimal": False,
diff --git a/tests/test_core/test_core_project.py b/tests/test_core/test_core_project.py
index 52b68859..4897c85e 100644
--- a/tests/test_core/test_core_project.py
+++ b/tests/test_core/test_core_project.py
@@ -480,25 +480,9 @@ def testCoreProject_Methods(monkeypatch, mockGUI, fncPath, mockRnd):
theProject.data.setTitle(" A Title ")
assert theProject.data.title == "A Title"
- # Project Authors
- # Check that the list is cleaned up and that it can be extracted as
- # a properly formatted string, depending on number of names
- theProject.data.setAuthors([])
- assert theProject.data.authors == []
- theProject.data.setAuthors(" Jane Doe \n John Doh \n ")
- assert theProject.data.authors == ["Jane Doe", "John Doh"]
-
- theProject.data.setAuthors("")
- assert theProject.getFormattedAuthors() == ""
-
- theProject.data.setAuthors("Jane Doe")
- assert theProject.getFormattedAuthors() == "Jane Doe"
-
- theProject.data.setAuthors("Jane Doe\nJohn Doh")
- assert theProject.getFormattedAuthors() == "Jane Doe and John Doh"
-
- theProject.data.setAuthors("Jane Doe\nJohn Doh\nBod Owens")
- assert theProject.getFormattedAuthors() == "Jane Doe, John Doh and Bod Owens"
+ # Project Author
+ theProject.data.setAuthor(" Jane\tDoe ")
+ assert theProject.data.author == "Jane Doe"
# Edit Time
theProject.data.setEditTime(1234)
diff --git a/tests/test_core/test_core_projectxml.py b/tests/test_core/test_core_projectxml.py
index 65fd23b9..f8b06cf8 100644
--- a/tests/test_core/test_core_projectxml.py
+++ b/tests/test_core/test_core_projectxml.py
@@ -143,7 +143,7 @@ def testCoreProjectXML_ReadCurrent(monkeypatch, tstPaths, fncPath):
# Check loaded data
assert data.name == "Sample Project"
assert data.title == "Sample Project"
- assert data.authors == ["Jane Smith", "Jay Doh"]
+ assert data.author == "Jane Smith"
assert data.saveCount == 5
assert data.autoCount == 10
assert data.editTime == 1000
@@ -269,7 +269,7 @@ def testCoreProjectXML_ReadLegacy10(tstPaths, fncPath, mockRnd):
# Check loaded data
assert data.name == "Sample Project"
assert data.title == "Sample Project"
- assert data.authors == ["Jane Smith", "Jay Doh"]
+ assert data.author == "Jay Doh" # Only last author is preserved
assert data.saveCount == 0 # Doesn't exist in 1.0
assert data.autoCount == 0 # Doesn't exist in 1.0
assert data.editTime == 0 # Doesn't exist in 1.0
@@ -411,7 +411,7 @@ def testCoreProjectXML_ReadLegacy11(tstPaths, fncPath, mockRnd):
# Check loaded data
assert data.name == "Sample Project"
assert data.title == "Sample Project"
- assert data.authors == ["Jane Smith", "Jay Doh"]
+ assert data.author == "Jay Doh" # Only last author is preserved
assert data.saveCount == 5
assert data.autoCount == 10
assert data.editTime == 1000
@@ -553,7 +553,7 @@ def testCoreProjectXML_ReadLegacy12(tstPaths, fncPath, mockRnd):
# Check loaded data
assert data.name == "Sample Project"
assert data.title == "Sample Project"
- assert data.authors == ["Jane Smith", "Jay Doh"]
+ assert data.author == "Jay Doh" # Only last author is preserved
assert data.saveCount == 5
assert data.autoCount == 10
assert data.editTime == 1000
@@ -698,7 +698,7 @@ def testCoreProjectXML_ReadLegacy13(tstPaths, fncPath, mockRnd):
# Check loaded data
assert data.name == "Sample Project"
assert data.title == "Sample Project"
- assert data.authors == ["Jane Smith", "Jay Doh"]
+ assert data.author == "Jay Doh" # Only last author is preserved
assert data.saveCount == 5
assert data.autoCount == 10
assert data.editTime == 1000
@@ -843,7 +843,7 @@ def testCoreProjectXML_ReadLegacy14(tstPaths, fncPath, mockRnd):
# Check loaded data
assert data.name == "Sample Project"
assert data.title == "Sample Project"
- assert data.authors == ["Jane Smith", "Jay Doh"]
+ assert data.author == "Jay Doh" # Only last author is preserved
assert data.saveCount == 5
assert data.autoCount == 10
assert data.editTime == 1000
diff --git a/tests/test_dialogs/test_dlg_projsettings.py b/tests/test_dialogs/test_dlg_projsettings.py
index 2f51da30..e90fe6ef 100644
--- a/tests/test_dialogs/test_dlg_projsettings.py
+++ b/tests/test_dialogs/test_dlg_projsettings.py
@@ -96,7 +96,7 @@ def testDlgProjSettings_Main(qtbot, monkeypatch, nwGUI, fncPath, projPath, mockR
# Set some values
theProject = nwGUI.theProject
theProject.data.setSpellLang("en")
- theProject.data.setAuthors("Jane Smith\nJohn Smith")
+ theProject.data.setAuthor("Jane Smith")
theProject.data.setAutoReplace({"A": "B", "C": "D"})
# Create Dialog
@@ -111,7 +111,7 @@ def testDlgProjSettings_Main(qtbot, monkeypatch, nwGUI, fncPath, projPath, mockR
assert tabMain.editName.text() == "New Project"
assert tabMain.editTitle.text() == "New Novel"
- assert tabMain.editAuthors.toPlainText() == "Jane Smith\nJohn Smith"
+ assert tabMain.editAuthor.text() == "Jane Smith"
assert tabMain.spellLang.currentData() == "en"
assert tabMain.doBackup.isChecked() is False
@@ -122,23 +122,19 @@ def testDlgProjSettings_Main(qtbot, monkeypatch, nwGUI, fncPath, projPath, mockR
for c in "Project Title":
qtbot.keyClick(tabMain.editTitle, c, delay=KEY_DELAY)
- tabMain.editAuthors.clear()
+ tabMain.editAuthor.clear()
for c in "Jane Doe":
- qtbot.keyClick(tabMain.editAuthors, c, delay=KEY_DELAY)
- qtbot.keyClick(tabMain.editAuthors, Qt.Key_Return, delay=KEY_DELAY)
- for c in "John Doh":
- qtbot.keyClick(tabMain.editAuthors, c, delay=KEY_DELAY)
- qtbot.keyClick(tabMain.editAuthors, Qt.Key_Return, delay=KEY_DELAY)
+ qtbot.keyClick(tabMain.editAuthor, c, delay=KEY_DELAY)
assert tabMain.editName.text() == "Project Name"
assert tabMain.editTitle.text() == "Project Title"
- assert tabMain.editAuthors.toPlainText() == "Jane Doe\nJohn Doh\n"
+ assert tabMain.editAuthor.text() == "Jane Doe"
assert projSettings.spellChanged is False
projSettings._doSave()
assert theProject.data.name == "Project Name"
assert theProject.data.title == "Project Title"
- assert theProject.data.authors == ["Jane Doe", "John Doh"]
+ assert theProject.data.author == "Jane Doe"
# Clean up
projSettings._doClose()
diff --git a/tests/test_gui/test_gui_guimain.py b/tests/test_gui/test_gui_guimain.py
index da1902da..80745c6e 100644
--- a/tests/test_gui/test_gui_guimain.py
+++ b/tests/test_gui/test_gui_guimain.py
@@ -205,7 +205,7 @@ def testGuiMain_Editing(qtbot, monkeypatch, nwGUI, projPath, tstPaths, mockRnd):
assert nwGUI.theProject.tree.trashRoot() is None
assert nwGUI.theProject.data.name == ""
assert nwGUI.theProject.data.title == ""
- assert nwGUI.theProject.data.authors == []
+ assert nwGUI.theProject.data.author == ""
assert nwGUI.theProject.data.spellCheck is False
# Check the files
@@ -225,7 +225,7 @@ def testGuiMain_Editing(qtbot, monkeypatch, nwGUI, projPath, tstPaths, mockRnd):
assert nwGUI.theProject.tree.trashRoot() is None
assert nwGUI.theProject.data.name == "New Project"
assert nwGUI.theProject.data.title == "New Novel"
- assert nwGUI.theProject.data.authors == ["Jane Doe"]
+ assert nwGUI.theProject.data.author == "Jane Doe"
assert nwGUI.theProject.data.spellCheck is False
# Check that tree items have been created
diff --git a/tests/test_tools/test_tools_build.py b/tests/test_tools/test_tools_build.py
index 33bd8ecc..d07ce1b0 100644
--- a/tests/test_tools/test_tools_build.py
+++ b/tests/test_tools/test_tools_build.py
@@ -216,14 +216,14 @@ def testToolBuild_Main(qtbot, monkeypatch, nwGUI, prjLipsum, tstPaths):
testFile = tstPaths.outDir / "guiBuild_Tool_Step4H_Lorem_Ipsum.json"
compFile = tstPaths.refDir / "guiBuild_Tool_Step4H_Lorem_Ipsum.json"
copyfile(projFile, testFile)
- assert cmpFiles(testFile, compFile, [8])
+ assert cmpFiles(testFile, compFile, [6])
assert nwBuild._saveDocument(nwBuild.FMT_JSON_M)
projFile = prjLipsum / "Lorem Ipsum.json"
testFile = tstPaths.outDir / "guiBuild_Tool_Step4M_Lorem_Ipsum.json"
compFile = tstPaths.refDir / "guiBuild_Tool_Step4M_Lorem_Ipsum.json"
copyfile(projFile, testFile)
- assert cmpFiles(testFile, compFile, [8])
+ assert cmpFiles(testFile, compFile, [6])
# Since odt and fodt is built by the same code, we don't check the
# output. but just that the different format can be written as well
diff --git a/tests/test_tools/test_tools_projwizard.py b/tests/test_tools/test_tools_projwizard.py
index 336e4b1b..77db942f 100644
--- a/tests/test_tools/test_tools_projwizard.py
+++ b/tests/test_tools/test_tools_projwizard.py
@@ -113,7 +113,7 @@ def testToolProjectWizard_Run(qtbot, monkeypatch, nwGUI, fncPath, prjType):
introPage.projName.setText("Test Wizard")
introPage.projTitle.setText("My Novel")
- introPage.projAuthors.setPlainText("Jane Doe")
+ introPage.projAuthor.setText("Jane Doe")
# Setting projName should activate the button
assert nwWiz.button(QWizard.NextButton).isEnabled()
@@ -214,7 +214,7 @@ def testToolProjectWizard_Run(qtbot, monkeypatch, nwGUI, fncPath, prjType):
projData = nwGUI._assembleProjectWizardData(nwWiz)
assert projData["projName"] == "Test Wizard"
assert projData["projTitle"] == "My Novel"
- assert projData["projAuthors"] == "Jane Doe"
+ assert projData["projAuthor"] == "Jane Doe"
assert projData["projPath"] == str(projPath)
assert projData["popMinimal"] == prjType.startswith("minimal")
assert projData["popCustom"] == prjType.startswith("custom")