@sprucelabs/spruce-cli 17.1.40 → 17.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/build/__tests__/behavioral/AddingADependency.test.js +10 -12
- package/build/__tests__/behavioral/AddingADependency.test.js.map +1 -1
- package/build/__tests__/behavioral/BlockingCommands.test.js +3 -5
- package/build/__tests__/behavioral/BlockingCommands.test.js.map +1 -1
- package/build/__tests__/behavioral/BootingTheCli.test.js +3 -3
- package/build/__tests__/behavioral/BootingTheCli.test.js.map +1 -1
- package/build/__tests__/behavioral/BootingWithBadFiles.test.js +7 -7
- package/build/__tests__/behavioral/BootingWithBadFiles.test.js.map +1 -1
- package/build/__tests__/behavioral/CreatingAConversationTopic.test.js +13 -13
- package/build/__tests__/behavioral/CreatingAConversationTopic.test.js.map +1 -1
- package/build/__tests__/behavioral/CreatingSchemasWithGenerics.test.js +10 -10
- package/build/__tests__/behavioral/CreatingSchemasWithGenerics.test.js.map +1 -1
- package/build/__tests__/behavioral/DeployingASkill.test.js +32 -34
- package/build/__tests__/behavioral/DeployingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/DeployingToSandbox.test.js +15 -17
- package/build/__tests__/behavioral/DeployingToSandbox.test.js.map +1 -1
- package/build/__tests__/behavioral/EnablingAndDisablingCache.test.js +11 -13
- package/build/__tests__/behavioral/EnablingAndDisablingCache.test.js.map +1 -1
- package/build/__tests__/behavioral/GettingCliVersion.test.js +4 -4
- package/build/__tests__/behavioral/GettingCliVersion.test.js.map +1 -1
- package/build/__tests__/behavioral/InstallingASkillAtAnOrg.test.js +11 -13
- package/build/__tests__/behavioral/InstallingASkillAtAnOrg.test.js.map +1 -1
- package/build/__tests__/behavioral/ListeningToCoreEvents.test.js +4 -4
- package/build/__tests__/behavioral/ListeningToCoreEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/LoggingInAsASkill.test.js +14 -16
- package/build/__tests__/behavioral/LoggingInAsASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/ManagingDependencies.test.js +9 -9
- package/build/__tests__/behavioral/ManagingDependencies.test.js.map +1 -1
- package/build/__tests__/behavioral/OverridingCommandsInPackageJson.test.js +3 -3
- package/build/__tests__/behavioral/OverridingCommandsInPackageJson.test.js.map +1 -1
- package/build/__tests__/behavioral/RebuildingASkill.test.js +4 -6
- package/build/__tests__/behavioral/RebuildingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/RegisteringConversationsOnBoot.test.js +4 -4
- package/build/__tests__/behavioral/RegisteringConversationsOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/RegisteringEventsOnBoot.test.js +7 -7
- package/build/__tests__/behavioral/RegisteringEventsOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/RegisteringGlobalEvents.test.js +11 -11
- package/build/__tests__/behavioral/RegisteringGlobalEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/RegisteringSkillViewOnBoot.test.js +6 -6
- package/build/__tests__/behavioral/RegisteringSkillViewOnBoot.test.js.map +1 -1
- package/build/__tests__/behavioral/RememberingUpgradeSelections.test.js +5 -5
- package/build/__tests__/behavioral/RememberingUpgradeSelections.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingLogTransportsInASkill.test.js +10 -12
- package/build/__tests__/behavioral/SettingLogTransportsInASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingRemote.test.js +9 -9
- package/build/__tests__/behavioral/SettingRemote.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingUpASkillForTesting.test.js +10 -10
- package/build/__tests__/behavioral/SettingUpASkillForTesting.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingUpSchemasForModuleDistribution.test.js +29 -31
- package/build/__tests__/behavioral/SettingUpSchemasForModuleDistribution.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingUpVscode.test.js +10 -10
- package/build/__tests__/behavioral/SettingUpVscode.test.js.map +1 -1
- package/build/__tests__/behavioral/SyncingEventsOnlyFromDependencies.test.js +13 -13
- package/build/__tests__/behavioral/SyncingEventsOnlyFromDependencies.test.js.map +1 -1
- package/build/__tests__/behavioral/TestReporterSettingsRemembered.test.js +6 -6
- package/build/__tests__/behavioral/TestReporterSettingsRemembered.test.js.map +1 -1
- package/build/__tests__/behavioral/TestingAConversation.test.js +17 -17
- package/build/__tests__/behavioral/TestingAConversation.test.js.map +1 -1
- package/build/__tests__/behavioral/TestingDataStores.test.js +13 -13
- package/build/__tests__/behavioral/TestingDataStores.test.js.map +1 -1
- package/build/__tests__/behavioral/WatchingSkillViews.test.js +15 -15
- package/build/__tests__/behavioral/WatchingSkillViews.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/CreatingANewErrorBuilder.test.js +15 -15
- package/build/__tests__/behavioral/errors/CreatingANewErrorBuilder.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/KeepingErrorClassInSync.test.js +8 -8
- package/build/__tests__/behavioral/errors/KeepingErrorClassInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/KeepingErrorsInSync.test.js +32 -32
- package/build/__tests__/behavioral/errors/KeepingErrorsInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/errors/SettingUpErrors.test.js +4 -6
- package/build/__tests__/behavioral/errors/SettingUpErrors.test.js.map +1 -1
- package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.js +25 -25
- package/build/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.js.map +1 -1
- package/build/__tests__/behavioral/events/CreatingAListener.test.js +29 -31
- package/build/__tests__/behavioral/events/CreatingAListener.test.js.map +1 -1
- package/build/__tests__/behavioral/events/CreatingAnEvent.test.js +26 -28
- package/build/__tests__/behavioral/events/CreatingAnEvent.test.js.map +1 -1
- package/build/__tests__/behavioral/events/KeepingEventsInSync.test.js +22 -22
- package/build/__tests__/behavioral/events/KeepingEventsInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/events/KeepingEventsInSync2.test.js +38 -38
- package/build/__tests__/behavioral/events/KeepingEventsInSync2.test.js.map +1 -1
- package/build/__tests__/behavioral/events/KeepingListenersInSync.test.js +7 -7
- package/build/__tests__/behavioral/events/KeepingListenersInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/events/ListeningToAnEventYouCreate.test.js +6 -6
- package/build/__tests__/behavioral/events/ListeningToAnEventYouCreate.test.js.map +1 -1
- package/build/__tests__/behavioral/events/SettingUpEvents.test.js +4 -4
- package/build/__tests__/behavioral/events/SettingUpEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/events/SkillEmitsBootEvents.test.js +3 -5
- package/build/__tests__/behavioral/events/SkillEmitsBootEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/node/CreatingANodeModule.test.js +6 -6
- package/build/__tests__/behavioral/node/CreatingANodeModule.test.js.map +1 -1
- package/build/__tests__/behavioral/onboard/StartingOnboarding.test.js +6 -6
- package/build/__tests__/behavioral/onboard/StartingOnboarding.test.js.map +1 -1
- package/build/__tests__/behavioral/organization/CreatingAnOrg.test.js +6 -6
- package/build/__tests__/behavioral/organization/CreatingAnOrg.test.js.map +1 -1
- package/build/__tests__/behavioral/permissions/CreatingPermissions.test.js +3 -3
- package/build/__tests__/behavioral/permissions/CreatingPermissions.test.js.map +1 -1
- package/build/__tests__/behavioral/person/LoggingInAsPerson.test.js +14 -16
- package/build/__tests__/behavioral/person/LoggingInAsPerson.test.js.map +1 -1
- package/build/__tests__/behavioral/person/SeeWhoIsLoggedIn.test.js +7 -7
- package/build/__tests__/behavioral/person/SeeWhoIsLoggedIn.test.js.map +1 -1
- package/build/__tests__/behavioral/polish/SettingUpPolish.test.js +8 -8
- package/build/__tests__/behavioral/polish/SettingUpPolish.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/CreatingANewSchemaBuilder.test.js +23 -25
- package/build/__tests__/behavioral/schemas/CreatingANewSchemaBuilder.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.js +7 -7
- package/build/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.js +6 -6
- package/build/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/HandlesRelatedSchemas.test.js +18 -18
- package/build/__tests__/behavioral/schemas/HandlesRelatedSchemas.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/ImportingSchemaImports.test.js +7 -7
- package/build/__tests__/behavioral/schemas/ImportingSchemaImports.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/KeepingSchemasInSync.test.js +62 -64
- package/build/__tests__/behavioral/schemas/KeepingSchemasInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/SettingUpSchemas.test.js +6 -8
- package/build/__tests__/behavioral/schemas/SettingUpSchemas.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/SyncingBadSchemasProvidesHelpfulErrorMessages.test.js +4 -6
- package/build/__tests__/behavioral/schemas/SyncingBadSchemasProvidesHelpfulErrorMessages.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/UsingSchemasInCli.test.d.ts +1 -1
- package/build/__tests__/behavioral/schemas/UsingSchemasInCli.test.js +4 -4
- package/build/__tests__/behavioral/schemas/UsingSchemasInCli.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/BootingASkill.test.js +12 -12
- package/build/__tests__/behavioral/skill/BootingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/CreatingASkill.test.js +5 -5
- package/build/__tests__/behavioral/skill/CreatingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/RegisteringASkill.test.js +12 -14
- package/build/__tests__/behavioral/skill/RegisteringASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/SettingUpASkill.test.js +29 -29
- package/build/__tests__/behavioral/skill/SettingUpASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/stores/CreatingADataStore.test.js +26 -28
- package/build/__tests__/behavioral/stores/CreatingADataStore.test.js.map +1 -1
- package/build/__tests__/behavioral/stores/KeepingDataStoresInSync.test.js +8 -10
- package/build/__tests__/behavioral/stores/KeepingDataStoresInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/CreatingATest.test.js +10 -10
- package/build/__tests__/behavioral/tests/CreatingATest.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/RunningTests.test.js +8 -10
- package/build/__tests__/behavioral/tests/RunningTests.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js +17 -17
- package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/SettingUpTests.test.js +3 -5
- package/build/__tests__/behavioral/tests/SettingUpTests.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies.test.js +8 -8
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies2.test.js +7 -7
- package/build/__tests__/behavioral/upgrading/UpdatingDependencies2.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingANodeModule.test.js +6 -6
- package/build/__tests__/behavioral/upgrading/UpgradingANodeModule.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill.test.js +15 -15
- package/build/__tests__/behavioral/upgrading/UpgradingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill2.test.js +24 -24
- package/build/__tests__/behavioral/upgrading/UpgradingASkill2.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill3.test.js +22 -22
- package/build/__tests__/behavioral/upgrading/UpgradingASkill3.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill4.test.js +10 -10
- package/build/__tests__/behavioral/upgrading/UpgradingASkill4.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingASkill5.test.js +9 -9
- package/build/__tests__/behavioral/upgrading/UpgradingASkill5.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingWithListeners.test.js +4 -4
- package/build/__tests__/behavioral/upgrading/UpgradingWithListeners.test.js.map +1 -1
- package/build/__tests__/behavioral/upgrading/UpgradingWithSandboxFeatureInstalled.test.js +9 -9
- package/build/__tests__/behavioral/upgrading/UpgradingWithSandboxFeatureInstalled.test.js.map +1 -1
- package/build/__tests__/behavioral/views/CreatingASkillView.test.js +28 -30
- package/build/__tests__/behavioral/views/CreatingASkillView.test.js.map +1 -1
- package/build/__tests__/behavioral/views/CreatingATheme.test.js +9 -11
- package/build/__tests__/behavioral/views/CreatingATheme.test.js.map +1 -1
- package/build/__tests__/behavioral/views/KeepingViewsInSync.test.js +8 -8
- package/build/__tests__/behavioral/views/KeepingViewsInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/views/SettingUpViews.test.js +5 -5
- package/build/__tests__/behavioral/views/SettingUpViews.test.js.map +1 -1
- package/build/__tests__/behavioral/views/TestingViewControllers.test.js +12 -12
- package/build/__tests__/behavioral/views/TestingViewControllers.test.js.map +1 -1
- package/build/__tests__/behavioral/watchers/WatchingForChanges.test.js +10 -10
- package/build/__tests__/behavioral/watchers/WatchingForChanges.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter.test.js +5 -5
- package/build/__tests__/implementation/ActionExecuter.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter2.test.js +30 -30
- package/build/__tests__/implementation/ActionExecuter2.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter3.test.js +3 -5
- package/build/__tests__/implementation/ActionExecuter3.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter4.test.js +2 -4
- package/build/__tests__/implementation/ActionExecuter4.test.js.map +1 -1
- package/build/__tests__/implementation/ArgParser.test.d.ts +1 -1
- package/build/__tests__/implementation/ArgParser.test.js +7 -7
- package/build/__tests__/implementation/ArgParser.test.js.map +1 -1
- package/build/__tests__/implementation/BuildService.test.js +4 -4
- package/build/__tests__/implementation/BuildService.test.js.map +1 -1
- package/build/__tests__/implementation/BulkImporting.test.d.ts +1 -1
- package/build/__tests__/implementation/BulkImporting.test.js +20 -22
- package/build/__tests__/implementation/BulkImporting.test.js.map +1 -1
- package/build/__tests__/implementation/CachingImports.test.js +3 -3
- package/build/__tests__/implementation/CachingImports.test.js.map +1 -1
- package/build/__tests__/implementation/CommandOptionBuilder.test.js +12 -12
- package/build/__tests__/implementation/CommandOptionBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/CommanderCommandResultMapper.test.d.ts +1 -1
- package/build/__tests__/implementation/CommanderCommandResultMapper.test.js +13 -13
- package/build/__tests__/implementation/CommanderCommandResultMapper.test.js.map +1 -1
- package/build/__tests__/implementation/DataStoreStore.test.js +16 -18
- package/build/__tests__/implementation/DataStoreStore.test.js.map +1 -1
- package/build/__tests__/implementation/DeletingOrphanedSchemaDefinitions.test.js +6 -6
- package/build/__tests__/implementation/DeletingOrphanedSchemaDefinitions.test.js.map +1 -1
- package/build/__tests__/implementation/EventContractCleanerUtil.test.d.ts +1 -1
- package/build/__tests__/implementation/EventContractCleanerUtil.test.js +7 -7
- package/build/__tests__/implementation/EventContractCleanerUtil.test.js.map +1 -1
- package/build/__tests__/implementation/EventStore.test.js +27 -29
- package/build/__tests__/implementation/EventStore.test.js.map +1 -1
- package/build/__tests__/implementation/EventTemplateItemBuilder.test.js +12 -12
- package/build/__tests__/implementation/EventTemplateItemBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/FeatureCommandAttacher.test.js +23 -23
- package/build/__tests__/implementation/FeatureCommandAttacher.test.js.map +1 -1
- package/build/__tests__/implementation/FeatureFixture.test.js +7 -7
- package/build/__tests__/implementation/FeatureFixture.test.js.map +1 -1
- package/build/__tests__/implementation/FeatureInstaller.test.js +8 -8
- package/build/__tests__/implementation/FeatureInstaller.test.js.map +1 -1
- package/build/__tests__/implementation/FeaturesUtil.test.d.ts +1 -1
- package/build/__tests__/implementation/FeaturesUtil.test.js +4 -4
- package/build/__tests__/implementation/FeaturesUtil.test.js.map +1 -1
- package/build/__tests__/implementation/FieldTemplateItemBuilder.test.js +11 -11
- package/build/__tests__/implementation/FieldTemplateItemBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/GlobalEmitter.js +3 -3
- package/build/__tests__/implementation/GlobalEmitter.js.map +1 -1
- package/build/__tests__/implementation/Introspection.test.js +4 -4
- package/build/__tests__/implementation/Introspection.test.js.map +1 -1
- package/build/__tests__/implementation/JestJsonParser.test.d.ts +1 -1
- package/build/__tests__/implementation/JestJsonParser.test.js +31 -31
- package/build/__tests__/implementation/JestJsonParser.test.js.map +1 -1
- package/build/__tests__/implementation/LintService.test.js +3 -3
- package/build/__tests__/implementation/LintService.test.js.map +1 -1
- package/build/__tests__/implementation/ListenerStore.test.js +3 -3
- package/build/__tests__/implementation/ListenerStore.test.js.map +1 -1
- package/build/__tests__/implementation/OnboardingScriptLoader.test.js +9 -9
- package/build/__tests__/implementation/OnboardingScriptLoader.test.js.map +1 -1
- package/build/__tests__/implementation/OnboardingScriptPlayer.test.js +17 -17
- package/build/__tests__/implementation/OnboardingScriptPlayer.test.js.map +1 -1
- package/build/__tests__/implementation/OnboardingStore.test.js +14 -14
- package/build/__tests__/implementation/OnboardingStore.test.js.map +1 -1
- package/build/__tests__/implementation/OrganizationStore.test.js +10 -10
- package/build/__tests__/implementation/OrganizationStore.test.js.map +1 -1
- package/build/__tests__/implementation/ParentTestFinder.test.js +6 -6
- package/build/__tests__/implementation/ParentTestFinder.test.js.map +1 -1
- package/build/__tests__/implementation/PkgService.test.js +8 -8
- package/build/__tests__/implementation/PkgService.test.js.map +1 -1
- package/build/__tests__/implementation/SchemaStore.test.js +30 -32
- package/build/__tests__/implementation/SchemaStore.test.js.map +1 -1
- package/build/__tests__/implementation/SchemaTemplateItemBuilder.test.js +10 -10
- package/build/__tests__/implementation/SchemaTemplateItemBuilder.test.js.map +1 -1
- package/build/__tests__/implementation/SchemaValueTypeWriter.test.js +13 -13
- package/build/__tests__/implementation/SchemaValueTypeWriter.test.js.map +1 -1
- package/build/__tests__/implementation/ServiceFactory.test.js +3 -3
- package/build/__tests__/implementation/ServiceFactory.test.js.map +1 -1
- package/build/__tests__/implementation/SettingUpANodeModule.test.js +4 -6
- package/build/__tests__/implementation/SettingUpANodeModule.test.js.map +1 -1
- package/build/__tests__/implementation/SkillStore.test.js +25 -27
- package/build/__tests__/implementation/SkillStore.test.js.map +1 -1
- package/build/__tests__/implementation/StoreFeature.test.js +4 -4
- package/build/__tests__/implementation/StoreFeature.test.js.map +1 -1
- package/build/__tests__/implementation/TestReporter.test.js +5 -5
- package/build/__tests__/implementation/TestReporter.test.js.map +1 -1
- package/build/__tests__/implementation/TestRunner.test.js +23 -25
- package/build/__tests__/implementation/TestRunner.test.js.map +1 -1
- package/build/__tests__/implementation/ValueTypeMapping.test.js +4 -4
- package/build/__tests__/implementation/ValueTypeMapping.test.js.map +1 -1
- package/build/__tests__/implementation/Widgets.test.js +10 -10
- package/build/__tests__/implementation/Widgets.test.js.map +1 -1
- package/build/__tests__/testDirsAndFiles/abstract_tests/AbstractTest.d.ts +1 -1
- package/build/__tests__/testDirsAndFiles/abstract_tests/AbstractTest.ts +1 -1
- package/build/__tests__/testDirsAndFiles/abstract_tests/AbstractTest2.d.ts +1 -1
- package/build/__tests__/testDirsAndFiles/abstract_tests/AbstractTest2.ts +1 -1
- package/build/__tests__/testDirsAndFiles/abstract_tests/deeper/AbstractBananaTest.d.ts +1 -1
- package/build/__tests__/testDirsAndFiles/abstract_tests/deeper/AbstractBananaTest.ts +1 -1
- package/build/features/onboard/templates/ManagingTodos.test.ts.hbs +1 -1
- package/build/features/test/TestLogItemGenerator.js +2 -2
- package/build/features/test/TestLogItemGenerator.js.map +1 -1
- package/build/interfaces/SpyInterface.js +5 -5
- package/build/interfaces/SpyInterface.js.map +1 -1
- package/build/tests/AbstractCliTest.d.ts +1 -1
- package/build/tests/AbstractCliTest.js +11 -11
- package/build/tests/AbstractCliTest.js.map +1 -1
- package/build/tests/AbstractSchemaTest.js +4 -4
- package/build/tests/AbstractSchemaTest.js.map +1 -1
- package/build/tests/utilities/test.utility.js +6 -6
- package/build/tests/utilities/test.utility.js.map +1 -1
- package/build/tests/utilities/uiAssert.utility.js +6 -6
- package/build/tests/utilities/uiAssert.utility.js.map +1 -1
- package/package.json +5 -5
- package/src/__tests__/behavioral/AddingADependency.test.ts +1 -1
- package/src/__tests__/behavioral/BlockingCommands.test.ts +1 -1
- package/src/__tests__/behavioral/BootingTheCli.test.ts +1 -1
- package/src/__tests__/behavioral/BootingWithBadFiles.test.ts +1 -1
- package/src/__tests__/behavioral/CreatingAConversationTopic.test.ts +1 -1
- package/src/__tests__/behavioral/CreatingSchemasWithGenerics.test.ts +1 -1
- package/src/__tests__/behavioral/DeployingASkill.test.ts +1 -1
- package/src/__tests__/behavioral/DeployingToSandbox.test.ts +1 -1
- package/src/__tests__/behavioral/EnablingAndDisablingCache.test.ts +1 -1
- package/src/__tests__/behavioral/GettingCliVersion.test.ts +1 -1
- package/src/__tests__/behavioral/InstallingASkillAtAnOrg.test.ts +1 -1
- package/src/__tests__/behavioral/ListeningToCoreEvents.test.ts +1 -1
- package/src/__tests__/behavioral/LoggingInAsASkill.test.ts +1 -1
- package/src/__tests__/behavioral/ManagingDependencies.test.ts +1 -1
- package/src/__tests__/behavioral/OverridingCommandsInPackageJson.test.ts +1 -1
- package/src/__tests__/behavioral/RebuildingASkill.test.ts +1 -1
- package/src/__tests__/behavioral/RegisteringConversationsOnBoot.test.ts +1 -1
- package/src/__tests__/behavioral/RegisteringEventsOnBoot.test.ts +1 -1
- package/src/__tests__/behavioral/RegisteringGlobalEvents.test.ts +1 -1
- package/src/__tests__/behavioral/RegisteringSkillViewOnBoot.test.ts +1 -1
- package/src/__tests__/behavioral/RememberingUpgradeSelections.test.ts +1 -1
- package/src/__tests__/behavioral/SettingLogTransportsInASkill.test.ts +1 -1
- package/src/__tests__/behavioral/SettingRemote.test.ts +1 -1
- package/src/__tests__/behavioral/SettingUpASkillForTesting.test.ts +1 -1
- package/src/__tests__/behavioral/SettingUpSchemasForModuleDistribution.test.ts +1 -1
- package/src/__tests__/behavioral/SettingUpVscode.test.ts +1 -1
- package/src/__tests__/behavioral/SyncingEventsOnlyFromDependencies.test.ts +1 -1
- package/src/__tests__/behavioral/TestReporterSettingsRemembered.test.ts +1 -1
- package/src/__tests__/behavioral/TestingAConversation.test.ts +1 -1
- package/src/__tests__/behavioral/TestingDataStores.test.ts +1 -1
- package/src/__tests__/behavioral/WatchingSkillViews.test.ts +1 -1
- package/src/__tests__/behavioral/errors/CreatingANewErrorBuilder.test.ts +1 -1
- package/src/__tests__/behavioral/errors/KeepingErrorClassInSync.test.ts +1 -1
- package/src/__tests__/behavioral/errors/KeepingErrorsInSync.test.ts +1 -1
- package/src/__tests__/behavioral/errors/SettingUpErrors.test.ts +1 -1
- package/src/__tests__/behavioral/eventContract/PullingMercuryEventContract.test.ts +1 -1
- package/src/__tests__/behavioral/events/CreatingAListener.test.ts +1 -1
- package/src/__tests__/behavioral/events/CreatingAnEvent.test.ts +1 -1
- package/src/__tests__/behavioral/events/KeepingEventsInSync.test.ts +1 -1
- package/src/__tests__/behavioral/events/KeepingEventsInSync2.test.ts +1 -1
- package/src/__tests__/behavioral/events/KeepingListenersInSync.test.ts +1 -1
- package/src/__tests__/behavioral/events/ListeningToAnEventYouCreate.test.ts +1 -1
- package/src/__tests__/behavioral/events/SettingUpEvents.test.ts +1 -1
- package/src/__tests__/behavioral/events/SkillEmitsBootEvents.test.ts +1 -1
- package/src/__tests__/behavioral/node/CreatingANodeModule.test.ts +1 -1
- package/src/__tests__/behavioral/onboard/StartingOnboarding.test.ts +1 -1
- package/src/__tests__/behavioral/organization/CreatingAnOrg.test.ts +1 -1
- package/src/__tests__/behavioral/permissions/CreatingPermissions.test.ts +1 -1
- package/src/__tests__/behavioral/person/LoggingInAsPerson.test.ts +1 -1
- package/src/__tests__/behavioral/person/SeeWhoIsLoggedIn.test.ts +1 -1
- package/src/__tests__/behavioral/polish/SettingUpPolish.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/CreatingANewSchemaBuilder.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/GeneratingFieldTypesOnly.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/GettingSchemasFromHealthCheck.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/HandlesRelatedSchemas.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/ImportingSchemaImports.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/KeepingSchemasInSync.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/SettingUpSchemas.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/SyncingBadSchemasProvidesHelpfulErrorMessages.test.ts +1 -1
- package/src/__tests__/behavioral/schemas/UsingSchemasInCli.test.ts +1 -1
- package/src/__tests__/behavioral/skill/BootingASkill.test.ts +1 -1
- package/src/__tests__/behavioral/skill/CreatingASkill.test.ts +1 -1
- package/src/__tests__/behavioral/skill/RegisteringASkill.test.ts +1 -1
- package/src/__tests__/behavioral/skill/SettingUpASkill.test.ts +1 -1
- package/src/__tests__/behavioral/stores/CreatingADataStore.test.ts +1 -1
- package/src/__tests__/behavioral/stores/KeepingDataStoresInSync.test.ts +1 -1
- package/src/__tests__/behavioral/tests/CreatingATest.test.ts +1 -1
- package/src/__tests__/behavioral/tests/RunningTests.test.ts +1 -1
- package/src/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.ts +1 -1
- package/src/__tests__/behavioral/tests/SettingUpTests.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpdatingDependencies.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpdatingDependencies2.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingANodeModule.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingASkill.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingASkill2.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingASkill3.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingASkill4.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingASkill5.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingWithListeners.test.ts +1 -1
- package/src/__tests__/behavioral/upgrading/UpgradingWithSandboxFeatureInstalled.test.ts +1 -1
- package/src/__tests__/behavioral/views/CreatingASkillView.test.ts +1 -1
- package/src/__tests__/behavioral/views/CreatingATheme.test.ts +1 -1
- package/src/__tests__/behavioral/views/KeepingViewsInSync.test.ts +1 -1
- package/src/__tests__/behavioral/views/SettingUpViews.test.ts +1 -1
- package/src/__tests__/behavioral/views/TestingViewControllers.test.ts +1 -1
- package/src/__tests__/behavioral/watchers/WatchingForChanges.test.ts +1 -1
- package/src/__tests__/implementation/ActionExecuter.test.ts +1 -1
- package/src/__tests__/implementation/ActionExecuter2.test.ts +1 -1
- package/src/__tests__/implementation/ActionExecuter3.test.ts +1 -1
- package/src/__tests__/implementation/ActionExecuter4.test.ts +1 -1
- package/src/__tests__/implementation/ArgParser.test.ts +1 -1
- package/src/__tests__/implementation/BuildService.test.ts +1 -1
- package/src/__tests__/implementation/BulkImporting.test.ts +1 -1
- package/src/__tests__/implementation/CachingImports.test.ts +1 -1
- package/src/__tests__/implementation/CommandOptionBuilder.test.ts +1 -1
- package/src/__tests__/implementation/CommanderCommandResultMapper.test.ts +1 -1
- package/src/__tests__/implementation/DataStoreStore.test.ts +1 -1
- package/src/__tests__/implementation/DeletingOrphanedSchemaDefinitions.test.ts +1 -1
- package/src/__tests__/implementation/EventContractCleanerUtil.test.ts +1 -1
- package/src/__tests__/implementation/EventStore.test.ts +1 -1
- package/src/__tests__/implementation/EventTemplateItemBuilder.test.ts +1 -1
- package/src/__tests__/implementation/FeatureCommandAttacher.test.ts +1 -1
- package/src/__tests__/implementation/FeatureFixture.test.ts +1 -1
- package/src/__tests__/implementation/FeatureInstaller.test.ts +1 -1
- package/src/__tests__/implementation/FeaturesUtil.test.ts +1 -1
- package/src/__tests__/implementation/FieldTemplateItemBuilder.test.ts +1 -1
- package/src/__tests__/implementation/GlobalEmitter.ts +1 -1
- package/src/__tests__/implementation/Introspection.test.ts +1 -1
- package/src/__tests__/implementation/JestJsonParser.test.ts +1 -1
- package/src/__tests__/implementation/LintService.test.ts +1 -1
- package/src/__tests__/implementation/ListenerStore.test.ts +1 -1
- package/src/__tests__/implementation/OnboardingScriptLoader.test.ts +1 -1
- package/src/__tests__/implementation/OnboardingScriptPlayer.test.ts +1 -1
- package/src/__tests__/implementation/OnboardingStore.test.ts +1 -1
- package/src/__tests__/implementation/OrganizationStore.test.ts +1 -1
- package/src/__tests__/implementation/ParentTestFinder.test.ts +1 -1
- package/src/__tests__/implementation/PkgService.test.ts +1 -1
- package/src/__tests__/implementation/SchemaStore.test.ts +1 -1
- package/src/__tests__/implementation/SchemaTemplateItemBuilder.test.ts +1 -1
- package/src/__tests__/implementation/SchemaValueTypeWriter.test.ts +1 -1
- package/src/__tests__/implementation/ServiceFactory.test.ts +1 -1
- package/src/__tests__/implementation/SettingUpANodeModule.test.ts +1 -1
- package/src/__tests__/implementation/SkillStore.test.ts +1 -1
- package/src/__tests__/implementation/StoreFeature.test.ts +1 -1
- package/src/__tests__/implementation/TestReporter.test.ts +1 -1
- package/src/__tests__/implementation/TestRunner.test.ts +1 -1
- package/src/__tests__/implementation/ValueTypeMapping.test.ts +1 -1
- package/src/__tests__/implementation/Widgets.test.ts +1 -1
- package/src/__tests__/testDirsAndFiles/abstract_tests/AbstractTest.ts +1 -1
- package/src/__tests__/testDirsAndFiles/abstract_tests/AbstractTest2.ts +1 -1
- package/src/__tests__/testDirsAndFiles/abstract_tests/deeper/AbstractBananaTest.ts +1 -1
- package/src/features/onboard/templates/ManagingTodos.test.ts.hbs +1 -1
- package/src/features/test/TestLogItemGenerator.ts +1 -1
- package/src/interfaces/SpyInterface.ts +1 -1
- package/src/tests/AbstractCliTest.ts +1 -1
- package/src/tests/AbstractSchemaTest.ts +1 -1
- package/src/tests/utilities/test.utility.ts +1 -1
- package/src/tests/utilities/uiAssert.utility.ts +1 -1
|
@@ -29,13 +29,11 @@ var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/
|
|
|
29
29
|
|
|
30
30
|
var _spruceSkillUtils = require("@sprucelabs/spruce-skill-utils");
|
|
31
31
|
|
|
32
|
-
var _test = require("@sprucelabs/test");
|
|
33
|
-
|
|
34
32
|
var _testUtils = require("@sprucelabs/test-utils");
|
|
35
33
|
|
|
36
34
|
var _AbstractSkillTest2 = _interopRequireDefault(require("../../../tests/AbstractSkillTest"));
|
|
37
35
|
|
|
38
|
-
var
|
|
36
|
+
var _test = _interopRequireDefault(require("../../../tests/utilities/test.utility"));
|
|
39
37
|
|
|
40
38
|
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _class, _class2;
|
|
41
39
|
|
|
@@ -43,7 +41,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
43
41
|
|
|
44
42
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
45
43
|
|
|
46
|
-
var CreatingASkillViewTest = (_dec = (0,
|
|
44
|
+
var CreatingASkillViewTest = (_dec = (0, _testUtils.test)(), _dec2 = (0, _testUtils.test)(), _dec3 = (0, _testUtils.test)(), _dec4 = (0, _testUtils.test)(), _dec5 = (0, _testUtils.test)(), _dec6 = (0, _testUtils.test)(), _dec7 = (0, _testUtils.test)(), _dec8 = (0, _testUtils.test)(), _dec9 = (0, _testUtils.test)(), _dec10 = (0, _testUtils.test)(), _dec11 = (0, _testUtils.test)(), _dec12 = (0, _testUtils.test)(), _dec13 = (0, _testUtils.test)(), _dec14 = (0, _testUtils.test)(), (_class = (_class2 = /*#__PURE__*/function (_AbstractSkillTest) {
|
|
47
45
|
(0, _inherits2["default"])(CreatingASkillViewTest, _AbstractSkillTest);
|
|
48
46
|
|
|
49
47
|
var _super = _createSuper(CreatingASkillViewTest);
|
|
@@ -84,7 +82,7 @@ var CreatingASkillViewTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(
|
|
|
84
82
|
}, {
|
|
85
83
|
key: "hasCreateAction",
|
|
86
84
|
value: function hasCreateAction() {
|
|
87
|
-
|
|
85
|
+
_testUtils.assert.isFunction(this.action.execute);
|
|
88
86
|
}
|
|
89
87
|
}, {
|
|
90
88
|
key: "viewFieatureHasExpectedDependencies",
|
|
@@ -102,7 +100,7 @@ var CreatingASkillViewTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(
|
|
|
102
100
|
features = _context2.sent;
|
|
103
101
|
view = features.getFeature('view');
|
|
104
102
|
|
|
105
|
-
|
|
103
|
+
_testUtils.assert.isEqualDeep(view.dependencies, [{
|
|
106
104
|
code: 'node',
|
|
107
105
|
isRequired: true
|
|
108
106
|
}, {
|
|
@@ -145,7 +143,7 @@ var CreatingASkillViewTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(
|
|
|
145
143
|
case 3:
|
|
146
144
|
last = this.ui.getLastInvocation();
|
|
147
145
|
|
|
148
|
-
|
|
146
|
+
_testUtils.assert.isEqual(last.command, 'confirm');
|
|
149
147
|
|
|
150
148
|
this.ui.reset();
|
|
151
149
|
|
|
@@ -181,11 +179,11 @@ var CreatingASkillViewTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(
|
|
|
181
179
|
case 2:
|
|
182
180
|
results = _context4.sent;
|
|
183
181
|
|
|
184
|
-
|
|
182
|
+
_testUtils.assert.isFalsy(results.errors);
|
|
185
183
|
|
|
186
|
-
this.rootSvc =
|
|
184
|
+
this.rootSvc = _test["default"].assertFileByNameInGeneratedFiles('Root.svc.ts', results.files);
|
|
187
185
|
|
|
188
|
-
|
|
186
|
+
_testUtils.assert.doesInclude(this.rootSvc, 'skillViewControllers');
|
|
189
187
|
|
|
190
188
|
case 6:
|
|
191
189
|
case "end":
|
|
@@ -237,7 +235,7 @@ var CreatingASkillViewTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(
|
|
|
237
235
|
case 0:
|
|
238
236
|
contents = _spruceSkillUtils.diskUtil.readFile(this.rootSvc);
|
|
239
237
|
|
|
240
|
-
|
|
238
|
+
_testUtils.assert.doesInclude(contents, 'export default class RootSkillViewController extends AbstractSkillViewController');
|
|
241
239
|
|
|
242
240
|
case 2:
|
|
243
241
|
case "end":
|
|
@@ -273,7 +271,7 @@ var CreatingASkillViewTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(
|
|
|
273
271
|
case 2:
|
|
274
272
|
results = _context7.sent;
|
|
275
273
|
|
|
276
|
-
|
|
274
|
+
_testUtils.assert.isTruthy(results.errors);
|
|
277
275
|
|
|
278
276
|
_testUtils.errorAssert.assertError((_results$errors = results.errors) === null || _results$errors === void 0 ? void 0 : _results$errors[0], 'SKILL_VIEW_EXISTS', {
|
|
279
277
|
name: 'Root'
|
|
@@ -311,7 +309,7 @@ var CreatingASkillViewTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(
|
|
|
311
309
|
case 3:
|
|
312
310
|
last = this.ui.getLastInvocation();
|
|
313
311
|
|
|
314
|
-
|
|
312
|
+
_testUtils.assert.isEqual(last.command, 'prompt');
|
|
315
313
|
|
|
316
314
|
_context8.next = 7;
|
|
317
315
|
return this.ui.sendInput('Dashboard');
|
|
@@ -327,11 +325,11 @@ var CreatingASkillViewTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(
|
|
|
327
325
|
case 11:
|
|
328
326
|
results = _context8.sent;
|
|
329
327
|
|
|
330
|
-
|
|
328
|
+
_testUtils.assert.isFalsy(results.errors);
|
|
331
329
|
|
|
332
|
-
this.dashboardVc =
|
|
330
|
+
this.dashboardVc = _test["default"].assertFileByNameInGeneratedFiles('Dashboard.svc.ts', results.files);
|
|
333
331
|
|
|
334
|
-
|
|
332
|
+
_testUtils.assert.doesInclude(this.dashboardVc, 'skillViewControllers');
|
|
335
333
|
|
|
336
334
|
this.ui.reset();
|
|
337
335
|
|
|
@@ -368,9 +366,9 @@ var CreatingASkillViewTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(
|
|
|
368
366
|
case 3:
|
|
369
367
|
last = this.ui.getLastInvocation();
|
|
370
368
|
|
|
371
|
-
|
|
369
|
+
_testUtils.assert.isEqual(last.command, 'prompt');
|
|
372
370
|
|
|
373
|
-
|
|
371
|
+
_testUtils.assert.doesInclude(last.options.options.choices, {
|
|
374
372
|
value: 'Card'
|
|
375
373
|
});
|
|
376
374
|
|
|
@@ -384,9 +382,9 @@ var CreatingASkillViewTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(
|
|
|
384
382
|
case 10:
|
|
385
383
|
results = _context9.sent;
|
|
386
384
|
|
|
387
|
-
|
|
385
|
+
_testUtils.assert.isFalsy(results.errors);
|
|
388
386
|
|
|
389
|
-
this.appointmentsCard =
|
|
387
|
+
this.appointmentsCard = _test["default"].assertFileByNameInGeneratedFiles('AppointmentsCard.vc.ts', results.files);
|
|
390
388
|
|
|
391
389
|
case 13:
|
|
392
390
|
case "end":
|
|
@@ -407,7 +405,7 @@ var CreatingASkillViewTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(
|
|
|
407
405
|
value: function skillViewExtendsAbstractViewControllerWithProperView() {
|
|
408
406
|
var contents = _spruceSkillUtils.diskUtil.readFile(this.appointmentsCard);
|
|
409
407
|
|
|
410
|
-
|
|
408
|
+
_testUtils.assert.doesInclude(contents, 'export default class AppointmentsCardViewController extends AbstractViewController<Card>');
|
|
411
409
|
}
|
|
412
410
|
}, {
|
|
413
411
|
key: "nicelyTypesRootSkillViewController",
|
|
@@ -432,9 +430,9 @@ var CreatingASkillViewTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(
|
|
|
432
430
|
case 5:
|
|
433
431
|
imported = _context10.sent;
|
|
434
432
|
|
|
435
|
-
|
|
433
|
+
_testUtils.assert.isTruthy(imported.svcModel);
|
|
436
434
|
|
|
437
|
-
|
|
435
|
+
_testUtils.assert.isTruthy(imported.svcId);
|
|
438
436
|
|
|
439
437
|
case 8:
|
|
440
438
|
case "end":
|
|
@@ -473,9 +471,9 @@ var CreatingASkillViewTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(
|
|
|
473
471
|
case 5:
|
|
474
472
|
imported = _context11.sent;
|
|
475
473
|
|
|
476
|
-
|
|
474
|
+
_testUtils.assert.isTruthy(imported.vcModel);
|
|
477
475
|
|
|
478
|
-
|
|
476
|
+
_testUtils.assert.isTruthy(imported.vcId);
|
|
479
477
|
|
|
480
478
|
case 8:
|
|
481
479
|
case "end":
|
|
@@ -503,9 +501,9 @@ var CreatingASkillViewTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(
|
|
|
503
501
|
viewsFile = this.resolveHashSprucePath('views', 'views.ts');
|
|
504
502
|
viewContents = _spruceSkillUtils.diskUtil.readFile(viewsFile);
|
|
505
503
|
|
|
506
|
-
|
|
504
|
+
_testUtils.assert.doesInclude(viewContents, "interface ViewControllerOptionsMap");
|
|
507
505
|
|
|
508
|
-
|
|
506
|
+
_testUtils.assert.doesInclude(viewContents, "'testing-views.appointments-card': ConstructorParameters<typeof AppointmentsCardViewController>[0]");
|
|
509
507
|
|
|
510
508
|
case 4:
|
|
511
509
|
case "end":
|
|
@@ -533,11 +531,11 @@ var CreatingASkillViewTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(
|
|
|
533
531
|
viewsFile = this.resolveHashSprucePath('views', 'views.ts');
|
|
534
532
|
viewContents = _spruceSkillUtils.diskUtil.readFile(viewsFile);
|
|
535
533
|
|
|
536
|
-
|
|
534
|
+
_testUtils.assert.doesInclude(viewContents, "interface SkillViewControllerArgsMap");
|
|
537
535
|
|
|
538
|
-
|
|
536
|
+
_testUtils.assert.doesInclude(viewContents, "type LoadOptions<Args extends Record<string,any>[]> = Args[0]['args'] extends Record<string, any> ? Args[0]['args'] : Record<never, any>");
|
|
539
537
|
|
|
540
|
-
|
|
538
|
+
_testUtils.assert.doesInclude(viewContents, "'testing-views.root': LoadOptions<Parameters<RootSkillViewController['load']>>");
|
|
541
539
|
|
|
542
540
|
case 5:
|
|
543
541
|
case "end":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreatingASkillView.test.js","names":["CreatingASkillViewTest","test","action","Action","assert","isFunction","execute","getFeatureInstaller","features","view","getFeature","isEqualDeep","dependencies","code","isRequired","viewType","waitForInput","last","ui","getLastInvocation","isEqual","command","reset","isRoot","results","isFalsy","errors","rootSvc","testUtil","assertFileByNameInGeneratedFiles","files","doesInclude","Service","check","contents","diskUtil","readFile","isTruthy","errorAssert","assertError","name","promise","sendInput","dashboardVc","nameReadable","options","choices","value","appointmentsCard","buildTestfile","idInterfaceName","testFile","resolvePath","writeFile","importAll","imported","svcModel","svcId","vcModel","vcId","viewsFile","resolveHashSprucePath","viewContents","trim","AbstractSkillTest"],"sources":["../../../../src/__tests__/behavioral/views/CreatingASkillView.test.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport CreateAction from '../../../features/view/actions/CreateAction'\nimport AbstractSkillTest from '../../../tests/AbstractSkillTest'\nimport testUtil from '../../../tests/utilities/test.utility'\n\nexport default class CreatingASkillViewTest extends AbstractSkillTest {\n\tprotected static skillCacheKey = 'views'\n\tprivate static action: CreateAction\n\tprivate static rootSvc: string\n\tpublic static appointmentsCard: string\n\tprivate static dashboardVc: string\n\n\tprotected static async beforeEach() {\n\t\tawait super.beforeEach()\n\t\tthis.action = this.Action('view', 'create') as CreateAction\n\t}\n\n\t@test()\n\tprotected static hasCreateAction() {\n\t\tassert.isFunction(this.action.execute)\n\t}\n\n\t@test()\n\tprotected static async viewFieatureHasExpectedDependencies() {\n\t\tconst features = await this.getFeatureInstaller()\n\t\tconst view = features.getFeature('view')\n\t\tassert.isEqualDeep(view.dependencies, [\n\t\t\t{\n\t\t\t\tcode: 'node',\n\t\t\t\tisRequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tcode: 'schema',\n\t\t\t\tisRequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tcode: 'event',\n\t\t\t\tisRequired: true,\n\t\t\t},\n\t\t])\n\t}\n\n\t@test()\n\tprotected static async asksIfRootSkillViewIfNotYetCreated() {\n\t\tvoid this.action.execute({\n\t\t\tviewType: 'skillView',\n\t\t})\n\n\t\tawait this.waitForInput()\n\n\t\tconst last = this.ui.getLastInvocation()\n\n\t\tassert.isEqual(last.command, 'confirm')\n\n\t\tthis.ui.reset()\n\t}\n\n\t@test()\n\tprotected static async canCreateRootSkillView() {\n\t\tconst results = await this.action.execute({\n\t\t\tviewType: 'skillView',\n\t\t\tisRoot: true,\n\t\t})\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tthis.rootSvc = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'Root.svc.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tassert.doesInclude(this.rootSvc, 'skillViewControllers')\n\t}\n\n\t@test()\n\tprotected static async generatesValidRootSkillView() {\n\t\tawait this.Service('typeChecker').check(this.rootSvc)\n\t}\n\n\t@test()\n\tprotected static async rootSkillViewExtendsAbstractSkillViewController() {\n\t\tconst contents = diskUtil.readFile(this.rootSvc)\n\t\tassert.doesInclude(\n\t\t\tcontents,\n\t\t\t'export default class RootSkillViewController extends AbstractSkillViewController'\n\t\t)\n\t}\n\n\t@test()\n\tprotected static async cantCreateTwoRootSvcs() {\n\t\tconst results = await this.action.execute({\n\t\t\tviewType: 'skillView',\n\t\t\tisRoot: true,\n\t\t})\n\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors?.[0], 'SKILL_VIEW_EXISTS', {\n\t\t\tname: 'Root',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async asksForNamesIfCreatingSkillViewNotRoot() {\n\t\tconst promise = this.action.execute({\n\t\t\tviewType: 'skillView',\n\t\t})\n\n\t\tawait this.waitForInput()\n\n\t\tlet last = this.ui.getLastInvocation()\n\n\t\tassert.isEqual(last.command, 'prompt')\n\n\t\tawait this.ui.sendInput('Dashboard')\n\t\tawait this.ui.sendInput('\\n')\n\n\t\tconst results = await promise\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tthis.dashboardVc = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'Dashboard.svc.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tassert.doesInclude(this.dashboardVc, 'skillViewControllers')\n\n\t\tthis.ui.reset()\n\t}\n\n\t@test()\n\tprotected static async asksForViewModelWhenCreatingSkillView() {\n\t\tconst promise = this.action.execute({\n\t\t\tviewType: 'view',\n\t\t\tnameReadable: 'Appointments card',\n\t\t})\n\n\t\tawait this.waitForInput()\n\n\t\tconst last = this.ui.getLastInvocation()\n\n\t\tassert.isEqual(last.command, 'prompt')\n\t\tassert.doesInclude(last.options.options.choices, {\n\t\t\tvalue: 'Card',\n\t\t})\n\n\t\tawait this.ui.sendInput('Card')\n\n\t\tconst results = await promise\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tthis.appointmentsCard = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'AppointmentsCard.vc.ts',\n\t\t\tresults.files\n\t\t)\n\t}\n\n\t@test()\n\tprotected static skillViewExtendsAbstractViewControllerWithProperView() {\n\t\tconst contents = diskUtil.readFile(this.appointmentsCard)\n\t\tassert.doesInclude(\n\t\t\tcontents,\n\t\t\t'export default class AppointmentsCardViewController extends AbstractViewController<Card>'\n\t\t)\n\t}\n\n\t@test()\n\tprotected static async nicelyTypesRootSkillViewController() {\n\t\tconst contents = this.buildTestfile({\n\t\t\tidInterfaceName: 'SkillViewControllerId',\n\t\t\tcode: `\nconst root = vcFactory.Controller('testing-views.root', {})\nexport const svcModel = root.render()\nexport const svcId: SkillViewControllerId = 'testing-views.root'`,\n\t\t})\n\n\t\tconst testFile = this.resolvePath('src', 'test.ts')\n\t\tdiskUtil.writeFile(testFile, contents)\n\n\t\tconst imported = await this.Service('import').importAll(testFile)\n\n\t\tassert.isTruthy(imported.svcModel)\n\t\tassert.isTruthy(imported.svcId)\n\t}\n\n\t@test()\n\tprotected static async nicelyTypesViewController() {\n\t\tconst contents = this.buildTestfile({\n\t\t\tidInterfaceName: 'ViewControllerId',\n\t\t\tcode: `\n\t\tconst apptCard = vcFactory.Controller('testing-views.appointments-card', {})\n\t\texport const vcModel = apptCard.render()\n\t\texport const vcId: ViewControllerId = 'testing-views.appointments-card'`,\n\t\t})\n\n\t\tconst testFile = this.resolvePath('src', 'test.ts')\n\t\tdiskUtil.writeFile(testFile, contents)\n\n\t\tconst imported = await this.Service('import').importAll(testFile)\n\n\t\tassert.isTruthy(imported.vcModel)\n\t\tassert.isTruthy(imported.vcId)\n\t}\n\n\t@test()\n\tprotected static async typesViewControllerOptions() {\n\t\tconst viewsFile = this.resolveHashSprucePath('views', 'views.ts')\n\t\tconst viewContents = diskUtil.readFile(viewsFile)\n\n\t\tassert.doesInclude(viewContents, `interface ViewControllerOptionsMap`)\n\t\tassert.doesInclude(\n\t\t\tviewContents,\n\t\t\t`'testing-views.appointments-card': ConstructorParameters<typeof AppointmentsCardViewController>[0]`\n\t\t)\n\t}\n\n\t@test()\n\tprotected static async typesSkillViewControllerLoadOptionsOptions() {\n\t\tconst viewsFile = this.resolveHashSprucePath('views', 'views.ts')\n\t\tconst viewContents = diskUtil.readFile(viewsFile)\n\n\t\tassert.doesInclude(viewContents, `interface SkillViewControllerArgsMap`)\n\t\tassert.doesInclude(\n\t\t\tviewContents,\n\t\t\t`type LoadOptions<Args extends Record<string,any>[]> = Args[0]['args'] extends Record<string, any> ? Args[0]['args'] : Record<never, any>`\n\t\t)\n\t\tassert.doesInclude(\n\t\t\tviewContents,\n\t\t\t`'testing-views.root': LoadOptions<Parameters<RootSkillViewController['load']>>`\n\t\t)\n\t}\n\n\tprivate static buildTestfile(options: {\n\t\tcode: string\n\t\tidInterfaceName: 'SkillViewControllerId' | 'ViewControllerId'\n\t}) {\n\t\tconst { code, idInterfaceName } = options\n\n\t\treturn (\n\t\t\t`\nimport ` +\n\t\t\t`'#spruce/views/views'\nimport {\n\tViewControllerFactory,\n\tAuthenticatorImpl,\n\tStubStorage,\n\t${idInterfaceName},\n} from '@sprucelabs/heartwood-view-controllers'\nimport { vcDiskUtil } from '@sprucelabs/spruce-test-fixtures'\n\nAuthenticatorImpl.setStorage(new StubStorage())\n\nconst vcFactory = ViewControllerFactory.Factory({\n\tcontrollerMap: vcDiskUtil.loadViewControllersAndBuildMap('testing-views', __dirname),\n\tdevice: {} as any,\n\tconnectToApi: async () => {\n\t\treturn 'yes' as any\n\t},\n})\n${code}\n\t\t`.trim()\n\t\t)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;IAEqBA,sB,WAYnB,IAAAC,UAAA,G,UAKA,IAAAA,UAAA,G,UAoBA,IAAAA,UAAA,G,UAeA,IAAAA,UAAA,G,UAiBA,IAAAA,UAAA,G,UAKA,IAAAA,UAAA,G,UASA,IAAAA,UAAA,G,UAcA,IAAAA,UAAA,G,UA6BA,IAAAA,UAAA,G,WA4BA,IAAAA,UAAA,G,WASA,IAAAA,UAAA,G,WAmBA,IAAAA,UAAA,G,WAmBA,IAAAA,UAAA,G,WAYA,IAAAA,UAAA,G;;;;;;;;;;;;;sGA9MD;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA;;cAAA;gBAEC,KAAKC,MAAL,GAAc,KAAKC,MAAL,CAAY,MAAZ,EAAoB,QAApB,CAAd;;cAFD;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;WAKA,2BACmC;MAClCC,YAAA,CAAOC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CreatingASkillView.test.js","names":["CreatingASkillViewTest","test","action","Action","assert","isFunction","execute","getFeatureInstaller","features","view","getFeature","isEqualDeep","dependencies","code","isRequired","viewType","waitForInput","last","ui","getLastInvocation","isEqual","command","reset","isRoot","results","isFalsy","errors","rootSvc","testUtil","assertFileByNameInGeneratedFiles","files","doesInclude","Service","check","contents","diskUtil","readFile","isTruthy","errorAssert","assertError","name","promise","sendInput","dashboardVc","nameReadable","options","choices","value","appointmentsCard","buildTestfile","idInterfaceName","testFile","resolvePath","writeFile","importAll","imported","svcModel","svcId","vcModel","vcId","viewsFile","resolveHashSprucePath","viewContents","trim","AbstractSkillTest"],"sources":["../../../../src/__tests__/behavioral/views/CreatingASkillView.test.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test-utils'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport CreateAction from '../../../features/view/actions/CreateAction'\nimport AbstractSkillTest from '../../../tests/AbstractSkillTest'\nimport testUtil from '../../../tests/utilities/test.utility'\n\nexport default class CreatingASkillViewTest extends AbstractSkillTest {\n\tprotected static skillCacheKey = 'views'\n\tprivate static action: CreateAction\n\tprivate static rootSvc: string\n\tpublic static appointmentsCard: string\n\tprivate static dashboardVc: string\n\n\tprotected static async beforeEach() {\n\t\tawait super.beforeEach()\n\t\tthis.action = this.Action('view', 'create') as CreateAction\n\t}\n\n\t@test()\n\tprotected static hasCreateAction() {\n\t\tassert.isFunction(this.action.execute)\n\t}\n\n\t@test()\n\tprotected static async viewFieatureHasExpectedDependencies() {\n\t\tconst features = await this.getFeatureInstaller()\n\t\tconst view = features.getFeature('view')\n\t\tassert.isEqualDeep(view.dependencies, [\n\t\t\t{\n\t\t\t\tcode: 'node',\n\t\t\t\tisRequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tcode: 'schema',\n\t\t\t\tisRequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tcode: 'event',\n\t\t\t\tisRequired: true,\n\t\t\t},\n\t\t])\n\t}\n\n\t@test()\n\tprotected static async asksIfRootSkillViewIfNotYetCreated() {\n\t\tvoid this.action.execute({\n\t\t\tviewType: 'skillView',\n\t\t})\n\n\t\tawait this.waitForInput()\n\n\t\tconst last = this.ui.getLastInvocation()\n\n\t\tassert.isEqual(last.command, 'confirm')\n\n\t\tthis.ui.reset()\n\t}\n\n\t@test()\n\tprotected static async canCreateRootSkillView() {\n\t\tconst results = await this.action.execute({\n\t\t\tviewType: 'skillView',\n\t\t\tisRoot: true,\n\t\t})\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tthis.rootSvc = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'Root.svc.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tassert.doesInclude(this.rootSvc, 'skillViewControllers')\n\t}\n\n\t@test()\n\tprotected static async generatesValidRootSkillView() {\n\t\tawait this.Service('typeChecker').check(this.rootSvc)\n\t}\n\n\t@test()\n\tprotected static async rootSkillViewExtendsAbstractSkillViewController() {\n\t\tconst contents = diskUtil.readFile(this.rootSvc)\n\t\tassert.doesInclude(\n\t\t\tcontents,\n\t\t\t'export default class RootSkillViewController extends AbstractSkillViewController'\n\t\t)\n\t}\n\n\t@test()\n\tprotected static async cantCreateTwoRootSvcs() {\n\t\tconst results = await this.action.execute({\n\t\t\tviewType: 'skillView',\n\t\t\tisRoot: true,\n\t\t})\n\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors?.[0], 'SKILL_VIEW_EXISTS', {\n\t\t\tname: 'Root',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async asksForNamesIfCreatingSkillViewNotRoot() {\n\t\tconst promise = this.action.execute({\n\t\t\tviewType: 'skillView',\n\t\t})\n\n\t\tawait this.waitForInput()\n\n\t\tlet last = this.ui.getLastInvocation()\n\n\t\tassert.isEqual(last.command, 'prompt')\n\n\t\tawait this.ui.sendInput('Dashboard')\n\t\tawait this.ui.sendInput('\\n')\n\n\t\tconst results = await promise\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tthis.dashboardVc = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'Dashboard.svc.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tassert.doesInclude(this.dashboardVc, 'skillViewControllers')\n\n\t\tthis.ui.reset()\n\t}\n\n\t@test()\n\tprotected static async asksForViewModelWhenCreatingSkillView() {\n\t\tconst promise = this.action.execute({\n\t\t\tviewType: 'view',\n\t\t\tnameReadable: 'Appointments card',\n\t\t})\n\n\t\tawait this.waitForInput()\n\n\t\tconst last = this.ui.getLastInvocation()\n\n\t\tassert.isEqual(last.command, 'prompt')\n\t\tassert.doesInclude(last.options.options.choices, {\n\t\t\tvalue: 'Card',\n\t\t})\n\n\t\tawait this.ui.sendInput('Card')\n\n\t\tconst results = await promise\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tthis.appointmentsCard = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'AppointmentsCard.vc.ts',\n\t\t\tresults.files\n\t\t)\n\t}\n\n\t@test()\n\tprotected static skillViewExtendsAbstractViewControllerWithProperView() {\n\t\tconst contents = diskUtil.readFile(this.appointmentsCard)\n\t\tassert.doesInclude(\n\t\t\tcontents,\n\t\t\t'export default class AppointmentsCardViewController extends AbstractViewController<Card>'\n\t\t)\n\t}\n\n\t@test()\n\tprotected static async nicelyTypesRootSkillViewController() {\n\t\tconst contents = this.buildTestfile({\n\t\t\tidInterfaceName: 'SkillViewControllerId',\n\t\t\tcode: `\nconst root = vcFactory.Controller('testing-views.root', {})\nexport const svcModel = root.render()\nexport const svcId: SkillViewControllerId = 'testing-views.root'`,\n\t\t})\n\n\t\tconst testFile = this.resolvePath('src', 'test.ts')\n\t\tdiskUtil.writeFile(testFile, contents)\n\n\t\tconst imported = await this.Service('import').importAll(testFile)\n\n\t\tassert.isTruthy(imported.svcModel)\n\t\tassert.isTruthy(imported.svcId)\n\t}\n\n\t@test()\n\tprotected static async nicelyTypesViewController() {\n\t\tconst contents = this.buildTestfile({\n\t\t\tidInterfaceName: 'ViewControllerId',\n\t\t\tcode: `\n\t\tconst apptCard = vcFactory.Controller('testing-views.appointments-card', {})\n\t\texport const vcModel = apptCard.render()\n\t\texport const vcId: ViewControllerId = 'testing-views.appointments-card'`,\n\t\t})\n\n\t\tconst testFile = this.resolvePath('src', 'test.ts')\n\t\tdiskUtil.writeFile(testFile, contents)\n\n\t\tconst imported = await this.Service('import').importAll(testFile)\n\n\t\tassert.isTruthy(imported.vcModel)\n\t\tassert.isTruthy(imported.vcId)\n\t}\n\n\t@test()\n\tprotected static async typesViewControllerOptions() {\n\t\tconst viewsFile = this.resolveHashSprucePath('views', 'views.ts')\n\t\tconst viewContents = diskUtil.readFile(viewsFile)\n\n\t\tassert.doesInclude(viewContents, `interface ViewControllerOptionsMap`)\n\t\tassert.doesInclude(\n\t\t\tviewContents,\n\t\t\t`'testing-views.appointments-card': ConstructorParameters<typeof AppointmentsCardViewController>[0]`\n\t\t)\n\t}\n\n\t@test()\n\tprotected static async typesSkillViewControllerLoadOptionsOptions() {\n\t\tconst viewsFile = this.resolveHashSprucePath('views', 'views.ts')\n\t\tconst viewContents = diskUtil.readFile(viewsFile)\n\n\t\tassert.doesInclude(viewContents, `interface SkillViewControllerArgsMap`)\n\t\tassert.doesInclude(\n\t\t\tviewContents,\n\t\t\t`type LoadOptions<Args extends Record<string,any>[]> = Args[0]['args'] extends Record<string, any> ? Args[0]['args'] : Record<never, any>`\n\t\t)\n\t\tassert.doesInclude(\n\t\t\tviewContents,\n\t\t\t`'testing-views.root': LoadOptions<Parameters<RootSkillViewController['load']>>`\n\t\t)\n\t}\n\n\tprivate static buildTestfile(options: {\n\t\tcode: string\n\t\tidInterfaceName: 'SkillViewControllerId' | 'ViewControllerId'\n\t}) {\n\t\tconst { code, idInterfaceName } = options\n\n\t\treturn (\n\t\t\t`\nimport ` +\n\t\t\t`'#spruce/views/views'\nimport {\n\tViewControllerFactory,\n\tAuthenticatorImpl,\n\tStubStorage,\n\t${idInterfaceName},\n} from '@sprucelabs/heartwood-view-controllers'\nimport { vcDiskUtil } from '@sprucelabs/spruce-test-fixtures'\n\nAuthenticatorImpl.setStorage(new StubStorage())\n\nconst vcFactory = ViewControllerFactory.Factory({\n\tcontrollerMap: vcDiskUtil.loadViewControllersAndBuildMap('testing-views', __dirname),\n\tdevice: {} as any,\n\tconnectToApi: async () => {\n\t\treturn 'yes' as any\n\t},\n})\n${code}\n\t\t`.trim()\n\t\t)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAGA;;AACA;;;;;;;;IAEqBA,sB,WAYnB,IAAAC,eAAA,G,UAKA,IAAAA,eAAA,G,UAoBA,IAAAA,eAAA,G,UAeA,IAAAA,eAAA,G,UAiBA,IAAAA,eAAA,G,UAKA,IAAAA,eAAA,G,UASA,IAAAA,eAAA,G,UAcA,IAAAA,eAAA,G,UA6BA,IAAAA,eAAA,G,WA4BA,IAAAA,eAAA,G,WASA,IAAAA,eAAA,G,WAmBA,IAAAA,eAAA,G,WAmBA,IAAAA,eAAA,G,WAYA,IAAAA,eAAA,G;;;;;;;;;;;;;sGA9MD;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA;;cAAA;gBAEC,KAAKC,MAAL,GAAc,KAAKC,MAAL,CAAY,MAAZ,EAAoB,QAApB,CAAd;;cAFD;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;WAKA,2BACmC;MAClCC,iBAAA,CAAOC,UAAP,CAAkB,KAAKH,MAAL,CAAYI,OAA9B;IACA;;;;+HAED;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA,OAEwB,KAAKC,mBAAL,EAFxB;;cAAA;gBAEOC,QAFP;gBAGOC,IAHP,GAGcD,QAAQ,CAACE,UAAT,CAAoB,MAApB,CAHd;;gBAICN,iBAAA,CAAOO,WAAP,CAAmBF,IAAI,CAACG,YAAxB,EAAsC,CACrC;kBACC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;;;;;;;;;;;sHAmBA;QAAA;QAAA;UAAA;YAAA;cAAA;gBAEOC,SAFP,GAEmB,KAAKC,qBAAL,CAA2B,OAA3B,EAAoC,UAApC,CAFnB;gBAGOC,YAHP,GAGsB3B,0BAAA,CAASC,QAAT,CAAkBwB,SAAlB,CAHtB;;gBAKCxD,iBAAA,CAAO2B,WAAP,CAAmB+B,YAAnB;;gBACA1D,iBAAA,CAAO2B,WAAP,CACC+B,YADD;;cAND;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;;sIAYA;QAAA;QAAA;UAAA;YAAA;cAAA;gBAEOF,SAFP,GAEmB,KAAKC,qBAAL,CAA2B,OAA3B,EAAoC,UAApC,CAFnB;gBAGOC,YAHP,GAGsB3B,0BAAA,CAASC,QAAT,CAAkBwB,SAAlB,CAHtB;;gBAKCxD,iBAAA,CAAO2B,WAAP,CAAmB+B,YAAnB;;gBACA1D,iBAAA,CAAO2B,WAAP,CACC+B,YADD;;gBAIA1D,iBAAA,CAAO2B,WAAP,CACC+B,YADD;;cAVD;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;WAgBA,uBAA6BjB,OAA7B,EAGG;MACF,IAAQhC,IAAR,GAAkCgC,OAAlC,CAAQhC,IAAR;MAAA,IAAcqC,eAAd,GAAkCL,OAAlC,CAAcK,eAAd;MAEA,OACC,cAEA,6GAKAA,eALA,yZAkBDrC,IAlBC,YAmBCkD,IAnBD,EAHD;IAwBA;;;EAnQkDC,8B,8DAClB,O"}
|
|
@@ -27,8 +27,6 @@ var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/
|
|
|
27
27
|
|
|
28
28
|
var _spruceSkillUtils = require("@sprucelabs/spruce-skill-utils");
|
|
29
29
|
|
|
30
|
-
var _test = require("@sprucelabs/test");
|
|
31
|
-
|
|
32
30
|
var _testUtils = require("@sprucelabs/test-utils");
|
|
33
31
|
|
|
34
32
|
var _AbstractSkillTest2 = _interopRequireDefault(require("../../../tests/AbstractSkillTest"));
|
|
@@ -39,7 +37,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
39
37
|
|
|
40
38
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
41
39
|
|
|
42
|
-
var CreatingAThemeTest = (_dec = (0,
|
|
40
|
+
var CreatingAThemeTest = (_dec = (0, _testUtils.test)(), _dec2 = (0, _testUtils.test)(), _dec3 = (0, _testUtils.test)(), _dec4 = (0, _testUtils.test)(), _dec5 = (0, _testUtils.test)(), _dec6 = (0, _testUtils.test)(), (_class = (_class2 = /*#__PURE__*/function (_AbstractSkillTest) {
|
|
43
41
|
(0, _inherits2["default"])(CreatingAThemeTest, _AbstractSkillTest);
|
|
44
42
|
|
|
45
43
|
var _super = _createSuper(CreatingAThemeTest);
|
|
@@ -57,7 +55,7 @@ var CreatingAThemeTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _
|
|
|
57
55
|
while (1) {
|
|
58
56
|
switch (_context.prev = _context.next) {
|
|
59
57
|
case 0:
|
|
60
|
-
|
|
58
|
+
_testUtils.assert.isFunction(this.Action('view', 'createTheme').execute);
|
|
61
59
|
|
|
62
60
|
case 1:
|
|
63
61
|
case "end":
|
|
@@ -94,9 +92,9 @@ var CreatingAThemeTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _
|
|
|
94
92
|
case 4:
|
|
95
93
|
results = _context2.sent;
|
|
96
94
|
|
|
97
|
-
|
|
95
|
+
_testUtils.assert.isFalsy(results.errors);
|
|
98
96
|
|
|
99
|
-
|
|
97
|
+
_testUtils.assert.isTrue(_spruceSkillUtils.diskUtil.doesFileExist(this.resolveHashSprucePath('events/events.contract.ts')));
|
|
100
98
|
|
|
101
99
|
case 7:
|
|
102
100
|
case "end":
|
|
@@ -120,7 +118,7 @@ var CreatingAThemeTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _
|
|
|
120
118
|
while (1) {
|
|
121
119
|
switch (_context3.prev = _context3.next) {
|
|
122
120
|
case 0:
|
|
123
|
-
|
|
121
|
+
_testUtils.assert.isTrue(_spruceSkillUtils.diskUtil.doesFileExist(this.getThemePath()));
|
|
124
122
|
|
|
125
123
|
case 1:
|
|
126
124
|
case "end":
|
|
@@ -151,9 +149,9 @@ var CreatingAThemeTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _
|
|
|
151
149
|
case 2:
|
|
152
150
|
imported = _context4.sent;
|
|
153
151
|
|
|
154
|
-
|
|
152
|
+
_testUtils.assert.isTruthy(imported);
|
|
155
153
|
|
|
156
|
-
|
|
154
|
+
_testUtils.assert.isTrue('color1' in imported);
|
|
157
155
|
|
|
158
156
|
case 5:
|
|
159
157
|
case "end":
|
|
@@ -184,7 +182,7 @@ var CreatingAThemeTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _
|
|
|
184
182
|
case 2:
|
|
185
183
|
results = _context5.sent;
|
|
186
184
|
|
|
187
|
-
|
|
185
|
+
_testUtils.assert.isTruthy(results.errors);
|
|
188
186
|
|
|
189
187
|
_testUtils.errorAssert.assertError(results.errors[0], 'THEME_EXISTS');
|
|
190
188
|
|
|
@@ -248,7 +246,7 @@ var CreatingAThemeTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), _
|
|
|
248
246
|
return this.Action('view', 'createTheme').execute({});
|
|
249
247
|
|
|
250
248
|
case 7:
|
|
251
|
-
|
|
249
|
+
_testUtils.assert.isEqual(hitCount, 0);
|
|
252
250
|
|
|
253
251
|
case 8:
|
|
254
252
|
case "end":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreatingATheme.test.js","names":["CreatingAThemeTest","test","assert","isFunction","Action","execute","getSkillFixture","registerCurrentSkill","name","results","isFalsy","errors","isTrue","diskUtil","doesFileExist","resolveHashSprucePath","getThemePath","Service","importDefault","imported","isTruthy","errorAssert","assertError","emitter","getEmitter","hitCount","deleteFile","on","payload","featureCode","actionCode","isEqual","resolvePath","AbstractSkillTest"],"sources":["../../../../src/__tests__/behavioral/views/CreatingATheme.test.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport AbstractSkillTest from '../../../tests/AbstractSkillTest'\n\nexport default class CreatingAThemeTest extends AbstractSkillTest {\n\tprotected static skillCacheKey = 'views'\n\n\t@test()\n\tprotected static async hasCreateThemeAction() {\n\t\tassert.isFunction(this.Action('view', 'createTheme').execute)\n\t}\n\n\t@test()\n\tprotected static async syncsEventsFirst() {\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'current skill in creating a theme',\n\t\t})\n\n\t\tconst results = await this.Action('view', 'createTheme').execute({})\n\t\tassert.isFalsy(results.errors)\n\n\t\tassert.isTrue(\n\t\t\tdiskUtil.doesFileExist(\n\t\t\t\tthis.resolveHashSprucePath('events/events.contract.ts')\n\t\t\t)\n\t\t)\n\t}\n\n\t@test()\n\tprotected static async makesThemeFile() {\n\t\tassert.isTrue(diskUtil.doesFileExist(this.getThemePath()))\n\t}\n\n\t@test()\n\tprotected static async makesValidThemeFile() {\n\t\tconst imported = await this.Service('import').importDefault(\n\t\t\tthis.getThemePath()\n\t\t)\n\n\t\tassert.isTruthy(imported)\n\t\tassert.isTrue('color1' in imported)\n\t}\n\n\t@test()\n\tprotected static async cantRunTwice() {\n\t\tconst results = await this.Action('view', 'createTheme').execute({})\n\t\tassert.isTruthy(results.errors)\n\t\terrorAssert.assertError(results.errors[0], 'THEME_EXISTS')\n\t}\n\n\t@test()\n\tprotected static async doesNotSyncEventsIfAlreadySynced() {\n\t\tconst emitter = this.getEmitter()\n\t\tlet hitCount = 0\n\n\t\tdiskUtil.deleteFile(this.getThemePath())\n\n\t\tawait emitter.on('feature.will-execute', async (payload) => {\n\t\t\tconst { featureCode, actionCode } = payload\n\n\t\t\tif (featureCode === 'event' && actionCode === 'sync') {\n\t\t\t\thitCount++\n\t\t\t}\n\t\t})\n\n\t\tawait this.Action('view', 'createTheme').execute({})\n\n\t\tassert.isEqual(hitCount, 0)\n\t}\n\n\tprivate static getThemePath(): string {\n\t\treturn this.resolvePath('src', 'themes', 'skill.theme.ts')\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;
|
|
1
|
+
{"version":3,"file":"CreatingATheme.test.js","names":["CreatingAThemeTest","test","assert","isFunction","Action","execute","getSkillFixture","registerCurrentSkill","name","results","isFalsy","errors","isTrue","diskUtil","doesFileExist","resolveHashSprucePath","getThemePath","Service","importDefault","imported","isTruthy","errorAssert","assertError","emitter","getEmitter","hitCount","deleteFile","on","payload","featureCode","actionCode","isEqual","resolvePath","AbstractSkillTest"],"sources":["../../../../src/__tests__/behavioral/views/CreatingATheme.test.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test-utils'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport AbstractSkillTest from '../../../tests/AbstractSkillTest'\n\nexport default class CreatingAThemeTest extends AbstractSkillTest {\n\tprotected static skillCacheKey = 'views'\n\n\t@test()\n\tprotected static async hasCreateThemeAction() {\n\t\tassert.isFunction(this.Action('view', 'createTheme').execute)\n\t}\n\n\t@test()\n\tprotected static async syncsEventsFirst() {\n\t\tawait this.getSkillFixture().registerCurrentSkill({\n\t\t\tname: 'current skill in creating a theme',\n\t\t})\n\n\t\tconst results = await this.Action('view', 'createTheme').execute({})\n\t\tassert.isFalsy(results.errors)\n\n\t\tassert.isTrue(\n\t\t\tdiskUtil.doesFileExist(\n\t\t\t\tthis.resolveHashSprucePath('events/events.contract.ts')\n\t\t\t)\n\t\t)\n\t}\n\n\t@test()\n\tprotected static async makesThemeFile() {\n\t\tassert.isTrue(diskUtil.doesFileExist(this.getThemePath()))\n\t}\n\n\t@test()\n\tprotected static async makesValidThemeFile() {\n\t\tconst imported = await this.Service('import').importDefault(\n\t\t\tthis.getThemePath()\n\t\t)\n\n\t\tassert.isTruthy(imported)\n\t\tassert.isTrue('color1' in imported)\n\t}\n\n\t@test()\n\tprotected static async cantRunTwice() {\n\t\tconst results = await this.Action('view', 'createTheme').execute({})\n\t\tassert.isTruthy(results.errors)\n\t\terrorAssert.assertError(results.errors[0], 'THEME_EXISTS')\n\t}\n\n\t@test()\n\tprotected static async doesNotSyncEventsIfAlreadySynced() {\n\t\tconst emitter = this.getEmitter()\n\t\tlet hitCount = 0\n\n\t\tdiskUtil.deleteFile(this.getThemePath())\n\n\t\tawait emitter.on('feature.will-execute', async (payload) => {\n\t\t\tconst { featureCode, actionCode } = payload\n\n\t\t\tif (featureCode === 'event' && actionCode === 'sync') {\n\t\t\t\thitCount++\n\t\t\t}\n\t\t})\n\n\t\tawait this.Action('view', 'createTheme').execute({})\n\n\t\tassert.isEqual(hitCount, 0)\n\t}\n\n\tprivate static getThemePath(): string {\n\t\treturn this.resolvePath('src', 'themes', 'skill.theme.ts')\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAEA;;;;;;;;IAEqBA,kB,WAGnB,IAAAC,eAAA,G,UAKA,IAAAA,eAAA,G,UAgBA,IAAAA,eAAA,G,UAKA,IAAAA,eAAA,G,UAUA,IAAAA,eAAA,G,UAOA,IAAAA,eAAA,G;;;;;;;;;;;;;gHA3CD;QAAA;UAAA;YAAA;cAAA;gBAECC,iBAAA,CAAOC,UAAP,CAAkB,KAAKC,MAAL,CAAY,MAAZ,EAAoB,aAApB,EAAmCC,OAArD;;cAFD;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;;4GAKA;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA,OAEO,KAAKC,eAAL,GAAuB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QAAA;MAAA,C;;;;;;;;;;;4HAOA;QAAA;QAAA;UAAA;YAAA;cAAA;gBAEOY,OAFP,GAEiB,KAAKC,UAAL,EAFjB;gBAGKC,QAHL,GAGgB,CAHhB;;gBAKCZ,0BAAA,CAASa,UAAT,CAAoB,KAAKV,YAAL,EAApB;;gBALD;gBAAA,OAOOO,OAAO,CAACI,EAAR,CAAW,sBAAX;kBAAA,yFAAmC,kBAAOC,OAAP;oBAAA;oBAAA;sBAAA;wBAAA;0BAAA;4BAChCC,WADgC,GACJD,OADI,CAChCC,WADgC,EACnBC,UADmB,GACJF,OADI,CACnBE,UADmB;;4BAGxC,IAAID,WAAW,KAAK,OAAhB,IAA2BC,UAAU,KAAK,MAA9C,EAAsD;8BACrDL,QAAQ;4BACR;;0BALuC;0BAAA;4BAAA;wBAAA;sBAAA;oBAAA;kBAAA,CAAnC;;kBAAA;oBAAA;kBAAA;gBAAA,IAPP;;cAAA;gBAAA;gBAAA,OAeO,KAAKrB,MAAL,CAAY,MAAZ,EAAoB,aAApB,EAAmCC,OAAnC,CAA2C,EAA3C,CAfP;;cAAA;gBAiBCH,iBAAA,CAAO6B,OAAP,CAAeN,QAAf,EAAyB,CAAzB;;cAjBD;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;WAoBA,wBAAsC;MACrC,OAAO,KAAKO,WAAL,CAAiB,KAAjB,EAAwB,QAAxB,EAAkC,gBAAlC,CAAP;IACA;;;EApE8CC,8B,8DACd,O"}
|
|
@@ -27,11 +27,11 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
27
27
|
|
|
28
28
|
var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/helpers/applyDecoratedDescriptor"));
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _testUtils = require("@sprucelabs/test-utils");
|
|
31
31
|
|
|
32
32
|
var _AbstractSkillTest2 = _interopRequireDefault(require("../../../tests/AbstractSkillTest"));
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _test = _interopRequireDefault(require("../../../tests/utilities/test.utility"));
|
|
35
35
|
|
|
36
36
|
var _dec, _dec2, _dec3, _dec4, _class, _class2;
|
|
37
37
|
|
|
@@ -39,7 +39,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
39
39
|
|
|
40
40
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
41
41
|
|
|
42
|
-
var KeepingViewsInSyncTest = (_dec = (0,
|
|
42
|
+
var KeepingViewsInSyncTest = (_dec = (0, _testUtils.test)(), _dec2 = (0, _testUtils.test)(), _dec3 = (0, _testUtils.test)(), _dec4 = (0, _testUtils.test)(), (_class = (_class2 = /*#__PURE__*/function (_AbstractSkillTest) {
|
|
43
43
|
(0, _inherits2["default"])(KeepingViewsInSyncTest, _AbstractSkillTest);
|
|
44
44
|
|
|
45
45
|
var _super = _createSuper(KeepingViewsInSyncTest);
|
|
@@ -85,7 +85,7 @@ var KeepingViewsInSyncTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(
|
|
|
85
85
|
while (1) {
|
|
86
86
|
switch (_context2.prev = _context2.next) {
|
|
87
87
|
case 0:
|
|
88
|
-
|
|
88
|
+
_testUtils.assert.isFunction(this.action.execute);
|
|
89
89
|
|
|
90
90
|
case 1:
|
|
91
91
|
case "end":
|
|
@@ -116,9 +116,9 @@ var KeepingViewsInSyncTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(
|
|
|
116
116
|
case 2:
|
|
117
117
|
results = _context3.sent;
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
_testUtils.assert.isFalsy(results.errors);
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
_testUtils.assert.isFalsy(results.files);
|
|
122
122
|
|
|
123
123
|
case 5:
|
|
124
124
|
case "end":
|
|
@@ -187,7 +187,7 @@ var KeepingViewsInSyncTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(
|
|
|
187
187
|
case 2:
|
|
188
188
|
results = _context5.sent;
|
|
189
189
|
|
|
190
|
-
|
|
190
|
+
_testUtils.assert.isFalsy(results.errors);
|
|
191
191
|
|
|
192
192
|
_context5.next = 6;
|
|
193
193
|
return this.assertValuedViewsFile(results);
|
|
@@ -215,7 +215,7 @@ var KeepingViewsInSyncTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(
|
|
|
215
215
|
while (1) {
|
|
216
216
|
switch (_context6.prev = _context6.next) {
|
|
217
217
|
case 0:
|
|
218
|
-
match =
|
|
218
|
+
match = _test["default"].assertFileByPathInGeneratedFiles("views/views.ts", results.files);
|
|
219
219
|
_context6.next = 3;
|
|
220
220
|
return this.Service('typeChecker').check(match);
|
|
221
221
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeepingViewsInSync.test.js","names":["KeepingViewsInSyncTest","test","action","Action","assert","isFunction","execute","results","isFalsy","errors","files","viewType","isRoot","assertValuedViewsFile","nameReadable","viewModel","match","testUtil","assertFileByPathInGeneratedFiles","Service","check","AbstractSkillTest"],"sources":["../../../../src/__tests__/behavioral/views/KeepingViewsInSync.test.ts"],"sourcesContent":["import { test, assert } from '@sprucelabs/test'\nimport { FeatureActionResponse } from '../../../features/features.types'\nimport SyncAction from '../../../features/view/actions/SyncAction'\nimport AbstractSkillTest from '../../../tests/AbstractSkillTest'\nimport testUtil from '../../../tests/utilities/test.utility'\n\nexport default class KeepingViewsInSyncTest extends AbstractSkillTest {\n\tprotected static skillCacheKey = 'views'\n\tprivate static action: SyncAction\n\n\tprotected static async beforeEach() {\n\t\tawait super.beforeEach()\n\t\tthis.action = this.Action('view', 'sync')\n\t}\n\n\t@test()\n\tprotected static async hasSyncAction() {\n\t\tassert.isFunction(this.action.execute)\n\t}\n\n\t@test()\n\tprotected static async syncingWithNoViewsGeneratesNothing() {\n\t\tconst results = await this.action.execute({})\n\t\tassert.isFalsy(results.errors)\n\t\tassert.isFalsy(results.files)\n\t}\n\n\t@test()\n\tprotected static async createsValidCombinedEventsFileWhenCreatingANewSvc() {\n\t\tconst results = await this.Action('view', 'create').execute({\n\t\t\tviewType: 'skillView',\n\t\t\tisRoot: true,\n\t\t})\n\n\t\tawait this.assertValuedViewsFile(results)\n\t}\n\n\t@test()\n\tprotected static async generatesValidTypesFileWithNoSkillViewsC() {\n\t\tconst results = await this.Action('view', 'create').execute({\n\t\t\tviewType: 'view',\n\t\t\tnameReadable: 'test',\n\t\t\tviewModel: 'Card',\n\t\t})\n\t\tassert.isFalsy(results.errors)\n\t\tawait this.assertValuedViewsFile(results)\n\t}\n\n\tprivate static async assertValuedViewsFile(results: FeatureActionResponse) {\n\t\tconst match = testUtil.assertFileByPathInGeneratedFiles(\n\t\t\t`views/views.ts`,\n\t\t\tresults.files\n\t\t)\n\n\t\tawait this.Service('typeChecker').check(match)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAGA;;AACA;;;;;;;;IAEqBA,sB,WASnB,IAAAC,
|
|
1
|
+
{"version":3,"file":"KeepingViewsInSync.test.js","names":["KeepingViewsInSyncTest","test","action","Action","assert","isFunction","execute","results","isFalsy","errors","files","viewType","isRoot","assertValuedViewsFile","nameReadable","viewModel","match","testUtil","assertFileByPathInGeneratedFiles","Service","check","AbstractSkillTest"],"sources":["../../../../src/__tests__/behavioral/views/KeepingViewsInSync.test.ts"],"sourcesContent":["import { test, assert } from '@sprucelabs/test-utils'\nimport { FeatureActionResponse } from '../../../features/features.types'\nimport SyncAction from '../../../features/view/actions/SyncAction'\nimport AbstractSkillTest from '../../../tests/AbstractSkillTest'\nimport testUtil from '../../../tests/utilities/test.utility'\n\nexport default class KeepingViewsInSyncTest extends AbstractSkillTest {\n\tprotected static skillCacheKey = 'views'\n\tprivate static action: SyncAction\n\n\tprotected static async beforeEach() {\n\t\tawait super.beforeEach()\n\t\tthis.action = this.Action('view', 'sync')\n\t}\n\n\t@test()\n\tprotected static async hasSyncAction() {\n\t\tassert.isFunction(this.action.execute)\n\t}\n\n\t@test()\n\tprotected static async syncingWithNoViewsGeneratesNothing() {\n\t\tconst results = await this.action.execute({})\n\t\tassert.isFalsy(results.errors)\n\t\tassert.isFalsy(results.files)\n\t}\n\n\t@test()\n\tprotected static async createsValidCombinedEventsFileWhenCreatingANewSvc() {\n\t\tconst results = await this.Action('view', 'create').execute({\n\t\t\tviewType: 'skillView',\n\t\t\tisRoot: true,\n\t\t})\n\n\t\tawait this.assertValuedViewsFile(results)\n\t}\n\n\t@test()\n\tprotected static async generatesValidTypesFileWithNoSkillViewsC() {\n\t\tconst results = await this.Action('view', 'create').execute({\n\t\t\tviewType: 'view',\n\t\t\tnameReadable: 'test',\n\t\t\tviewModel: 'Card',\n\t\t})\n\t\tassert.isFalsy(results.errors)\n\t\tawait this.assertValuedViewsFile(results)\n\t}\n\n\tprivate static async assertValuedViewsFile(results: FeatureActionResponse) {\n\t\tconst match = testUtil.assertFileByPathInGeneratedFiles(\n\t\t\t`views/views.ts`,\n\t\t\tresults.files\n\t\t)\n\n\t\tawait this.Service('typeChecker').check(match)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAGA;;AACA;;;;;;;;IAEqBA,sB,WASnB,IAAAC,eAAA,G,UAKA,IAAAA,eAAA,G,UAOA,IAAAA,eAAA,G,UAUA,IAAAA,eAAA,G;;;;;;;;;;;;;sGA3BD;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA;;cAAA;gBAEC,KAAKC,MAAL,GAAc,KAAKC,MAAL,CAAY,MAAZ,EAAoB,MAApB,CAAd;;cAFD;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;;yGAKA;QAAA;UAAA;YAAA;cAAA;gBAECC,iBAAA,CAAOC,UAAP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gCAAT,mBAEbX,OAAO,CAACG,KAFK,CADf;gBAAA;gBAAA,OAMO,KAAKS,OAAL,CAAa,aAAb,EAA4BC,KAA5B,CAAkCJ,KAAlC,CANP;;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;EA1CmDK,8B,8DAClB,O"}
|
|
@@ -23,7 +23,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
23
23
|
|
|
24
24
|
var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/helpers/applyDecoratedDescriptor"));
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _testUtils = require("@sprucelabs/test-utils");
|
|
27
27
|
|
|
28
28
|
var _AbstractCliTest2 = _interopRequireDefault(require("../../../tests/AbstractCliTest"));
|
|
29
29
|
|
|
@@ -33,7 +33,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
33
33
|
|
|
34
34
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
35
35
|
|
|
36
|
-
var SettingUpViewsTest = (_dec = (0,
|
|
36
|
+
var SettingUpViewsTest = (_dec = (0, _testUtils.test)(), _dec2 = (0, _testUtils.test)(), (_class = /*#__PURE__*/function (_AbstractCliTest) {
|
|
37
37
|
(0, _inherits2["default"])(SettingUpViewsTest, _AbstractCliTest);
|
|
38
38
|
|
|
39
39
|
var _super = _createSuper(SettingUpViewsTest);
|
|
@@ -59,7 +59,7 @@ var SettingUpViewsTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), (
|
|
|
59
59
|
cli = _context.sent;
|
|
60
60
|
feature = cli.getFeature('view');
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
_testUtils.assert.isTruthy(feature);
|
|
63
63
|
|
|
64
64
|
case 5:
|
|
65
65
|
case "end":
|
|
@@ -102,9 +102,9 @@ var SettingUpViewsTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.test)(), (
|
|
|
102
102
|
case 4:
|
|
103
103
|
dependencies = this.Service('dependency').get();
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
_testUtils.assert.isLength(dependencies, 1);
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
_testUtils.assert.isEqual(dependencies[0].namespace, 'heartwood');
|
|
108
108
|
|
|
109
109
|
case 7:
|
|
110
110
|
case "end":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingUpViews.test.js","names":["SettingUpViewsTest","test","Cli","cli","feature","getFeature","assert","isTruthy","FeatureFixture","installFeatures","code","options","name","description","people","loginAsDemoPerson","dependencies","Service","get","isLength","isEqual","namespace","AbstractCliTest"],"sources":["../../../../src/__tests__/behavioral/views/SettingUpViews.test.ts"],"sourcesContent":["import { test, assert } from '@sprucelabs/test'\nimport AbstractCliTest from '../../../tests/AbstractCliTest'\n\nexport default class SettingUpViewsTest extends AbstractCliTest {\n\t@test()\n\tprotected static async canGetViewFeature() {\n\t\tconst cli = await this.Cli()\n\t\tconst feature = cli.getFeature('view')\n\t\tassert.isTruthy(feature)\n\t}\n\n\t@test()\n\tprotected static async installingViewsAddsHeartwoodAsDependency() {\n\t\tawait this.FeatureFixture().installFeatures([\n\t\t\t{\n\t\t\t\tcode: 'skill',\n\t\t\t\toptions: {\n\t\t\t\t\tname: 'testing views',\n\t\t\t\t\tdescription: 'this too, is a great test!',\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tcode: 'view',\n\t\t\t},\n\t\t])\n\n\t\tawait this.people.loginAsDemoPerson()\n\n\t\tconst dependencies = this.Service('dependency').get()\n\t\tassert.isLength(dependencies, 1)\n\n\t\tassert.isEqual(dependencies[0].namespace, 'heartwood')\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;;;;;;;IAEqBA,kB,WACnB,IAAAC,
|
|
1
|
+
{"version":3,"file":"SettingUpViews.test.js","names":["SettingUpViewsTest","test","Cli","cli","feature","getFeature","assert","isTruthy","FeatureFixture","installFeatures","code","options","name","description","people","loginAsDemoPerson","dependencies","Service","get","isLength","isEqual","namespace","AbstractCliTest"],"sources":["../../../../src/__tests__/behavioral/views/SettingUpViews.test.ts"],"sourcesContent":["import { test, assert } from '@sprucelabs/test-utils'\nimport AbstractCliTest from '../../../tests/AbstractCliTest'\n\nexport default class SettingUpViewsTest extends AbstractCliTest {\n\t@test()\n\tprotected static async canGetViewFeature() {\n\t\tconst cli = await this.Cli()\n\t\tconst feature = cli.getFeature('view')\n\t\tassert.isTruthy(feature)\n\t}\n\n\t@test()\n\tprotected static async installingViewsAddsHeartwoodAsDependency() {\n\t\tawait this.FeatureFixture().installFeatures([\n\t\t\t{\n\t\t\t\tcode: 'skill',\n\t\t\t\toptions: {\n\t\t\t\t\tname: 'testing views',\n\t\t\t\t\tdescription: 'this too, is a great test!',\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tcode: 'view',\n\t\t\t},\n\t\t])\n\n\t\tawait this.people.loginAsDemoPerson()\n\n\t\tconst dependencies = this.Service('dependency').get()\n\t\tassert.isLength(dependencies, 1)\n\n\t\tassert.isEqual(dependencies[0].namespace, 'heartwood')\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;;;;;;;IAEqBA,kB,WACnB,IAAAC,eAAA,G,UAOA,IAAAA,eAAA,G;;;;;;;;;;;;;6GAPD;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA,OAEmB,KAAKC,GAAL,EAFnB;;cAAA;gBAEOC,GAFP;gBAGOC,OAHP,GAGiBD,GAAG,CAACE,UAAJ,CAAe,MAAf,CAHjB;;gBAICC,iBAAA,CAAOC,QAAP,CAAgBH,OAAhB;;cAJD;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;;oIAOA;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA,OAEO,KAAKI,cAAL,GAAsBC,eAAtB,CAAsC,CAC3C;kBACCC,IAAI,EAAE,OADP;kBAECC,OAAO,EAAE;oBACRC,IAAI,EAAE,eADE;oBAERC,WAAW,EAAE;kBAFL;gBAFV,CAD2C,EAQ3C;kBACCH,IAAI,EAAE;gBADP,CAR2C,CAAtC,CAFP;;cAAA;gBAAA;gBAAA,OAeO,KAAKI,MAAL,CAAYC,iBAAZ,EAfP;;cAAA;gBAiBOC,YAjBP,GAiBsB,KAAKC,OAAL,CAAa,YAAb,EAA2BC,GAA3B,EAjBtB;;gBAkBCZ,iBAAA,CAAOa,QAAP,CAAgBH,YAAhB,EAA8B,CAA9B;;gBAEAV,iBAAA,CAAOc,OAAP,CAAeJ,YAAY,CAAC,CAAD,CAAZ,CAAgBK,SAA/B,EAA0C,WAA1C;;cApBD;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA,C;;;;;;;;;;EAR+CC,4B"}
|
|
@@ -29,13 +29,13 @@ var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/
|
|
|
29
29
|
|
|
30
30
|
var _spruceSkillUtils = require("@sprucelabs/spruce-skill-utils");
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _testUtils = require("@sprucelabs/test-utils");
|
|
33
33
|
|
|
34
34
|
var _LintService = _interopRequireDefault(require("../../../services/LintService"));
|
|
35
35
|
|
|
36
36
|
var _AbstractSkillTest2 = _interopRequireDefault(require("../../../tests/AbstractSkillTest"));
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _test = _interopRequireDefault(require("../../../tests/utilities/test.utility"));
|
|
39
39
|
|
|
40
40
|
var _dec, _dec2, _dec3, _class, _class2;
|
|
41
41
|
|
|
@@ -43,7 +43,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
43
43
|
|
|
44
44
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
45
45
|
|
|
46
|
-
var TestingViewControllersTest = (_dec = (0,
|
|
46
|
+
var TestingViewControllersTest = (_dec = (0, _testUtils.test)(), _dec2 = (0, _testUtils.test)(), _dec3 = (0, _testUtils.test)(), (_class = (_class2 = /*#__PURE__*/function (_AbstractSkillTest) {
|
|
47
47
|
(0, _inherits2["default"])(TestingViewControllersTest, _AbstractSkillTest);
|
|
48
48
|
|
|
49
49
|
var _super = _createSuper(TestingViewControllersTest);
|
|
@@ -112,7 +112,7 @@ var TestingViewControllersTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.te
|
|
|
112
112
|
case 5:
|
|
113
113
|
last = this.ui.getLastInvocation();
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
_testUtils.assert.doesInclude(last.options.options.choices, {
|
|
116
116
|
label: 'AbstractViewControllerTest (requires install)'
|
|
117
117
|
});
|
|
118
118
|
|
|
@@ -148,7 +148,7 @@ var TestingViewControllersTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.te
|
|
|
148
148
|
case 3:
|
|
149
149
|
last = this.ui.getLastInvocation();
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
_testUtils.assert.doesInclude(last.options.options.choices, {
|
|
152
152
|
label: 'AbstractViewControllerTest'
|
|
153
153
|
});
|
|
154
154
|
|
|
@@ -191,14 +191,14 @@ var TestingViewControllersTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.te
|
|
|
191
191
|
case 6:
|
|
192
192
|
results = _context5.sent;
|
|
193
193
|
|
|
194
|
-
|
|
194
|
+
_testUtils.assert.isFalsy(results.errors);
|
|
195
195
|
|
|
196
|
-
match =
|
|
196
|
+
match = _test["default"].assertFileByNameInGeneratedFiles('RenderingRootViewController.test.ts', results.files);
|
|
197
197
|
contents = _spruceSkillUtils.diskUtil.readFile(match);
|
|
198
198
|
|
|
199
|
-
|
|
199
|
+
_testUtils.assert.doesInclude(contents, 'RenderingRootViewControllerTest extends AbstractViewControllerTest');
|
|
200
200
|
|
|
201
|
-
|
|
201
|
+
_testUtils.assert.doesInclude(contents, "import { AbstractViewControllerTest } from '@sprucelabs/spruce-view-plugin'");
|
|
202
202
|
|
|
203
203
|
_context5.next = 14;
|
|
204
204
|
return this.Service('build').build();
|
|
@@ -212,11 +212,11 @@ var TestingViewControllersTest = (_dec = (0, _test.test)(), _dec2 = (0, _test.te
|
|
|
212
212
|
case 16:
|
|
213
213
|
testResults = _context5.sent;
|
|
214
214
|
|
|
215
|
-
|
|
215
|
+
_testUtils.assert.isArray(testResults.errors);
|
|
216
216
|
|
|
217
|
-
|
|
217
|
+
_testUtils.assert.isLength(testResults.errors, 1);
|
|
218
218
|
|
|
219
|
-
|
|
219
|
+
_testUtils.assert.doesInclude((_testResults$meta = testResults.meta) === null || _testResults$meta === void 0 ? void 0 : _testResults$meta.testResults.testFiles, {
|
|
220
220
|
path: 'behavioral/RenderingRootViewController.test.ts',
|
|
221
221
|
status: 'failed'
|
|
222
222
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestingViewControllers.test.js","names":["TestingViewControllersTest","test","LintService","enableLinting","viewFeature","cli","getFeature","isInstalled","executeCreate","waitForInput","last","ui","getLastInvocation","assert","doesInclude","options","choices","label","reset","promise","selectOptionBasedOnLabel","results","isFalsy","errors","match","testUtil","assertFileByNameInGeneratedFiles","files","contents","diskUtil","readFile","Service","build","Action","execute","shouldReportWhileRunning","testResults","isArray","isLength","meta","testFiles","path","status","type","nameReadable","nameCamel","namePascal","AbstractSkillTest"],"sources":["../../../../src/__tests__/behavioral/views/TestingViewControllers.test.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test'\nimport LintService from '../../../services/LintService'\nimport AbstractSkillTest from '../../../tests/AbstractSkillTest'\nimport testUtil from '../../../tests/utilities/test.utility'\n\nexport default class TestingViewControllersTest extends AbstractSkillTest {\n\tprotected static skillCacheKey = 'viewsWithTests'\n\n\tprotected static async beforeEach() {\n\t\tawait super.beforeEach()\n\t\tLintService.enableLinting()\n\t}\n\n\t@test()\n\tprotected static async showsNotInstalled() {\n\t\tconst viewFeature = this.cli.getFeature('view')\n\t\tviewFeature.isInstalled = async () => false\n\n\t\tvoid this.executeCreate()\n\n\t\tawait this.waitForInput()\n\n\t\tconst last = this.ui.getLastInvocation()\n\t\tassert.doesInclude(last.options.options.choices, {\n\t\t\tlabel: 'AbstractViewControllerTest (requires install)',\n\t\t})\n\n\t\tthis.ui.reset()\n\t}\n\n\t@test()\n\tprotected static async canSelectAbstractTest() {\n\t\tvoid this.executeCreate()\n\n\t\tawait this.waitForInput()\n\n\t\tconst last = this.ui.getLastInvocation()\n\t\tassert.doesInclude(last.options.options.choices, {\n\t\t\tlabel: 'AbstractViewControllerTest',\n\t\t})\n\n\t\tthis.ui.reset()\n\t}\n\n\t@test()\n\tprotected static async testsRun() {\n\t\tconst promise = this.executeCreate()\n\n\t\tawait this.waitForInput()\n\n\t\tthis.selectOptionBasedOnLabel('AbstractViewControllerTest')\n\n\t\tconst results = await promise\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tconst match = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'RenderingRootViewController.test.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tconst contents = diskUtil.readFile(match)\n\t\tassert.doesInclude(\n\t\t\tcontents,\n\t\t\t'RenderingRootViewControllerTest extends AbstractViewControllerTest'\n\t\t)\n\t\tassert.doesInclude(\n\t\t\tcontents,\n\t\t\t\"import { AbstractViewControllerTest } from '@sprucelabs/spruce-view-plugin'\"\n\t\t)\n\n\t\tawait this.Service('build').build()\n\n\t\tconst testResults = await this.Action('test', 'test').execute({\n\t\t\tshouldReportWhileRunning: false,\n\t\t})\n\n\t\tassert.isArray(testResults.errors)\n\t\tassert.isLength(testResults.errors, 1)\n\n\t\tassert.doesInclude(testResults.meta?.testResults.testFiles, {\n\t\t\tpath: 'behavioral/RenderingRootViewController.test.ts',\n\t\t\tstatus: 'failed',\n\t\t})\n\t}\n\n\tprivate static async executeCreate() {\n\t\treturn this.Action('test', 'create').execute({\n\t\t\ttype: 'behavioral',\n\t\t\tnameReadable: 'Rendering root view controller',\n\t\t\tnameCamel: 'renderingRootViewController',\n\t\t\tnamePascal: 'RenderingRootViewController',\n\t\t})\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;IAEqBA,0B,WAQnB,IAAAC,
|
|
1
|
+
{"version":3,"file":"TestingViewControllers.test.js","names":["TestingViewControllersTest","test","LintService","enableLinting","viewFeature","cli","getFeature","isInstalled","executeCreate","waitForInput","last","ui","getLastInvocation","assert","doesInclude","options","choices","label","reset","promise","selectOptionBasedOnLabel","results","isFalsy","errors","match","testUtil","assertFileByNameInGeneratedFiles","files","contents","diskUtil","readFile","Service","build","Action","execute","shouldReportWhileRunning","testResults","isArray","isLength","meta","testFiles","path","status","type","nameReadable","nameCamel","namePascal","AbstractSkillTest"],"sources":["../../../../src/__tests__/behavioral/views/TestingViewControllers.test.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test-utils'\nimport LintService from '../../../services/LintService'\nimport AbstractSkillTest from '../../../tests/AbstractSkillTest'\nimport testUtil from '../../../tests/utilities/test.utility'\n\nexport default class TestingViewControllersTest extends AbstractSkillTest {\n\tprotected static skillCacheKey = 'viewsWithTests'\n\n\tprotected static async beforeEach() {\n\t\tawait super.beforeEach()\n\t\tLintService.enableLinting()\n\t}\n\n\t@test()\n\tprotected static async showsNotInstalled() {\n\t\tconst viewFeature = this.cli.getFeature('view')\n\t\tviewFeature.isInstalled = async () => false\n\n\t\tvoid this.executeCreate()\n\n\t\tawait this.waitForInput()\n\n\t\tconst last = this.ui.getLastInvocation()\n\t\tassert.doesInclude(last.options.options.choices, {\n\t\t\tlabel: 'AbstractViewControllerTest (requires install)',\n\t\t})\n\n\t\tthis.ui.reset()\n\t}\n\n\t@test()\n\tprotected static async canSelectAbstractTest() {\n\t\tvoid this.executeCreate()\n\n\t\tawait this.waitForInput()\n\n\t\tconst last = this.ui.getLastInvocation()\n\t\tassert.doesInclude(last.options.options.choices, {\n\t\t\tlabel: 'AbstractViewControllerTest',\n\t\t})\n\n\t\tthis.ui.reset()\n\t}\n\n\t@test()\n\tprotected static async testsRun() {\n\t\tconst promise = this.executeCreate()\n\n\t\tawait this.waitForInput()\n\n\t\tthis.selectOptionBasedOnLabel('AbstractViewControllerTest')\n\n\t\tconst results = await promise\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tconst match = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'RenderingRootViewController.test.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tconst contents = diskUtil.readFile(match)\n\t\tassert.doesInclude(\n\t\t\tcontents,\n\t\t\t'RenderingRootViewControllerTest extends AbstractViewControllerTest'\n\t\t)\n\t\tassert.doesInclude(\n\t\t\tcontents,\n\t\t\t\"import { AbstractViewControllerTest } from '@sprucelabs/spruce-view-plugin'\"\n\t\t)\n\n\t\tawait this.Service('build').build()\n\n\t\tconst testResults = await this.Action('test', 'test').execute({\n\t\t\tshouldReportWhileRunning: false,\n\t\t})\n\n\t\tassert.isArray(testResults.errors)\n\t\tassert.isLength(testResults.errors, 1)\n\n\t\tassert.doesInclude(testResults.meta?.testResults.testFiles, {\n\t\t\tpath: 'behavioral/RenderingRootViewController.test.ts',\n\t\t\tstatus: 'failed',\n\t\t})\n\t}\n\n\tprivate static async executeCreate() {\n\t\treturn this.Action('test', 'create').execute({\n\t\t\ttype: 'behavioral',\n\t\t\tnameReadable: 'Rendering root view controller',\n\t\t\tnameCamel: 'renderingRootViewController',\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