mirror of
https://github.com/DaanVandenBosch/phantasmal-world.git
synced 2025-04-05 07:18:29 +08:00
Fixed unit test.
This commit is contained in:
parent
5133235040
commit
bc660b23e9
@ -39,12 +39,12 @@ class QuestEditorToolbarController(
|
|||||||
) : Controller() {
|
) : Controller() {
|
||||||
private val _resultDialogVisible = mutableVal(false)
|
private val _resultDialogVisible = mutableVal(false)
|
||||||
private val _result = mutableVal<PwResult<*>?>(null)
|
private val _result = mutableVal<PwResult<*>?>(null)
|
||||||
private val _saveAsDialogVisible = mutableVal(false)
|
|
||||||
private val saving = mutableVal(false)
|
private val saving = mutableVal(false)
|
||||||
|
|
||||||
// We mainly disable saving while a save is underway for visual feedback that a save is
|
// We mainly disable saving while a save is underway for visual feedback that a save is
|
||||||
// happening/has happened.
|
// happening/has happened.
|
||||||
private val savingEnabled = questEditorStore.currentQuest.isNotNull() and !saving
|
private val savingEnabled = questEditorStore.currentQuest.isNotNull() and !saving
|
||||||
|
private val _saveAsDialogVisible = mutableVal(false)
|
||||||
private val files: MutableListVal<FileHandle> = mutableListVal()
|
private val files: MutableListVal<FileHandle> = mutableListVal()
|
||||||
private val _filename = mutableVal("")
|
private val _filename = mutableVal("")
|
||||||
private val _version = mutableVal(Version.BB)
|
private val _version = mutableVal(Version.BB)
|
||||||
@ -61,7 +61,7 @@ class QuestEditorToolbarController(
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
// Save as
|
// Saving
|
||||||
|
|
||||||
val saveEnabled: Val<Boolean> =
|
val saveEnabled: Val<Boolean> =
|
||||||
savingEnabled and files.notEmpty and BrowserFeatures.fileSystemApi
|
savingEnabled and files.notEmpty and BrowserFeatures.fileSystemApi
|
||||||
|
@ -36,7 +36,7 @@ class QuestEditorToolbarControllerTests : WebTestSuite {
|
|||||||
|
|
||||||
assertNull(ctrl.result.value)
|
assertNull(ctrl.result.value)
|
||||||
|
|
||||||
ctrl.openFiles(listOf(FileHandle(File(arrayOf(), "unknown.extension"))))
|
ctrl.openFiles(listOf(FileHandle.Simple(File(arrayOf(), "unknown.extension"))))
|
||||||
|
|
||||||
val result = ctrl.result.value
|
val result = ctrl.result.value
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user