Make the new item function better at guessing header level of new files
This commit is contained in:
@@ -232,6 +232,9 @@ def testCoreIndex_CheckThese(mockGUI, fncDir, mockRnd):
|
||||
|
||||
assert theIndex.getHandleHeaderLevel(cHandle) == "H1"
|
||||
assert theIndex.getHandleHeaderLevel(nHandle) == "H1"
|
||||
assert theIndex.getHandleHeaderIntLevel(cHandle) == 1
|
||||
assert theIndex.getHandleHeaderIntLevel(nHandle) == 1
|
||||
assert theIndex.getHandleHeaderIntLevel("stuff") == 0
|
||||
|
||||
# Zero Items
|
||||
assert theIndex.checkThese([], cItem) == []
|
||||
|
||||
@@ -96,7 +96,7 @@ def testGuiProjTree_NewItems(qtbot, caplog, monkeypatch, nwGUI, fncDir, mockRnd)
|
||||
assert nwGUI.theProject.tree["0000000000013"].itemRoot == "0000000000008"
|
||||
assert nwGUI.theProject.tree["0000000000013"].itemClass == nwItemClass.NOVEL
|
||||
assert nwGUI.openDocument("0000000000013")
|
||||
assert nwGUI.docEditor.getText() == "### New Document\n\n"
|
||||
assert nwGUI.docEditor.getText() == "## New Document\n\n"
|
||||
|
||||
# Add a new file to the characters folder
|
||||
nwTree.setSelectedHandle("000000000000a")
|
||||
|
||||
Reference in New Issue
Block a user