Merge pull request #411 from vkbo/test_and_release_0.12.1
Release 0.12.1
This commit is contained in:
+5
-1
@@ -1,6 +1,10 @@
|
|||||||
# novelWriter ChangeLog
|
# novelWriter ChangeLog
|
||||||
|
|
||||||
## Version 1.0 Beta 1 [2020-08-23] - Not Yet Released
|
## Version 0.12.1 [2020-08-16]
|
||||||
|
|
||||||
|
**Bugfixes**
|
||||||
|
|
||||||
|
* Some of the insert menu functions were broken due to a left-over comma in the insert source code converting the insert text from a string to a tuple. This is a quirk of the Python language and unfortunately not caught as a syntax error. Issue #409, PR #410.
|
||||||
|
|
||||||
**Feature Improvements**
|
**Feature Improvements**
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -26,9 +26,9 @@ copyright = "2018-2020, Veronica Berglyd Olsen"
|
|||||||
author = "Veronica Berglyd Olsen"
|
author = "Veronica Berglyd Olsen"
|
||||||
|
|
||||||
# The short X.Y version
|
# The short X.Y version
|
||||||
version = "1.0"
|
version = "0.12.1"
|
||||||
# The full version, including alpha/beta/rc tags
|
# The full version, including alpha/beta/rc tags
|
||||||
release = "1.0-beta1"
|
release = "0.12.1"
|
||||||
|
|
||||||
|
|
||||||
# -- General configuration ---------------------------------------------------
|
# -- General configuration ---------------------------------------------------
|
||||||
|
|||||||
+3
-3
@@ -41,9 +41,9 @@ __package__ = "nw"
|
|||||||
__author__ = "Veronica Berglyd Olsen"
|
__author__ = "Veronica Berglyd Olsen"
|
||||||
__copyright__ = "Copyright 2018–2020, Veronica Berglyd Olsen"
|
__copyright__ = "Copyright 2018–2020, Veronica Berglyd Olsen"
|
||||||
__license__ = "GPLv3"
|
__license__ = "GPLv3"
|
||||||
__version__ = "1.0-beta1"
|
__version__ = "0.12.1"
|
||||||
__hexversion__ = "0x010000b1"
|
__hexversion__ = "0x001201f0"
|
||||||
__date__ = "2020-08-23"
|
__date__ = "2020-08-16"
|
||||||
__maintainer__ = "Veronica Berglyd Olsen"
|
__maintainer__ = "Veronica Berglyd Olsen"
|
||||||
__email__ = "code@vkbo.net"
|
__email__ = "code@vkbo.net"
|
||||||
__status__ = "Beta"
|
__status__ = "Beta"
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<novelWriterXML appVersion="0.12.0" hexVersion="0x001200f0" fileVersion="1.2" timeStamp="2020-08-15 15:17:06">
|
<novelWriterXML appVersion="0.12.1" hexVersion="0x001201f0" fileVersion="1.2" timeStamp="2020-08-16 11:37:18">
|
||||||
<project>
|
<project>
|
||||||
<name>Sample Project</name>
|
<name>Sample Project</name>
|
||||||
<title>Sample Project</title>
|
<title>Sample Project</title>
|
||||||
<author>Jane Smith</author>
|
<author>Jane Smith</author>
|
||||||
<author>Jay Doh</author>
|
<author>Jay Doh</author>
|
||||||
<saveCount>677</saveCount>
|
<saveCount>684</saveCount>
|
||||||
<autoCount>122</autoCount>
|
<autoCount>125</autoCount>
|
||||||
<editTime>32872</editTime>
|
<editTime>33351</editTime>
|
||||||
</project>
|
</project>
|
||||||
<settings>
|
<settings>
|
||||||
<doBackup>False</doBackup>
|
<doBackup>False</doBackup>
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
<charCount>1811</charCount>
|
<charCount>1811</charCount>
|
||||||
<wordCount>318</wordCount>
|
<wordCount>318</wordCount>
|
||||||
<paraCount>8</paraCount>
|
<paraCount>8</paraCount>
|
||||||
<cursorPos>42</cursorPos>
|
<cursorPos>1880</cursorPos>
|
||||||
</item>
|
</item>
|
||||||
<item handle="bc0cbd2a407f3" order="2" parent="e7ded148d6e4a">
|
<item handle="bc0cbd2a407f3" order="2" parent="e7ded148d6e4a">
|
||||||
<name>Another Scene</name>
|
<name>Another Scene</name>
|
||||||
|
|||||||
@@ -54,6 +54,18 @@ def nwTempSample(nwTemp):
|
|||||||
mkdir(sampleDir)
|
mkdir(sampleDir)
|
||||||
return sampleDir
|
return sampleDir
|
||||||
|
|
||||||
|
@pytest.fixture(scope="function")
|
||||||
|
def nwFuncTemp(nwTemp):
|
||||||
|
funcDir = path.join(nwTemp, "ftemp")
|
||||||
|
if path.isdir(funcDir):
|
||||||
|
shutil.rmtree(funcDir)
|
||||||
|
if not path.isdir(funcDir):
|
||||||
|
mkdir(funcDir)
|
||||||
|
yield funcDir
|
||||||
|
if path.isdir(funcDir):
|
||||||
|
shutil.rmtree(funcDir)
|
||||||
|
return
|
||||||
|
|
||||||
@pytest.fixture(scope="session")
|
@pytest.fixture(scope="session")
|
||||||
def nwRef():
|
def nwRef():
|
||||||
testDir = path.dirname(__file__)
|
testDir = path.dirname(__file__)
|
||||||
|
|||||||
+76
-1
@@ -9,12 +9,13 @@ from nwtools import cmpFiles
|
|||||||
|
|
||||||
from os import path
|
from os import path
|
||||||
from PyQt5.QtCore import Qt
|
from PyQt5.QtCore import Qt
|
||||||
|
from PyQt5.QtWidgets import QAction
|
||||||
|
|
||||||
from nw.gui import (
|
from nw.gui import (
|
||||||
GuiProjectSettings, GuiItemEditor, GuiAbout, GuiBuildNovel,
|
GuiProjectSettings, GuiItemEditor, GuiAbout, GuiBuildNovel,
|
||||||
GuiDocMerge, GuiDocSplit, GuiWritingStats, GuiProjectWizard
|
GuiDocMerge, GuiDocSplit, GuiWritingStats, GuiProjectWizard
|
||||||
)
|
)
|
||||||
from nw.constants import nwItemType, nwItemLayout, nwItemClass, nwDocAction
|
from nw.constants import nwItemType, nwItemLayout, nwItemClass, nwDocAction, nwUnicode
|
||||||
|
|
||||||
keyDelay = 2
|
keyDelay = 2
|
||||||
stepDelay = 20
|
stepDelay = 20
|
||||||
@@ -989,3 +990,77 @@ def testDocAction(qtbot, nwTempGUI, nwLipsum, nwRef, nwTemp):
|
|||||||
|
|
||||||
# qtbot.stopForInteraction()
|
# qtbot.stopForInteraction()
|
||||||
nwGUI.closeMain()
|
nwGUI.closeMain()
|
||||||
|
|
||||||
|
@pytest.mark.gui
|
||||||
|
def testInsertMenu(qtbot, nwTempGUI, nwFuncTemp, nwTemp):
|
||||||
|
nwGUI = nw.main(["--testmode", "--config=%s" % nwTempGUI, "--data=%s" % nwTemp])
|
||||||
|
qtbot.addWidget(nwGUI)
|
||||||
|
nwGUI.show()
|
||||||
|
qtbot.waitForWindowShown(nwGUI)
|
||||||
|
qtbot.wait(stepDelay)
|
||||||
|
|
||||||
|
nwGUI.theProject.projTree.setSeed(42)
|
||||||
|
assert nwGUI.newProject({"projPath": nwFuncTemp}, True)
|
||||||
|
|
||||||
|
assert nwGUI.treeView._getTreeItem("31489056e0916") is not None
|
||||||
|
|
||||||
|
nwGUI.setFocus(1)
|
||||||
|
nwGUI.treeView.clearSelection()
|
||||||
|
nwGUI.treeView._getTreeItem("31489056e0916").setSelected(True)
|
||||||
|
nwGUI.treeView.newTreeItem(nwItemType.FILE, None)
|
||||||
|
assert nwGUI.openSelectedItem()
|
||||||
|
|
||||||
|
# qtbot.stopForInteraction()
|
||||||
|
|
||||||
|
nwGUI.mainMenu.aInsENDash.activate(QAction.Trigger)
|
||||||
|
assert nwGUI.docEditor.getText() == nwUnicode.U_ENDASH
|
||||||
|
nwGUI.docEditor.clear()
|
||||||
|
|
||||||
|
nwGUI.mainMenu.aInsEMDash.activate(QAction.Trigger)
|
||||||
|
assert nwGUI.docEditor.getText() == nwUnicode.U_EMDASH
|
||||||
|
nwGUI.docEditor.clear()
|
||||||
|
|
||||||
|
nwGUI.mainMenu.aInsEllipsis.activate(QAction.Trigger)
|
||||||
|
assert nwGUI.docEditor.getText() == nwUnicode.U_HELLIP
|
||||||
|
nwGUI.docEditor.clear()
|
||||||
|
|
||||||
|
nwGUI.mainMenu.aInsQuoteLS.activate(QAction.Trigger)
|
||||||
|
assert nwGUI.docEditor.getText() == nwGUI.mainConf.fmtSingleQuotes[0]
|
||||||
|
nwGUI.docEditor.clear()
|
||||||
|
|
||||||
|
nwGUI.mainMenu.aInsQuoteRS.activate(QAction.Trigger)
|
||||||
|
assert nwGUI.docEditor.getText() == nwGUI.mainConf.fmtSingleQuotes[1]
|
||||||
|
nwGUI.docEditor.clear()
|
||||||
|
|
||||||
|
nwGUI.mainMenu.aInsQuoteLD.activate(QAction.Trigger)
|
||||||
|
assert nwGUI.docEditor.getText() == nwGUI.mainConf.fmtDoubleQuotes[0]
|
||||||
|
nwGUI.docEditor.clear()
|
||||||
|
|
||||||
|
nwGUI.mainMenu.aInsQuoteRD.activate(QAction.Trigger)
|
||||||
|
assert nwGUI.docEditor.getText() == nwGUI.mainConf.fmtDoubleQuotes[1]
|
||||||
|
nwGUI.docEditor.clear()
|
||||||
|
|
||||||
|
nwGUI.mainMenu.aInsHardBreak.activate(QAction.Trigger)
|
||||||
|
assert nwGUI.docEditor.getText() == " \n"
|
||||||
|
nwGUI.docEditor.clear()
|
||||||
|
|
||||||
|
nwGUI.mainMenu.aInsNBSpace.activate(QAction.Trigger)
|
||||||
|
if nwGUI.mainConf.verQtValue >= 50900:
|
||||||
|
assert nwGUI.docEditor.getText() == nwUnicode.U_NBSP
|
||||||
|
else:
|
||||||
|
assert nwGUI.docEditor.getText() == " "
|
||||||
|
nwGUI.docEditor.clear()
|
||||||
|
|
||||||
|
nwGUI.mainMenu.aInsThinSpace.activate(QAction.Trigger)
|
||||||
|
assert nwGUI.docEditor.getText() == nwUnicode.U_THNSP
|
||||||
|
nwGUI.docEditor.clear()
|
||||||
|
|
||||||
|
nwGUI.mainMenu.aInsThinNBSpace.activate(QAction.Trigger)
|
||||||
|
if nwGUI.mainConf.verQtValue >= 50900:
|
||||||
|
assert nwGUI.docEditor.getText() == nwUnicode.U_THNBSP
|
||||||
|
else:
|
||||||
|
assert nwGUI.docEditor.getText() == " "
|
||||||
|
nwGUI.docEditor.clear()
|
||||||
|
|
||||||
|
# qtbot.stopForInteraction()
|
||||||
|
nwGUI.closeMain()
|
||||||
|
|||||||
Reference in New Issue
Block a user