From 8de0c55b6849a369b1dc1914430bd026aa0f23ab Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Fri, 29 Jan 2021 01:14:58 +0100 Subject: [PATCH] Fix broken tests --- nw/core/tree.py | 8 +-- .../coreIndex_LoadSave_tagsIndex.json | 62 +++++++++++++++++++ .../guiEditor_Main_Final_0e17daca5f3e1.nwd | 2 +- .../guiEditor_Main_Final_nwProject.nwx | 8 +-- 4 files changed, 71 insertions(+), 9 deletions(-) diff --git a/nw/core/tree.py b/nw/core/tree.py index 786ba89f..85791f42 100644 --- a/nw/core/tree.py +++ b/nw/core/tree.py @@ -42,21 +42,21 @@ logger = logging.getLogger(__name__) # Translation map for item layouts NOVEL_MAP = { nwItemLayout.SCENE: { - "H1": nwItemLayout.PARTITION, + "H1": nwItemLayout.BOOK, "H2": nwItemLayout.CHAPTER, "H4": nwItemLayout.SCENE, }, nwItemLayout.CHAPTER: { - "H1": nwItemLayout.PARTITION, + "H1": nwItemLayout.BOOK, "H3": nwItemLayout.SCENE, "H4": nwItemLayout.SCENE, }, nwItemLayout.UNNUMBERED: { - "H1": nwItemLayout.PARTITION, + "H1": nwItemLayout.BOOK, "H3": nwItemLayout.SCENE, "H4": nwItemLayout.SCENE, }, - nwItemLayout.PARTITION: { + nwItemLayout.BOOK: { "H2": nwItemLayout.CHAPTER, "H3": nwItemLayout.SCENE, "H4": nwItemLayout.SCENE, diff --git a/tests/reference/coreIndex_LoadSave_tagsIndex.json b/tests/reference/coreIndex_LoadSave_tagsIndex.json index 2aa3df3c..993b4e26 100644 --- a/tests/reference/coreIndex_LoadSave_tagsIndex.json +++ b/tests/reference/coreIndex_LoadSave_tagsIndex.json @@ -567,5 +567,67 @@ 259, 3 ] + }, + "firstTitle": { + "7a992350f3eb6": [ + "H1", + "T000001" + ], + "8c58a65414c23": [ + "H0", + "T000000" + ], + "88d59a277361b": [ + "H2", + "T000001" + ], + "db7e733775d4d": [ + "H1", + "T000001" + ], + "fb609cd8319dc": [ + "H2", + "T000001" + ], + "88243afbe5ed8": [ + "H3", + "T000001" + ], + "f96ec11c6a3da": [ + "H3", + "T000001" + ], + "846352075de7d": [ + "H2", + "T000001" + ], + "441420a886d82": [ + "H2", + "T000001" + ], + "eb103bc70c90c": [ + "H3", + "T000001" + ], + "f8c0562e50f1b": [ + "H3", + "T000001" + ], + "47666c91c7ccf": [ + "H3", + "T000001" + ], + "4c4f28287af27": [ + "H1", + "T000001" + ], + "2426c6f0ca922": [ + "H1", + "T000001" + ], + "04468803b92e1": [ + "H1", + "T000001" + ] } } \ No newline at end of file diff --git a/tests/reference/guiEditor_Main_Final_0e17daca5f3e1.nwd b/tests/reference/guiEditor_Main_Final_0e17daca5f3e1.nwd index 54fef623..c77c3cd6 100644 --- a/tests/reference/guiEditor_Main_Final_0e17daca5f3e1.nwd +++ b/tests/reference/guiEditor_Main_Final_0e17daca5f3e1.nwd @@ -1,6 +1,6 @@ %%~name: New Scene %%~path: 31489056e0916/0e17daca5f3e1 -%%~kind: NOVEL/SCENE +%%~kind: NOVEL/BOOK # Novel ## Chapter diff --git a/tests/reference/guiEditor_Main_Final_nwProject.nwx b/tests/reference/guiEditor_Main_Final_nwProject.nwx index 21011e03..764c4610 100644 --- a/tests/reference/guiEditor_Main_Final_nwProject.nwx +++ b/tests/reference/guiEditor_Main_Final_nwProject.nwx @@ -1,11 +1,11 @@ - + New Project 4 - 1 - 11 + 2 + 8 True @@ -83,7 +83,7 @@ NOVEL New True - SCENE + BOOK 466 83 4