Update tests
This commit is contained in:
@@ -121,8 +121,6 @@ def testToolBuildSettings_Filter(qtbot, nwGUI, projPath, mockRnd):
|
||||
|
||||
hPlotDoc = SHARED.project.newFile("Main Plot", C.hPlotRoot)
|
||||
hCharDoc = SHARED.project.newFile("Jane Doe", C.hCharRoot)
|
||||
nwGUI.projView.projTree.revealNewTreeItem(hPlotDoc)
|
||||
nwGUI.projView.projTree.revealNewTreeItem(hCharDoc)
|
||||
SHARED.project.tree[hPlotDoc].setActive(False) # type: ignore
|
||||
|
||||
# Create the dialog and populate it
|
||||
|
||||
@@ -38,12 +38,13 @@ def testToolNovelDetails_Main(qtbot, nwGUI, prjLipsum, ipsumText):
|
||||
# Add a second Novel folder
|
||||
project = SHARED.project
|
||||
secondText = "#! Second\n\n" + "\n\n".join(ipsumText)
|
||||
sHandle = project.newRoot(nwItemClass.NOVEL, "Second")
|
||||
sHandle = project.newRoot(nwItemClass.NOVEL)
|
||||
dHandle = project.newFile("Document", sHandle)
|
||||
if item := project.tree[sHandle]:
|
||||
item.setName("Second")
|
||||
|
||||
project.storage.getDocument(dHandle).writeDocument(secondText)
|
||||
project.index.reIndexHandle(dHandle)
|
||||
nwGUI.projView.projTree.revealNewTreeItem(sHandle)
|
||||
nwGUI.projView.projTree.revealNewTreeItem(dHandle)
|
||||
|
||||
# Create the dialog
|
||||
nwGUI.mainMenu.aNovelDetails.activate(QAction.ActionEvent.Trigger)
|
||||
|
||||
Reference in New Issue
Block a user