@sprucelabs/spruce-test-fixtures 62.2.24 → 62.2.26
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/build/esm/index.d.ts +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/tests/fixtures/ViewFixture.d.ts +1 -1
- package/build/esm/tests/routers/TestRouter.d.ts +1 -1
- package/build/esm/tests/routers/TestRouter.js +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.js +1 -1
- package/build/tests/fixtures/ViewFixture.d.ts +1 -1
- package/build/tests/routers/TestRouter.d.ts +1 -1
- package/build/tests/routers/TestRouter.js +1 -1
- package/package.json +19 -19
- package/build/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.d.ts +0 -15
- package/build/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +0 -112
- package/build/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.d.ts +0 -4
- package/build/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +0 -34
- package/build/__tests__/behavioral/DisablingSchemaValidationOnTest.test.d.ts +0 -5
- package/build/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +0 -26
- package/build/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.d.ts +0 -8
- package/build/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +0 -69
- package/build/__tests__/behavioral/FakingEventResponses.test.d.ts +0 -12
- package/build/__tests__/behavioral/FakingEventResponses.test.js +0 -126
- package/build/__tests__/behavioral/FixtureFactory.test.d.ts +0 -7
- package/build/__tests__/behavioral/FixtureFactory.test.js +0 -79
- package/build/__tests__/behavioral/LocationFixture.test.d.ts +0 -17
- package/build/__tests__/behavioral/LocationFixture.test.js +0 -144
- package/build/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.d.ts +0 -12
- package/build/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +0 -95
- package/build/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.d.ts +0 -4
- package/build/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +0 -35
- package/build/__tests__/behavioral/MercuryFixture.test.d.ts +0 -20
- package/build/__tests__/behavioral/MercuryFixture.test.js +0 -187
- package/build/__tests__/behavioral/OrganizationFixture.test.d.ts +0 -31
- package/build/__tests__/behavioral/OrganizationFixture.test.js +0 -333
- package/build/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.d.ts +0 -4
- package/build/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +0 -21
- package/build/__tests__/behavioral/PersonFixture.test.d.ts +0 -22
- package/build/__tests__/behavioral/PersonFixture.test.js +0 -225
- package/build/__tests__/behavioral/PhoneNumberIncrementor.test.d.ts +0 -11
- package/build/__tests__/behavioral/PhoneNumberIncrementor.test.js +0 -95
- package/build/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.d.ts +0 -8
- package/build/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +0 -67
- package/build/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.d.ts +0 -5
- package/build/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +0 -44
- package/build/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.d.ts +0 -8
- package/build/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +0 -55
- package/build/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.d.ts +0 -10
- package/build/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +0 -137
- package/build/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.d.ts +0 -7
- package/build/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +0 -54
- package/build/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.d.ts +0 -6
- package/build/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +0 -40
- package/build/__tests__/behavioral/RoleFixture.test.d.ts +0 -15
- package/build/__tests__/behavioral/RoleFixture.test.js +0 -118
- package/build/__tests__/behavioral/SkillFixture.test.d.ts +0 -13
- package/build/__tests__/behavioral/SkillFixture.test.js +0 -118
- package/build/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.d.ts +0 -7
- package/build/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.js +0 -41
- package/build/__tests__/behavioral/databases/DatabaseFixture.test.d.ts +0 -7
- package/build/__tests__/behavioral/databases/DatabaseFixture.test.js +0 -59
- package/build/__tests__/behavioral/databases/DbResetsAsExpected.test.d.ts +0 -5
- package/build/__tests__/behavioral/databases/DbResetsAsExpected.test.js +0 -34
- package/build/__tests__/behavioral/databases/DummyStore.d.ts +0 -55
- package/build/__tests__/behavioral/databases/DummyStore.js +0 -36
- package/build/__tests__/behavioral/databases/StoreFixture.test.d.ts +0 -23
- package/build/__tests__/behavioral/databases/StoreFixture.test.js +0 -156
- package/build/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.d.ts +0 -9
- package/build/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +0 -73
- package/build/__tests__/behavioral/faking/FakeDecorator.test.d.ts +0 -45
- package/build/__tests__/behavioral/faking/FakeDecorator.test.js +0 -421
- package/build/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.d.ts +0 -4
- package/build/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +0 -23
- package/build/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.d.ts +0 -4
- package/build/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +0 -27
- package/build/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +0 -8
- package/build/__tests__/behavioral/faking/FakeThemeManager.test.js +0 -93
- package/build/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.d.ts +0 -8
- package/build/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +0 -56
- package/build/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.d.ts +0 -14
- package/build/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +0 -141
- package/build/__tests__/behavioral/faking/FakingAuthenticator.test.d.ts +0 -5
- package/build/__tests__/behavioral/faking/FakingAuthenticator.test.js +0 -35
- package/build/__tests__/behavioral/faking/FakingInBeforeEach.test.d.ts +0 -6
- package/build/__tests__/behavioral/faking/FakingInBeforeEach.test.js +0 -42
- package/build/__tests__/behavioral/faking/FakingLocations.test.d.ts +0 -6
- package/build/__tests__/behavioral/faking/FakingLocations.test.js +0 -45
- package/build/__tests__/behavioral/faking/FakingRoleEvents.test.d.ts +0 -19
- package/build/__tests__/behavioral/faking/FakingRoleEvents.test.js +0 -140
- package/build/__tests__/behavioral/faking/FakingSkillEvents.test.d.ts +0 -24
- package/build/__tests__/behavioral/faking/FakingSkillEvents.test.js +0 -174
- package/build/__tests__/behavioral/faking/UpdatePerson.test.d.ts +0 -4
- package/build/__tests__/behavioral/faking/UpdatePerson.test.js +0 -32
- package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.d.ts +0 -35
- package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.js +0 -321
- package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +0 -4
- package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +0 -48
- package/build/__tests__/behavioral/faking/WhoAmI.test.d.ts +0 -19
- package/build/__tests__/behavioral/faking/WhoAmI.test.js +0 -105
- package/build/__tests__/behavioral/maps/SpyingMapUtil.test.d.ts +0 -10
- package/build/__tests__/behavioral/maps/SpyingMapUtil.test.js +0 -76
- package/build/__tests__/behavioral/permissions/FakeAuthorizer.test.d.ts +0 -34
- package/build/__tests__/behavioral/permissions/FakeAuthorizer.test.js +0 -272
- package/build/__tests__/behavioral/permissions/PermissionFixture.test.d.ts +0 -5
- package/build/__tests__/behavioral/permissions/PermissionFixture.test.js +0 -35
- package/build/__tests__/behavioral/seeding/SeedingData.test.d.ts +0 -24
- package/build/__tests__/behavioral/seeding/SeedingData.test.js +0 -271
- package/build/__tests__/behavioral/seeding/UsingDecorators.test.d.ts +0 -37
- package/build/__tests__/behavioral/seeding/UsingDecorators.test.js +0 -266
- package/build/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.d.ts +0 -14
- package/build/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +0 -117
- package/build/__tests__/behavioral/views/FakingSkillViewControllers.test.d.ts +0 -12
- package/build/__tests__/behavioral/views/FakingSkillViewControllers.test.js +0 -55
- package/build/__tests__/behavioral/views/Routing.test.d.ts +0 -36
- package/build/__tests__/behavioral/views/Routing.test.js +0 -177
- package/build/__tests__/behavioral/views/TestingScope.test.d.ts +0 -24
- package/build/__tests__/behavioral/views/TestingScope.test.js +0 -197
- package/build/__tests__/behavioral/views/ViewPlugins.test.d.ts +0 -12
- package/build/__tests__/behavioral/views/ViewPlugins.test.js +0 -83
- package/build/__tests__/behavioral/views/WorkingWithTimezones.test.d.ts +0 -11
- package/build/__tests__/behavioral/views/WorkingWithTimezones.test.js +0 -55
- package/build/__tests__/behavioral/views/viewFixture/ViewFixture.test.d.ts +0 -118
- package/build/__tests__/behavioral/views/viewFixture/ViewFixture.test.js +0 -761
- package/build/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.d.ts +0 -5
- package/build/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.js +0 -29
- package/build/__tests__/support/AbstractFakeDecoratorTest.d.ts +0 -5
- package/build/__tests__/support/AbstractFakeDecoratorTest.js +0 -27
- package/build/__tests__/support/EventFaker.d.ts +0 -5
- package/build/__tests__/support/EventFaker.js +0 -36
- package/build/__tests__/support/RandomViewPlugin.d.ts +0 -2
- package/build/__tests__/support/RandomViewPlugin.js +0 -5
- package/build/__tests__/support/RandomViewPlugin2.d.ts +0 -2
- package/build/__tests__/support/RandomViewPlugin2.js +0 -5
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/.spruce/stores/stores.d.ts +0 -5
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/.spruce/stores/stores.js +0 -9
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.d.ts +0 -51
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js +0 -33
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/src/.spruce/settings.json +0 -6
- package/build/__tests__/testDirsAndFiles/plugins1/build/.spruce/views/views.d.ts +0 -6
- package/build/__tests__/testDirsAndFiles/plugins1/build/.spruce/views/views.js +0 -11
- package/build/__tests__/testDirsAndFiles/plugins2/build/.spruce/views/views.d.ts +0 -6
- package/build/__tests__/testDirsAndFiles/plugins2/build/.spruce/views/views.js +0 -11
- package/build/__tests__/testDirsAndFiles/skill/build/.spruce/views/views.js +0 -18
- package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.d.ts +0 -5
- package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.js +0 -11
- package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.d.ts +0 -7
- package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.js +0 -19
- package/build/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.d.ts +0 -8
- package/build/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.js +0 -31
- package/build/__tests__/testDirsAndFiles/skill/package.json +0 -5
- package/build/__tests__/testDirsAndFiles/skill/src/.spruce/settings.json +0 -6
- package/build/__tests__/testDirsAndFiles/skill/src/.spruce/views/views.d.ts +0 -7
- package/build/__tests__/testDirsAndFiles/skill/src/.spruce/views/views.js +0 -17
- package/build/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.d.ts +0 -5
- package/build/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.js +0 -11
- package/build/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.d.ts +0 -8
- package/build/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.js +0 -31
- package/build/esm/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.d.ts +0 -15
- package/build/esm/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +0 -128
- package/build/esm/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +0 -40
- package/build/esm/__tests__/behavioral/DisablingSchemaValidationOnTest.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +0 -23
- package/build/esm/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +0 -80
- package/build/esm/__tests__/behavioral/FakingEventResponses.test.d.ts +0 -12
- package/build/esm/__tests__/behavioral/FakingEventResponses.test.js +0 -148
- package/build/esm/__tests__/behavioral/FixtureFactory.test.d.ts +0 -7
- package/build/esm/__tests__/behavioral/FixtureFactory.test.js +0 -61
- package/build/esm/__tests__/behavioral/LocationFixture.test.d.ts +0 -17
- package/build/esm/__tests__/behavioral/LocationFixture.test.js +0 -173
- package/build/esm/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.d.ts +0 -12
- package/build/esm/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +0 -113
- package/build/esm/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +0 -41
- package/build/esm/__tests__/behavioral/MercuryFixture.test.d.ts +0 -20
- package/build/esm/__tests__/behavioral/MercuryFixture.test.js +0 -223
- package/build/esm/__tests__/behavioral/OrganizationFixture.test.d.ts +0 -31
- package/build/esm/__tests__/behavioral/OrganizationFixture.test.js +0 -389
- package/build/esm/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +0 -18
- package/build/esm/__tests__/behavioral/PersonFixture.test.d.ts +0 -22
- package/build/esm/__tests__/behavioral/PersonFixture.test.js +0 -232
- package/build/esm/__tests__/behavioral/PhoneNumberIncrementor.test.d.ts +0 -11
- package/build/esm/__tests__/behavioral/PhoneNumberIncrementor.test.js +0 -112
- package/build/esm/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +0 -84
- package/build/esm/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +0 -55
- package/build/esm/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +0 -72
- package/build/esm/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.d.ts +0 -10
- package/build/esm/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +0 -146
- package/build/esm/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.d.ts +0 -7
- package/build/esm/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +0 -66
- package/build/esm/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.d.ts +0 -6
- package/build/esm/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +0 -51
- package/build/esm/__tests__/behavioral/RoleFixture.test.d.ts +0 -15
- package/build/esm/__tests__/behavioral/RoleFixture.test.js +0 -143
- package/build/esm/__tests__/behavioral/SkillFixture.test.d.ts +0 -13
- package/build/esm/__tests__/behavioral/SkillFixture.test.js +0 -141
- package/build/esm/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.d.ts +0 -7
- package/build/esm/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.js +0 -53
- package/build/esm/__tests__/behavioral/databases/DatabaseFixture.test.d.ts +0 -7
- package/build/esm/__tests__/behavioral/databases/DatabaseFixture.test.js +0 -48
- package/build/esm/__tests__/behavioral/databases/DbResetsAsExpected.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/databases/DbResetsAsExpected.test.js +0 -28
- package/build/esm/__tests__/behavioral/databases/DummyStore.d.ts +0 -55
- package/build/esm/__tests__/behavioral/databases/DummyStore.js +0 -43
- package/build/esm/__tests__/behavioral/databases/StoreFixture.test.d.ts +0 -23
- package/build/esm/__tests__/behavioral/databases/StoreFixture.test.js +0 -164
- package/build/esm/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.d.ts +0 -9
- package/build/esm/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +0 -89
- package/build/esm/__tests__/behavioral/faking/FakeDecorator.test.d.ts +0 -45
- package/build/esm/__tests__/behavioral/faking/FakeDecorator.test.js +0 -482
- package/build/esm/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +0 -28
- package/build/esm/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +0 -32
- package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.js +0 -82
- package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +0 -70
- package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.d.ts +0 -14
- package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +0 -165
- package/build/esm/__tests__/behavioral/faking/FakingAuthenticator.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/faking/FakingAuthenticator.test.js +0 -43
- package/build/esm/__tests__/behavioral/faking/FakingInBeforeEach.test.d.ts +0 -6
- package/build/esm/__tests__/behavioral/faking/FakingInBeforeEach.test.js +0 -55
- package/build/esm/__tests__/behavioral/faking/FakingLocations.test.d.ts +0 -6
- package/build/esm/__tests__/behavioral/faking/FakingLocations.test.js +0 -55
- package/build/esm/__tests__/behavioral/faking/FakingRoleEvents.test.d.ts +0 -19
- package/build/esm/__tests__/behavioral/faking/FakingRoleEvents.test.js +0 -175
- package/build/esm/__tests__/behavioral/faking/FakingSkillEvents.test.d.ts +0 -24
- package/build/esm/__tests__/behavioral/faking/FakingSkillEvents.test.js +0 -214
- package/build/esm/__tests__/behavioral/faking/UpdatePerson.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/faking/UpdatePerson.test.js +0 -38
- package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.d.ts +0 -35
- package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.js +0 -360
- package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +0 -31
- package/build/esm/__tests__/behavioral/faking/WhoAmI.test.d.ts +0 -19
- package/build/esm/__tests__/behavioral/faking/WhoAmI.test.js +0 -142
- package/build/esm/__tests__/behavioral/maps/SpyingMapUtil.test.d.ts +0 -10
- package/build/esm/__tests__/behavioral/maps/SpyingMapUtil.test.js +0 -94
- package/build/esm/__tests__/behavioral/permissions/FakeAuthorizer.test.d.ts +0 -34
- package/build/esm/__tests__/behavioral/permissions/FakeAuthorizer.test.js +0 -324
- package/build/esm/__tests__/behavioral/permissions/PermissionFixture.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/permissions/PermissionFixture.test.js +0 -43
- package/build/esm/__tests__/behavioral/seeding/SeedingData.test.d.ts +0 -24
- package/build/esm/__tests__/behavioral/seeding/SeedingData.test.js +0 -314
- package/build/esm/__tests__/behavioral/seeding/UsingDecorators.test.d.ts +0 -37
- package/build/esm/__tests__/behavioral/seeding/UsingDecorators.test.js +0 -322
- package/build/esm/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.d.ts +0 -14
- package/build/esm/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +0 -138
- package/build/esm/__tests__/behavioral/views/FakingSkillViewControllers.test.d.ts +0 -12
- package/build/esm/__tests__/behavioral/views/FakingSkillViewControllers.test.js +0 -70
- package/build/esm/__tests__/behavioral/views/Routing.test.d.ts +0 -36
- package/build/esm/__tests__/behavioral/views/Routing.test.js +0 -212
- package/build/esm/__tests__/behavioral/views/TestingScope.test.d.ts +0 -24
- package/build/esm/__tests__/behavioral/views/TestingScope.test.js +0 -238
- package/build/esm/__tests__/behavioral/views/ViewPlugins.test.d.ts +0 -12
- package/build/esm/__tests__/behavioral/views/ViewPlugins.test.js +0 -103
- package/build/esm/__tests__/behavioral/views/WorkingWithTimezones.test.d.ts +0 -11
- package/build/esm/__tests__/behavioral/views/WorkingWithTimezones.test.js +0 -64
- package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixture.test.d.ts +0 -118
- package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixture.test.js +0 -856
- package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.js +0 -39
- package/build/esm/__tests__/support/AbstractFakeDecoratorTest.d.ts +0 -5
- package/build/esm/__tests__/support/AbstractFakeDecoratorTest.js +0 -34
- package/build/esm/__tests__/support/EventFaker.d.ts +0 -5
- package/build/esm/__tests__/support/EventFaker.js +0 -45
- package/build/esm/__tests__/support/RandomViewPlugin.d.ts +0 -2
- package/build/esm/__tests__/support/RandomViewPlugin.js +0 -2
- package/build/esm/__tests__/support/RandomViewPlugin2.d.ts +0 -2
- package/build/esm/__tests__/support/RandomViewPlugin2.js +0 -2
- package/build/esm/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.d.ts +0 -51
- package/build/esm/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js +0 -41
- package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.d.ts +0 -5
- package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.js +0 -9
- package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.d.ts +0 -7
- package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.js +0 -28
- package/build/esm/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.d.ts +0 -8
- package/build/esm/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.js +0 -26
- package/build/esm/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.d.ts +0 -5
- package/build/esm/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.js +0 -9
- package/build/esm/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.d.ts +0 -8
- package/build/esm/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.js +0 -26
- /package/build/{__tests__/support → esm/tests}/FakeThemeManager.d.ts +0 -0
- /package/build/esm/{__tests__/support → tests}/FakeThemeManager.js +0 -0
- /package/build/{esm/__tests__/support → tests}/FakeThemeManager.d.ts +0 -0
- /package/build/{__tests__/support → tests}/FakeThemeManager.js +0 -0
|
@@ -1,322 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
import { AuthenticatorImpl } from '@sprucelabs/heartwood-view-controllers';
|
|
17
|
-
import { MercuryClientFactory } from '@sprucelabs/mercury-client';
|
|
18
|
-
import { test, assert } from '@sprucelabs/test-utils';
|
|
19
|
-
import { MercuryFixture, StoreFixture } from '../../../index.js';
|
|
20
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest.js';
|
|
21
|
-
import { DEMO_NUMBER_DECORATORS } from '../../../tests/constants.js';
|
|
22
|
-
import login from '../../../tests/decorators/login.js';
|
|
23
|
-
import seed from '../../../tests/decorators/seed.js';
|
|
24
|
-
// eslint-disable-next-line spruce/prohibit-import-from-build-folder
|
|
25
|
-
import GoodStore from '../../testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js';
|
|
26
|
-
import { DummyStore } from '../databases/DummyStore.js';
|
|
27
|
-
MercuryFixture.setShouldRequireLocalListeners(false);
|
|
28
|
-
let UsingDecoratorsTest = class UsingDecoratorsTest extends AbstractSpruceFixtureTest {
|
|
29
|
-
static beforeEach() {
|
|
30
|
-
const _super = Object.create(null, {
|
|
31
|
-
beforeEach: { get: () => super.beforeEach }
|
|
32
|
-
});
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
assert.isTrue(MercuryClientFactory.isInTestMode());
|
|
35
|
-
this.goodStore = yield this.Fixture('store').Store('good');
|
|
36
|
-
yield this.assertCountGoods(5);
|
|
37
|
-
yield _super.beforeEach.call(this);
|
|
38
|
-
const auth = AuthenticatorImpl.getInstance();
|
|
39
|
-
assert.isTruthy(auth.getSessionToken());
|
|
40
|
-
const client = login.getClient();
|
|
41
|
-
const person = login.getPerson();
|
|
42
|
-
//@ts-ignore
|
|
43
|
-
assert.isEqualDeep(person, client.auth.person);
|
|
44
|
-
assert.isTruthy(client);
|
|
45
|
-
assert.isTrue(client.isConnected());
|
|
46
|
-
assert.isTrue(client.getIsTestClient());
|
|
47
|
-
this.lastClient = client;
|
|
48
|
-
//@ts-ignore
|
|
49
|
-
assert.isEqualDeep(auth.getPerson(), client.auth.person);
|
|
50
|
-
//@ts-ignore
|
|
51
|
-
assert.isEqualDeep(auth.getSessionToken(), client.auth.token);
|
|
52
|
-
this.goodStore = yield this.Fixture('store').Store('good');
|
|
53
|
-
yield this.assertCountGoods(5);
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
static afterAll() {
|
|
57
|
-
const _super = Object.create(null, {
|
|
58
|
-
afterAll: { get: () => super.afterAll }
|
|
59
|
-
});
|
|
60
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
yield _super.afterAll.call(this);
|
|
62
|
-
const client = MercuryFixture.getDefaultClient();
|
|
63
|
-
assert.isFalsy(client);
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
static loginSetsDefaultClient() {
|
|
67
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
const client = MercuryFixture.getDefaultClient();
|
|
69
|
-
assert.isTruthy(client);
|
|
70
|
-
assert.isTrue(client.isConnected());
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
static retainsClientBetweenTests() {
|
|
74
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
-
const client = MercuryFixture.getDefaultClient();
|
|
76
|
-
assert.isTruthy(client);
|
|
77
|
-
assert.isEqual(this.lastClient, client);
|
|
78
|
-
assert.isTrue(client.isConnected());
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
static canSeedThreeOrgs() {
|
|
82
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
-
yield this.assertCountOrgs(3);
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
static canSeedFiveOrgs() {
|
|
87
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
-
yield this.assertCountOrgs(5);
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
static canSeedTwoLocations() {
|
|
92
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
-
yield this.assertCountLocations(3);
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
static seededLocationsArePublic() {
|
|
97
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
-
const locations = yield this.locations.listLocations();
|
|
99
|
-
for (const location of locations) {
|
|
100
|
-
assert.isTrue(location.isPublic);
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
static canSeedTenLocations() {
|
|
105
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
-
yield this.assertCountLocations(10);
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
static locationUsesLatestOrg() {
|
|
110
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
-
yield this.assertCountLocations(10);
|
|
112
|
-
yield this.assertCountOrgs(10);
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
static canSeedStores() {
|
|
116
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
-
assert.isTrue(DummyStore.wasSeedInvoked);
|
|
118
|
-
assert.isEqualDeep(DummyStore.seedOptions, {
|
|
119
|
-
totalToSeed: 10,
|
|
120
|
-
TestClass: this,
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
static logsInViewAuthenticator() {
|
|
125
|
-
assert.isTruthy(AuthenticatorImpl.getInstance().getSessionToken());
|
|
126
|
-
}
|
|
127
|
-
static passesThroughArgs(one, two, three) {
|
|
128
|
-
assert.isEqual(one, 1);
|
|
129
|
-
assert.isEqual(two, 1);
|
|
130
|
-
assert.isEqual(three, 1);
|
|
131
|
-
}
|
|
132
|
-
static passesThroughArgs2(one) {
|
|
133
|
-
assert.isEqualDeep(one, { hello: 'world' });
|
|
134
|
-
}
|
|
135
|
-
static seedsAddToBeforeEach() {
|
|
136
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
-
yield this.assertCountGoods(10);
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
static seedsAddToBeforeEachButNotLastRun() {
|
|
141
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
142
|
-
yield this.assertCountGoods(6);
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
static canGetClientOffLogin() {
|
|
146
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
147
|
-
assert.isFunction(login.getClient);
|
|
148
|
-
assert.isEqual(login.getClient(), MercuryFixture.getDefaultClient());
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
static storeGetsVariablesPassed() {
|
|
152
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
-
assert.isEqualDeep(GoodStore.seedParams, ['hello', 'world']);
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
static storeGetsVariablesPassed2() {
|
|
157
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
-
assert.isEqualDeep(GoodStore.seedParams, ['goodbye', 'people']);
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
static canSeedPeople(baseCounts) {
|
|
162
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
163
|
-
yield this.assertExpectedSeededPeople(baseCounts);
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
static canSeedMorePeople(baseCounts) {
|
|
167
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
-
yield this.assertExpectedSeededPeople(baseCounts);
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
static assertExpectedSeededPeople(baseCounts) {
|
|
172
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
-
const bases = Object.keys(baseCounts);
|
|
174
|
-
for (const base of bases) {
|
|
175
|
-
const count = baseCounts[base];
|
|
176
|
-
yield this.assertTotalPeopleByRole(base, count);
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
static assertCountOrgs(expected) {
|
|
181
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
182
|
-
const organizations = yield this.organizations.listOrganizations();
|
|
183
|
-
assert.isLength(organizations, expected);
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
static assertCountLocations(expected) {
|
|
187
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
188
|
-
const org = yield this.views.getScope().getCurrentOrganization();
|
|
189
|
-
assert.isTruthy(org);
|
|
190
|
-
const organizationId = org.id;
|
|
191
|
-
const locations = yield this.locations.listLocations(organizationId);
|
|
192
|
-
assert.isLength(locations, expected);
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
static assertCountGoods(expected) {
|
|
196
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
197
|
-
const goodStore = yield this.stores.Store('good');
|
|
198
|
-
const count = yield goodStore.count({});
|
|
199
|
-
assert.isEqual(count, expected);
|
|
200
|
-
const localCount = yield this.goodStore.count({});
|
|
201
|
-
assert.isEqual(localCount, expected, 'The store built in beforeEach is pointing at stale database.');
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
static assertTotalPeopleByRole(roleBase, total) {
|
|
205
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
206
|
-
const org = yield this.organizations.getNewestOrganization();
|
|
207
|
-
assert.isTruthy(org);
|
|
208
|
-
const teammates = yield this.people.listPeople({
|
|
209
|
-
organizationId: org.id,
|
|
210
|
-
roleBases: [roleBase],
|
|
211
|
-
});
|
|
212
|
-
assert.isLength(teammates, total);
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
__decorate([
|
|
217
|
-
seed('good', 5),
|
|
218
|
-
seed('dummies', 10)
|
|
219
|
-
], UsingDecoratorsTest, "beforeEach", null);
|
|
220
|
-
__decorate([
|
|
221
|
-
test()
|
|
222
|
-
], UsingDecoratorsTest, "loginSetsDefaultClient", null);
|
|
223
|
-
__decorate([
|
|
224
|
-
test()
|
|
225
|
-
], UsingDecoratorsTest, "retainsClientBetweenTests", null);
|
|
226
|
-
__decorate([
|
|
227
|
-
test(),
|
|
228
|
-
seed('organizations', 3)
|
|
229
|
-
], UsingDecoratorsTest, "canSeedThreeOrgs", null);
|
|
230
|
-
__decorate([
|
|
231
|
-
test(),
|
|
232
|
-
seed('organizations', 5)
|
|
233
|
-
], UsingDecoratorsTest, "canSeedFiveOrgs", null);
|
|
234
|
-
__decorate([
|
|
235
|
-
test(),
|
|
236
|
-
seed('locations', 3)
|
|
237
|
-
], UsingDecoratorsTest, "canSeedTwoLocations", null);
|
|
238
|
-
__decorate([
|
|
239
|
-
test(),
|
|
240
|
-
seed('locations', 3)
|
|
241
|
-
], UsingDecoratorsTest, "seededLocationsArePublic", null);
|
|
242
|
-
__decorate([
|
|
243
|
-
test(),
|
|
244
|
-
seed('locations', 10)
|
|
245
|
-
], UsingDecoratorsTest, "canSeedTenLocations", null);
|
|
246
|
-
__decorate([
|
|
247
|
-
test(),
|
|
248
|
-
seed('organizations', 10),
|
|
249
|
-
seed('locations', 10)
|
|
250
|
-
], UsingDecoratorsTest, "locationUsesLatestOrg", null);
|
|
251
|
-
__decorate([
|
|
252
|
-
test(),
|
|
253
|
-
seed('dummies', 10)
|
|
254
|
-
], UsingDecoratorsTest, "canSeedStores", null);
|
|
255
|
-
__decorate([
|
|
256
|
-
test()
|
|
257
|
-
], UsingDecoratorsTest, "logsInViewAuthenticator", null);
|
|
258
|
-
__decorate([
|
|
259
|
-
test('passes through args 1', 1, 1, 1),
|
|
260
|
-
seed('dummies', 3)
|
|
261
|
-
], UsingDecoratorsTest, "passesThroughArgs", null);
|
|
262
|
-
__decorate([
|
|
263
|
-
test('passes through args 2', { hello: 'world' }),
|
|
264
|
-
seed('dummies', 3)
|
|
265
|
-
], UsingDecoratorsTest, "passesThroughArgs2", null);
|
|
266
|
-
__decorate([
|
|
267
|
-
test(),
|
|
268
|
-
seed('good', 5)
|
|
269
|
-
], UsingDecoratorsTest, "seedsAddToBeforeEach", null);
|
|
270
|
-
__decorate([
|
|
271
|
-
test(),
|
|
272
|
-
seed('good', 1)
|
|
273
|
-
], UsingDecoratorsTest, "seedsAddToBeforeEachButNotLastRun", null);
|
|
274
|
-
__decorate([
|
|
275
|
-
test()
|
|
276
|
-
], UsingDecoratorsTest, "canGetClientOffLogin", null);
|
|
277
|
-
__decorate([
|
|
278
|
-
test(),
|
|
279
|
-
seed('good', 1, 'hello', 'world')
|
|
280
|
-
], UsingDecoratorsTest, "storeGetsVariablesPassed", null);
|
|
281
|
-
__decorate([
|
|
282
|
-
test(),
|
|
283
|
-
seed('good', 1, 'goodbye', 'people')
|
|
284
|
-
], UsingDecoratorsTest, "storeGetsVariablesPassed2", null);
|
|
285
|
-
__decorate([
|
|
286
|
-
test('can seed people', {
|
|
287
|
-
guest: 2,
|
|
288
|
-
teammate: 2,
|
|
289
|
-
groupManager: 2,
|
|
290
|
-
manager: 2,
|
|
291
|
-
owner: 3,
|
|
292
|
-
}),
|
|
293
|
-
seed('organizations', 1),
|
|
294
|
-
seed('locations', 1),
|
|
295
|
-
seed('teammates', 2),
|
|
296
|
-
seed('guests', 2),
|
|
297
|
-
seed('groupManagers', 2),
|
|
298
|
-
seed('managers', 2),
|
|
299
|
-
seed('owners', 2)
|
|
300
|
-
], UsingDecoratorsTest, "canSeedPeople", null);
|
|
301
|
-
__decorate([
|
|
302
|
-
test('can seed more people', {
|
|
303
|
-
guest: 5,
|
|
304
|
-
teammate: 5,
|
|
305
|
-
groupManager: 3,
|
|
306
|
-
manager: 4,
|
|
307
|
-
owner: 6,
|
|
308
|
-
}),
|
|
309
|
-
seed('organizations', 1),
|
|
310
|
-
seed('locations', 1),
|
|
311
|
-
seed('teammates', 5),
|
|
312
|
-
seed('guests', 5),
|
|
313
|
-
seed('groupManagers', 3),
|
|
314
|
-
seed('managers', 4),
|
|
315
|
-
seed('owners', 5)
|
|
316
|
-
], UsingDecoratorsTest, "canSeedMorePeople", null);
|
|
317
|
-
UsingDecoratorsTest = __decorate([
|
|
318
|
-
login(DEMO_NUMBER_DECORATORS)
|
|
319
|
-
], UsingDecoratorsTest);
|
|
320
|
-
export default UsingDecoratorsTest;
|
|
321
|
-
StoreFixture.setStore('dummies', DummyStore);
|
|
322
|
-
StoreFixture.setStore('good', GoodStore);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
|
|
2
|
-
export default class UsingDecoratorsToInstallSkills extends AbstractSpruceFixtureTest {
|
|
3
|
-
private static skill;
|
|
4
|
-
protected static beforeEach(): Promise<void>;
|
|
5
|
-
protected static throwsWhenMissingNamespaces(): void;
|
|
6
|
-
protected static returnsDecorator(): void;
|
|
7
|
-
protected static callsOriginalTestMethod(): Promise<void>;
|
|
8
|
-
protected static passesThroughOriginalArgs(args: any): Promise<void>;
|
|
9
|
-
protected static throwsWithoutSeedingOrg(): Promise<void>;
|
|
10
|
-
protected static throwsWhenInstallingBadSkill(): Promise<void>;
|
|
11
|
-
protected static doesNotEmitDidInstall(): Promise<void>;
|
|
12
|
-
private static executeDecorator;
|
|
13
|
-
private static getDecorator;
|
|
14
|
-
}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
import { assert, test } from '@sprucelabs/test-utils';
|
|
17
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest.js';
|
|
18
|
-
import { DEMO_NUMBER_SKILL_DECORATORS } from '../../../tests/constants.js';
|
|
19
|
-
import install from '../../../tests/decorators/install.js';
|
|
20
|
-
import login from '../../../tests/decorators/login.js';
|
|
21
|
-
import seed from '../../../tests/decorators/seed.js';
|
|
22
|
-
import MercuryFixture from '../../../tests/fixtures/MercuryFixture.js';
|
|
23
|
-
MercuryFixture.setShouldRequireLocalListeners(false);
|
|
24
|
-
let UsingDecoratorsToInstallSkills = class UsingDecoratorsToInstallSkills extends AbstractSpruceFixtureTest {
|
|
25
|
-
static beforeEach() {
|
|
26
|
-
const _super = Object.create(null, {
|
|
27
|
-
beforeEach: { get: () => super.beforeEach }
|
|
28
|
-
});
|
|
29
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
yield _super.beforeEach.call(this);
|
|
31
|
-
this.skill = yield this.skills.seedDemoSkill();
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
static throwsWhenMissingNamespaces() {
|
|
35
|
-
assert.doesThrow(() => install.skills());
|
|
36
|
-
}
|
|
37
|
-
static returnsDecorator() {
|
|
38
|
-
const decorator = this.getDecorator();
|
|
39
|
-
assert.isFunction(decorator);
|
|
40
|
-
}
|
|
41
|
-
static callsOriginalTestMethod() {
|
|
42
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
let wasHit = false;
|
|
44
|
-
yield this.executeDecorator({
|
|
45
|
-
testFunction: () => __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
wasHit = true;
|
|
47
|
-
}),
|
|
48
|
-
});
|
|
49
|
-
assert.isTrue(wasHit);
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
static passesThroughOriginalArgs(args) {
|
|
53
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
let passedArgs;
|
|
55
|
-
yield this.executeDecorator({
|
|
56
|
-
testFunction: (...args) => __awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
passedArgs = args;
|
|
58
|
-
}),
|
|
59
|
-
args,
|
|
60
|
-
});
|
|
61
|
-
assert.isEqualDeep(passedArgs, args);
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
static throwsWithoutSeedingOrg() {
|
|
65
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
-
yield assert.doesThrowAsync(() => this.executeDecorator({ testFunction: () => __awaiter(this, void 0, void 0, function* () { }) }));
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
static throwsWhenInstallingBadSkill() {
|
|
70
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
-
yield assert.doesThrowAsync(() => this.executeDecorator({
|
|
72
|
-
testFunction: () => __awaiter(this, void 0, void 0, function* () { }),
|
|
73
|
-
namespaces: ['not-found'],
|
|
74
|
-
}));
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
static doesNotEmitDidInstall() {
|
|
78
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
-
let passedPayload;
|
|
80
|
-
yield login
|
|
81
|
-
.getClient()
|
|
82
|
-
.on('install-skill::v2020_12_25', ({ payload }) => {
|
|
83
|
-
passedPayload = payload;
|
|
84
|
-
return {};
|
|
85
|
-
});
|
|
86
|
-
yield this.executeDecorator({
|
|
87
|
-
testFunction: () => __awaiter(this, void 0, void 0, function* () { }),
|
|
88
|
-
});
|
|
89
|
-
assert.isFalse(passedPayload.shouldNotifySkillOfInstall);
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
static executeDecorator(options) {
|
|
93
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
-
const { testFunction, args, namespaces } = options;
|
|
95
|
-
const mockDescriptor = {
|
|
96
|
-
value: testFunction,
|
|
97
|
-
};
|
|
98
|
-
const decorator = this.getDecorator(namespaces);
|
|
99
|
-
decorator(this, 'myTest', mockDescriptor);
|
|
100
|
-
//@ts-ignore
|
|
101
|
-
yield mockDescriptor.value(...(args ? args : []));
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
static getDecorator(namespaces) {
|
|
105
|
-
const slugs = namespaces !== null && namespaces !== void 0 ? namespaces : [this.skill.slug];
|
|
106
|
-
return install.skills(...slugs);
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
__decorate([
|
|
110
|
-
test()
|
|
111
|
-
], UsingDecoratorsToInstallSkills, "throwsWhenMissingNamespaces", null);
|
|
112
|
-
__decorate([
|
|
113
|
-
test()
|
|
114
|
-
], UsingDecoratorsToInstallSkills, "returnsDecorator", null);
|
|
115
|
-
__decorate([
|
|
116
|
-
test(),
|
|
117
|
-
seed('organizations', 1)
|
|
118
|
-
], UsingDecoratorsToInstallSkills, "callsOriginalTestMethod", null);
|
|
119
|
-
__decorate([
|
|
120
|
-
test('passes args 1', [1]),
|
|
121
|
-
test('passes args 1', ['hello', 'world']),
|
|
122
|
-
seed('organizations', 1)
|
|
123
|
-
], UsingDecoratorsToInstallSkills, "passesThroughOriginalArgs", null);
|
|
124
|
-
__decorate([
|
|
125
|
-
test()
|
|
126
|
-
], UsingDecoratorsToInstallSkills, "throwsWithoutSeedingOrg", null);
|
|
127
|
-
__decorate([
|
|
128
|
-
test(),
|
|
129
|
-
seed('organizations', 1)
|
|
130
|
-
], UsingDecoratorsToInstallSkills, "throwsWhenInstallingBadSkill", null);
|
|
131
|
-
__decorate([
|
|
132
|
-
test(),
|
|
133
|
-
seed('organizations', 1)
|
|
134
|
-
], UsingDecoratorsToInstallSkills, "doesNotEmitDidInstall", null);
|
|
135
|
-
UsingDecoratorsToInstallSkills = __decorate([
|
|
136
|
-
login(DEMO_NUMBER_SKILL_DECORATORS)
|
|
137
|
-
], UsingDecoratorsToInstallSkills);
|
|
138
|
-
export default UsingDecoratorsToInstallSkills;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
|
|
2
|
-
import FakeSkillViewController from '../../../tests/Fake.svc';
|
|
3
|
-
export default class FakingSkillViewControllersTest extends AbstractSpruceFixtureTest {
|
|
4
|
-
protected static controllerMap: {
|
|
5
|
-
fake: typeof FakeSkillViewController;
|
|
6
|
-
};
|
|
7
|
-
private static viewFixture;
|
|
8
|
-
protected static beforeEach(): Promise<void>;
|
|
9
|
-
protected static canRenderkFakeSkillViewController(): Promise<void>;
|
|
10
|
-
protected static passesThroughConstructorAptions(options: any): Promise<void>;
|
|
11
|
-
protected static passesThroughLoadArgs(args: any): Promise<void>;
|
|
12
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
import { skillViewSchema } from '@sprucelabs/heartwood-view-controllers';
|
|
17
|
-
import { validateSchemaValues } from '@sprucelabs/schema';
|
|
18
|
-
import { assert, test } from '@sprucelabs/test-utils';
|
|
19
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest.js';
|
|
20
|
-
import FakeSkillViewController from '../../../tests/Fake.svc.js';
|
|
21
|
-
class FakingSkillViewControllersTest extends AbstractSpruceFixtureTest {
|
|
22
|
-
static beforeEach() {
|
|
23
|
-
const _super = Object.create(null, {
|
|
24
|
-
beforeEach: { get: () => super.beforeEach }
|
|
25
|
-
});
|
|
26
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
yield _super.beforeEach.call(this);
|
|
28
|
-
this.viewFixture = this.Fixture('view', {
|
|
29
|
-
controllerMap: {
|
|
30
|
-
fake: FakeSkillViewController,
|
|
31
|
-
},
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
static canRenderkFakeSkillViewController() {
|
|
36
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
const vc = this.viewFixture.Controller('fake', {});
|
|
38
|
-
const model = this.viewFixture.render(vc);
|
|
39
|
-
validateSchemaValues(skillViewSchema, model);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
static passesThroughConstructorAptions(options) {
|
|
43
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
-
const vc = this.viewFixture.Controller('fake', options);
|
|
45
|
-
assert.doesInclude(vc.constructorOptions, options);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
static passesThroughLoadArgs(args) {
|
|
49
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
const vc = this.viewFixture.Controller('fake', {});
|
|
51
|
-
yield this.viewFixture.load(vc, args);
|
|
52
|
-
assert.isEqualDeep(vc.args, args);
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
FakingSkillViewControllersTest.controllerMap = {
|
|
57
|
-
fake: FakeSkillViewController,
|
|
58
|
-
};
|
|
59
|
-
export default FakingSkillViewControllersTest;
|
|
60
|
-
__decorate([
|
|
61
|
-
test()
|
|
62
|
-
], FakingSkillViewControllersTest, "canRenderkFakeSkillViewController", null);
|
|
63
|
-
__decorate([
|
|
64
|
-
test('passed constructor options 1', { hello: 'world' }),
|
|
65
|
-
test('passed constructor options 2', { taco: 'bell' })
|
|
66
|
-
], FakingSkillViewControllersTest, "passesThroughConstructorAptions", null);
|
|
67
|
-
__decorate([
|
|
68
|
-
test('passes args 1', { hello: 'world' }),
|
|
69
|
-
test('passes args 2', { cheesey: 'burrito' })
|
|
70
|
-
], FakingSkillViewControllersTest, "passesThroughLoadArgs", null);
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { SkillViewControllerId } from '@sprucelabs/heartwood-view-controllers';
|
|
2
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
|
|
3
|
-
import BookSkillViewController from '../../testDirsAndFiles/skill/build/skillViewControllers/Book.svc';
|
|
4
|
-
import SpySkillViewController from '../../testDirsAndFiles/skill/build/skillViewControllers/Spy.svc';
|
|
5
|
-
declare module '@sprucelabs/heartwood-view-controllers/build/types/heartwood.types' {
|
|
6
|
-
interface ViewControllerMap {
|
|
7
|
-
'spruceTestFixtures.book': BookSkillViewController;
|
|
8
|
-
'spruceTestFixtures.spy': SpySkillViewController;
|
|
9
|
-
}
|
|
10
|
-
interface SkillViewControllerMap {
|
|
11
|
-
'spruceTestFixtures.book': BookSkillViewController;
|
|
12
|
-
'spruceTestFixtures.spy': SpySkillViewController;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
export default class RoutingTest extends AbstractSpruceFixtureTest {
|
|
16
|
-
private static router;
|
|
17
|
-
private static factory;
|
|
18
|
-
protected static vcDir: string;
|
|
19
|
-
protected static beforeEach(): Promise<void>;
|
|
20
|
-
protected static throwsWithBadDestination(): Promise<void>;
|
|
21
|
-
protected static getPresentVcIsEmptyToStart(): Promise<void>;
|
|
22
|
-
protected static canRedirectToGoodSvcWithoutNamespace(id: SkillViewControllerId, Vc: any): Promise<void>;
|
|
23
|
-
protected static redirectTriggersLoadWithExpectedItems(args: any): Promise<void>;
|
|
24
|
-
protected static redirectByDefaultDoesNotLoadWithExpectedItems(args: any): Promise<void>;
|
|
25
|
-
protected static canHookIntoRedirectEvents(expectedArgs: any): Promise<void>;
|
|
26
|
-
protected static canFakeRedirectToHeartwoodRoot(): Promise<void>;
|
|
27
|
-
protected static canSuppressBadControllerIdOnRedirect(): Promise<void>;
|
|
28
|
-
protected static shouldThrowWithBadSvcBecauseTestRouterIsReset(): Promise<void>;
|
|
29
|
-
protected static testRouterBuildsOptionsWithLocaleAndAuthorizer(): void;
|
|
30
|
-
protected static canSetPresentVc(): Promise<void>;
|
|
31
|
-
protected static canPullNamespaceFromPresentVc(id: any, namespace: string): Promise<void>;
|
|
32
|
-
protected static canSetNamespaceDirectly(): Promise<void>;
|
|
33
|
-
private static assertCurrentNamespace;
|
|
34
|
-
private static setPresentVc;
|
|
35
|
-
private static assertRedirects;
|
|
36
|
-
}
|