Hide unused controls on new project form

This commit is contained in:
Veronica Berglyd Olsen
2024-02-20 23:03:57 +01:00
parent eab8bb2351
commit 4bf82e4df7
2 changed files with 19 additions and 32 deletions
+3 -18
View File
@@ -196,12 +196,7 @@ def testToolWelcome_New(qtbot: QtBot, caplog, monkeypatch, nwGUI, fncPath):
newForm.fillSample.trigger()
assert newForm._fillMode == newForm.FILL_SAMPLE
assert newForm.projFill.text() == "Example Project"
assert newForm.addNotes.isEnabled() is False
assert newForm.addPlot.isEnabled() is False
assert newForm.addChar.isEnabled() is False
assert newForm.addWorld.isEnabled() is False
assert newForm.numChapters.isEnabled() is False
assert newForm.numScenes.isEnabled() is False
assert newForm.extraWidget.isVisible() is False
# Change fill info to template
with monkeypatch.context() as mp:
@@ -209,12 +204,7 @@ def testToolWelcome_New(qtbot: QtBot, caplog, monkeypatch, nwGUI, fncPath):
newForm.fillCopy.trigger()
assert newForm._fillMode == newForm.FILL_COPY
assert newForm.projFill.text() == f"Template: {fncPath}"
assert newForm.addNotes.isEnabled() is False
assert newForm.addPlot.isEnabled() is False
assert newForm.addChar.isEnabled() is False
assert newForm.addWorld.isEnabled() is False
assert newForm.numChapters.isEnabled() is False
assert newForm.numScenes.isEnabled() is False
assert newForm.extraWidget.isVisible() is False
# Change back to fill blank using the menu
newForm.browseFill.click()
@@ -223,12 +213,7 @@ def testToolWelcome_New(qtbot: QtBot, caplog, monkeypatch, nwGUI, fncPath):
newForm.fillMenu.close()
assert newForm._fillMode == newForm.FILL_BLANK
assert newForm.projFill.text() == "Fresh Project"
assert newForm.addNotes.isEnabled() is True
assert newForm.addPlot.isEnabled() is True
assert newForm.addChar.isEnabled() is True
assert newForm.addWorld.isEnabled() is True
assert newForm.numChapters.isEnabled() is True
assert newForm.numScenes.isEnabled() is True
assert newForm.extraWidget.isVisible() is True
# Creating a project without a name, pops an error
caplog.clear()