@sprucelabs/spruce-test-fixtures 62.2.24 → 62.2.25
Sign up to get free protection for your applications and to get access to all the features.
- 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/FakeThemeManager.d.ts +0 -8
- package/build/__tests__/support/FakeThemeManager.js +0 -40
- 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/FakeThemeManager.d.ts +0 -8
- package/build/esm/__tests__/support/FakeThemeManager.js +0 -37
- 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
@@ -1,37 +0,0 @@
|
|
1
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
|
2
|
-
import { DummyStore } from '../databases/DummyStore';
|
3
|
-
export default class UsingDecoratorsTest extends AbstractSpruceFixtureTest {
|
4
|
-
private static lastClient;
|
5
|
-
private static goodStore;
|
6
|
-
protected static beforeEach(): Promise<void>;
|
7
|
-
protected static afterAll(): Promise<void>;
|
8
|
-
protected static loginSetsDefaultClient(): Promise<void>;
|
9
|
-
protected static retainsClientBetweenTests(): Promise<void>;
|
10
|
-
protected static canSeedThreeOrgs(): Promise<void>;
|
11
|
-
protected static canSeedFiveOrgs(): Promise<void>;
|
12
|
-
protected static canSeedTwoLocations(): Promise<void>;
|
13
|
-
protected static seededLocationsArePublic(): Promise<void>;
|
14
|
-
protected static canSeedTenLocations(): Promise<void>;
|
15
|
-
protected static locationUsesLatestOrg(): Promise<void>;
|
16
|
-
protected static canSeedStores(): Promise<void>;
|
17
|
-
protected static logsInViewAuthenticator(): void;
|
18
|
-
protected static passesThroughArgs(one: number, two: number, three: number): void;
|
19
|
-
protected static passesThroughArgs2(one: any): void;
|
20
|
-
protected static seedsAddToBeforeEach(): Promise<void>;
|
21
|
-
protected static seedsAddToBeforeEachButNotLastRun(): Promise<void>;
|
22
|
-
protected static canGetClientOffLogin(): Promise<void>;
|
23
|
-
protected static storeGetsVariablesPassed(): Promise<void>;
|
24
|
-
protected static storeGetsVariablesPassed2(): Promise<void>;
|
25
|
-
protected static canSeedPeople(baseCounts: Record<string, number>): Promise<void>;
|
26
|
-
protected static canSeedMorePeople(baseCounts: Record<string, number>): Promise<void>;
|
27
|
-
private static assertExpectedSeededPeople;
|
28
|
-
private static assertCountOrgs;
|
29
|
-
private static assertCountLocations;
|
30
|
-
private static assertCountGoods;
|
31
|
-
private static assertTotalPeopleByRole;
|
32
|
-
}
|
33
|
-
declare module '@sprucelabs/data-stores/build/types/stores.types' {
|
34
|
-
interface StoreMap {
|
35
|
-
dummies: DummyStore;
|
36
|
-
}
|
37
|
-
}
|
@@ -1,266 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
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;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
const heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
|
13
|
-
const mercury_client_1 = require("@sprucelabs/mercury-client");
|
14
|
-
const test_utils_1 = require("@sprucelabs/test-utils");
|
15
|
-
const __1 = require("../../..");
|
16
|
-
const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
|
17
|
-
const constants_1 = require("../../../tests/constants");
|
18
|
-
const login_1 = __importDefault(require("../../../tests/decorators/login"));
|
19
|
-
const seed_1 = __importDefault(require("../../../tests/decorators/seed"));
|
20
|
-
// eslint-disable-next-line spruce/prohibit-import-from-build-folder
|
21
|
-
const Good_store_1 = __importDefault(require("../../testDirsAndFiles/one-good-store-skill/build/stores/Good.store"));
|
22
|
-
const DummyStore_1 = require("../databases/DummyStore");
|
23
|
-
__1.MercuryFixture.setShouldRequireLocalListeners(false);
|
24
|
-
let UsingDecoratorsTest = class UsingDecoratorsTest extends AbstractSpruceFixtureTest_1.default {
|
25
|
-
static async beforeEach() {
|
26
|
-
test_utils_1.assert.isTrue(mercury_client_1.MercuryClientFactory.isInTestMode());
|
27
|
-
this.goodStore = await this.Fixture('store').Store('good');
|
28
|
-
await this.assertCountGoods(5);
|
29
|
-
await super.beforeEach();
|
30
|
-
const auth = heartwood_view_controllers_1.AuthenticatorImpl.getInstance();
|
31
|
-
test_utils_1.assert.isTruthy(auth.getSessionToken());
|
32
|
-
const client = login_1.default.getClient();
|
33
|
-
const person = login_1.default.getPerson();
|
34
|
-
//@ts-ignore
|
35
|
-
test_utils_1.assert.isEqualDeep(person, client.auth.person);
|
36
|
-
test_utils_1.assert.isTruthy(client);
|
37
|
-
test_utils_1.assert.isTrue(client.isConnected());
|
38
|
-
test_utils_1.assert.isTrue(client.getIsTestClient());
|
39
|
-
this.lastClient = client;
|
40
|
-
//@ts-ignore
|
41
|
-
test_utils_1.assert.isEqualDeep(auth.getPerson(), client.auth.person);
|
42
|
-
//@ts-ignore
|
43
|
-
test_utils_1.assert.isEqualDeep(auth.getSessionToken(), client.auth.token);
|
44
|
-
this.goodStore = await this.Fixture('store').Store('good');
|
45
|
-
await this.assertCountGoods(5);
|
46
|
-
}
|
47
|
-
static async afterAll() {
|
48
|
-
await super.afterAll();
|
49
|
-
const client = __1.MercuryFixture.getDefaultClient();
|
50
|
-
test_utils_1.assert.isFalsy(client);
|
51
|
-
}
|
52
|
-
static async loginSetsDefaultClient() {
|
53
|
-
const client = __1.MercuryFixture.getDefaultClient();
|
54
|
-
test_utils_1.assert.isTruthy(client);
|
55
|
-
test_utils_1.assert.isTrue(client.isConnected());
|
56
|
-
}
|
57
|
-
static async retainsClientBetweenTests() {
|
58
|
-
const client = __1.MercuryFixture.getDefaultClient();
|
59
|
-
test_utils_1.assert.isTruthy(client);
|
60
|
-
test_utils_1.assert.isEqual(this.lastClient, client);
|
61
|
-
test_utils_1.assert.isTrue(client.isConnected());
|
62
|
-
}
|
63
|
-
static async canSeedThreeOrgs() {
|
64
|
-
await this.assertCountOrgs(3);
|
65
|
-
}
|
66
|
-
static async canSeedFiveOrgs() {
|
67
|
-
await this.assertCountOrgs(5);
|
68
|
-
}
|
69
|
-
static async canSeedTwoLocations() {
|
70
|
-
await this.assertCountLocations(3);
|
71
|
-
}
|
72
|
-
static async seededLocationsArePublic() {
|
73
|
-
const locations = await this.locations.listLocations();
|
74
|
-
for (const location of locations) {
|
75
|
-
test_utils_1.assert.isTrue(location.isPublic);
|
76
|
-
}
|
77
|
-
}
|
78
|
-
static async canSeedTenLocations() {
|
79
|
-
await this.assertCountLocations(10);
|
80
|
-
}
|
81
|
-
static async locationUsesLatestOrg() {
|
82
|
-
await this.assertCountLocations(10);
|
83
|
-
await this.assertCountOrgs(10);
|
84
|
-
}
|
85
|
-
static async canSeedStores() {
|
86
|
-
test_utils_1.assert.isTrue(DummyStore_1.DummyStore.wasSeedInvoked);
|
87
|
-
test_utils_1.assert.isEqualDeep(DummyStore_1.DummyStore.seedOptions, {
|
88
|
-
totalToSeed: 10,
|
89
|
-
TestClass: this,
|
90
|
-
});
|
91
|
-
}
|
92
|
-
static logsInViewAuthenticator() {
|
93
|
-
test_utils_1.assert.isTruthy(heartwood_view_controllers_1.AuthenticatorImpl.getInstance().getSessionToken());
|
94
|
-
}
|
95
|
-
static passesThroughArgs(one, two, three) {
|
96
|
-
test_utils_1.assert.isEqual(one, 1);
|
97
|
-
test_utils_1.assert.isEqual(two, 1);
|
98
|
-
test_utils_1.assert.isEqual(three, 1);
|
99
|
-
}
|
100
|
-
static passesThroughArgs2(one) {
|
101
|
-
test_utils_1.assert.isEqualDeep(one, { hello: 'world' });
|
102
|
-
}
|
103
|
-
static async seedsAddToBeforeEach() {
|
104
|
-
await this.assertCountGoods(10);
|
105
|
-
}
|
106
|
-
static async seedsAddToBeforeEachButNotLastRun() {
|
107
|
-
await this.assertCountGoods(6);
|
108
|
-
}
|
109
|
-
static async canGetClientOffLogin() {
|
110
|
-
test_utils_1.assert.isFunction(login_1.default.getClient);
|
111
|
-
test_utils_1.assert.isEqual(login_1.default.getClient(), __1.MercuryFixture.getDefaultClient());
|
112
|
-
}
|
113
|
-
static async storeGetsVariablesPassed() {
|
114
|
-
test_utils_1.assert.isEqualDeep(Good_store_1.default.seedParams, ['hello', 'world']);
|
115
|
-
}
|
116
|
-
static async storeGetsVariablesPassed2() {
|
117
|
-
test_utils_1.assert.isEqualDeep(Good_store_1.default.seedParams, ['goodbye', 'people']);
|
118
|
-
}
|
119
|
-
static async canSeedPeople(baseCounts) {
|
120
|
-
await this.assertExpectedSeededPeople(baseCounts);
|
121
|
-
}
|
122
|
-
static async canSeedMorePeople(baseCounts) {
|
123
|
-
await this.assertExpectedSeededPeople(baseCounts);
|
124
|
-
}
|
125
|
-
static async assertExpectedSeededPeople(baseCounts) {
|
126
|
-
const bases = Object.keys(baseCounts);
|
127
|
-
for (const base of bases) {
|
128
|
-
const count = baseCounts[base];
|
129
|
-
await this.assertTotalPeopleByRole(base, count);
|
130
|
-
}
|
131
|
-
}
|
132
|
-
static async assertCountOrgs(expected) {
|
133
|
-
const organizations = await this.organizations.listOrganizations();
|
134
|
-
test_utils_1.assert.isLength(organizations, expected);
|
135
|
-
}
|
136
|
-
static async assertCountLocations(expected) {
|
137
|
-
const org = await this.views.getScope().getCurrentOrganization();
|
138
|
-
test_utils_1.assert.isTruthy(org);
|
139
|
-
const organizationId = org.id;
|
140
|
-
const locations = await this.locations.listLocations(organizationId);
|
141
|
-
test_utils_1.assert.isLength(locations, expected);
|
142
|
-
}
|
143
|
-
static async assertCountGoods(expected) {
|
144
|
-
const goodStore = await this.stores.Store('good');
|
145
|
-
const count = await goodStore.count({});
|
146
|
-
test_utils_1.assert.isEqual(count, expected);
|
147
|
-
const localCount = await this.goodStore.count({});
|
148
|
-
test_utils_1.assert.isEqual(localCount, expected, 'The store built in beforeEach is pointing at stale database.');
|
149
|
-
}
|
150
|
-
static async assertTotalPeopleByRole(roleBase, total) {
|
151
|
-
const org = await this.organizations.getNewestOrganization();
|
152
|
-
test_utils_1.assert.isTruthy(org);
|
153
|
-
const teammates = await this.people.listPeople({
|
154
|
-
organizationId: org.id,
|
155
|
-
roleBases: [roleBase],
|
156
|
-
});
|
157
|
-
test_utils_1.assert.isLength(teammates, total);
|
158
|
-
}
|
159
|
-
};
|
160
|
-
__decorate([
|
161
|
-
(0, seed_1.default)('good', 5),
|
162
|
-
(0, seed_1.default)('dummies', 10)
|
163
|
-
], UsingDecoratorsTest, "beforeEach", null);
|
164
|
-
__decorate([
|
165
|
-
(0, test_utils_1.test)()
|
166
|
-
], UsingDecoratorsTest, "loginSetsDefaultClient", null);
|
167
|
-
__decorate([
|
168
|
-
(0, test_utils_1.test)()
|
169
|
-
], UsingDecoratorsTest, "retainsClientBetweenTests", null);
|
170
|
-
__decorate([
|
171
|
-
(0, test_utils_1.test)(),
|
172
|
-
(0, seed_1.default)('organizations', 3)
|
173
|
-
], UsingDecoratorsTest, "canSeedThreeOrgs", null);
|
174
|
-
__decorate([
|
175
|
-
(0, test_utils_1.test)(),
|
176
|
-
(0, seed_1.default)('organizations', 5)
|
177
|
-
], UsingDecoratorsTest, "canSeedFiveOrgs", null);
|
178
|
-
__decorate([
|
179
|
-
(0, test_utils_1.test)(),
|
180
|
-
(0, seed_1.default)('locations', 3)
|
181
|
-
], UsingDecoratorsTest, "canSeedTwoLocations", null);
|
182
|
-
__decorate([
|
183
|
-
(0, test_utils_1.test)(),
|
184
|
-
(0, seed_1.default)('locations', 3)
|
185
|
-
], UsingDecoratorsTest, "seededLocationsArePublic", null);
|
186
|
-
__decorate([
|
187
|
-
(0, test_utils_1.test)(),
|
188
|
-
(0, seed_1.default)('locations', 10)
|
189
|
-
], UsingDecoratorsTest, "canSeedTenLocations", null);
|
190
|
-
__decorate([
|
191
|
-
(0, test_utils_1.test)(),
|
192
|
-
(0, seed_1.default)('organizations', 10),
|
193
|
-
(0, seed_1.default)('locations', 10)
|
194
|
-
], UsingDecoratorsTest, "locationUsesLatestOrg", null);
|
195
|
-
__decorate([
|
196
|
-
(0, test_utils_1.test)(),
|
197
|
-
(0, seed_1.default)('dummies', 10)
|
198
|
-
], UsingDecoratorsTest, "canSeedStores", null);
|
199
|
-
__decorate([
|
200
|
-
(0, test_utils_1.test)()
|
201
|
-
], UsingDecoratorsTest, "logsInViewAuthenticator", null);
|
202
|
-
__decorate([
|
203
|
-
(0, test_utils_1.test)('passes through args 1', 1, 1, 1),
|
204
|
-
(0, seed_1.default)('dummies', 3)
|
205
|
-
], UsingDecoratorsTest, "passesThroughArgs", null);
|
206
|
-
__decorate([
|
207
|
-
(0, test_utils_1.test)('passes through args 2', { hello: 'world' }),
|
208
|
-
(0, seed_1.default)('dummies', 3)
|
209
|
-
], UsingDecoratorsTest, "passesThroughArgs2", null);
|
210
|
-
__decorate([
|
211
|
-
(0, test_utils_1.test)(),
|
212
|
-
(0, seed_1.default)('good', 5)
|
213
|
-
], UsingDecoratorsTest, "seedsAddToBeforeEach", null);
|
214
|
-
__decorate([
|
215
|
-
(0, test_utils_1.test)(),
|
216
|
-
(0, seed_1.default)('good', 1)
|
217
|
-
], UsingDecoratorsTest, "seedsAddToBeforeEachButNotLastRun", null);
|
218
|
-
__decorate([
|
219
|
-
(0, test_utils_1.test)()
|
220
|
-
], UsingDecoratorsTest, "canGetClientOffLogin", null);
|
221
|
-
__decorate([
|
222
|
-
(0, test_utils_1.test)(),
|
223
|
-
(0, seed_1.default)('good', 1, 'hello', 'world')
|
224
|
-
], UsingDecoratorsTest, "storeGetsVariablesPassed", null);
|
225
|
-
__decorate([
|
226
|
-
(0, test_utils_1.test)(),
|
227
|
-
(0, seed_1.default)('good', 1, 'goodbye', 'people')
|
228
|
-
], UsingDecoratorsTest, "storeGetsVariablesPassed2", null);
|
229
|
-
__decorate([
|
230
|
-
(0, test_utils_1.test)('can seed people', {
|
231
|
-
guest: 2,
|
232
|
-
teammate: 2,
|
233
|
-
groupManager: 2,
|
234
|
-
manager: 2,
|
235
|
-
owner: 3,
|
236
|
-
}),
|
237
|
-
(0, seed_1.default)('organizations', 1),
|
238
|
-
(0, seed_1.default)('locations', 1),
|
239
|
-
(0, seed_1.default)('teammates', 2),
|
240
|
-
(0, seed_1.default)('guests', 2),
|
241
|
-
(0, seed_1.default)('groupManagers', 2),
|
242
|
-
(0, seed_1.default)('managers', 2),
|
243
|
-
(0, seed_1.default)('owners', 2)
|
244
|
-
], UsingDecoratorsTest, "canSeedPeople", null);
|
245
|
-
__decorate([
|
246
|
-
(0, test_utils_1.test)('can seed more people', {
|
247
|
-
guest: 5,
|
248
|
-
teammate: 5,
|
249
|
-
groupManager: 3,
|
250
|
-
manager: 4,
|
251
|
-
owner: 6,
|
252
|
-
}),
|
253
|
-
(0, seed_1.default)('organizations', 1),
|
254
|
-
(0, seed_1.default)('locations', 1),
|
255
|
-
(0, seed_1.default)('teammates', 5),
|
256
|
-
(0, seed_1.default)('guests', 5),
|
257
|
-
(0, seed_1.default)('groupManagers', 3),
|
258
|
-
(0, seed_1.default)('managers', 4),
|
259
|
-
(0, seed_1.default)('owners', 5)
|
260
|
-
], UsingDecoratorsTest, "canSeedMorePeople", null);
|
261
|
-
UsingDecoratorsTest = __decorate([
|
262
|
-
(0, login_1.default)(constants_1.DEMO_NUMBER_DECORATORS)
|
263
|
-
], UsingDecoratorsTest);
|
264
|
-
exports.default = UsingDecoratorsTest;
|
265
|
-
__1.StoreFixture.setStore('dummies', DummyStore_1.DummyStore);
|
266
|
-
__1.StoreFixture.setStore('good', Good_store_1.default);
|
@@ -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,117 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
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;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
const test_utils_1 = require("@sprucelabs/test-utils");
|
13
|
-
const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
|
14
|
-
const constants_1 = require("../../../tests/constants");
|
15
|
-
const install_1 = __importDefault(require("../../../tests/decorators/install"));
|
16
|
-
const login_1 = __importDefault(require("../../../tests/decorators/login"));
|
17
|
-
const seed_1 = __importDefault(require("../../../tests/decorators/seed"));
|
18
|
-
const MercuryFixture_1 = __importDefault(require("../../../tests/fixtures/MercuryFixture"));
|
19
|
-
MercuryFixture_1.default.setShouldRequireLocalListeners(false);
|
20
|
-
let UsingDecoratorsToInstallSkills = class UsingDecoratorsToInstallSkills extends AbstractSpruceFixtureTest_1.default {
|
21
|
-
static async beforeEach() {
|
22
|
-
await super.beforeEach();
|
23
|
-
this.skill = await this.skills.seedDemoSkill();
|
24
|
-
}
|
25
|
-
static throwsWhenMissingNamespaces() {
|
26
|
-
test_utils_1.assert.doesThrow(() => install_1.default.skills());
|
27
|
-
}
|
28
|
-
static returnsDecorator() {
|
29
|
-
const decorator = this.getDecorator();
|
30
|
-
test_utils_1.assert.isFunction(decorator);
|
31
|
-
}
|
32
|
-
static async callsOriginalTestMethod() {
|
33
|
-
let wasHit = false;
|
34
|
-
await this.executeDecorator({
|
35
|
-
testFunction: async () => {
|
36
|
-
wasHit = true;
|
37
|
-
},
|
38
|
-
});
|
39
|
-
test_utils_1.assert.isTrue(wasHit);
|
40
|
-
}
|
41
|
-
static async passesThroughOriginalArgs(args) {
|
42
|
-
let passedArgs;
|
43
|
-
await this.executeDecorator({
|
44
|
-
testFunction: async (...args) => {
|
45
|
-
passedArgs = args;
|
46
|
-
},
|
47
|
-
args,
|
48
|
-
});
|
49
|
-
test_utils_1.assert.isEqualDeep(passedArgs, args);
|
50
|
-
}
|
51
|
-
static async throwsWithoutSeedingOrg() {
|
52
|
-
await test_utils_1.assert.doesThrowAsync(() => this.executeDecorator({ testFunction: async () => { } }));
|
53
|
-
}
|
54
|
-
static async throwsWhenInstallingBadSkill() {
|
55
|
-
await test_utils_1.assert.doesThrowAsync(() => this.executeDecorator({
|
56
|
-
testFunction: async () => { },
|
57
|
-
namespaces: ['not-found'],
|
58
|
-
}));
|
59
|
-
}
|
60
|
-
static async doesNotEmitDidInstall() {
|
61
|
-
let passedPayload;
|
62
|
-
await login_1.default
|
63
|
-
.getClient()
|
64
|
-
.on('install-skill::v2020_12_25', ({ payload }) => {
|
65
|
-
passedPayload = payload;
|
66
|
-
return {};
|
67
|
-
});
|
68
|
-
await this.executeDecorator({
|
69
|
-
testFunction: async () => { },
|
70
|
-
});
|
71
|
-
test_utils_1.assert.isFalse(passedPayload.shouldNotifySkillOfInstall);
|
72
|
-
}
|
73
|
-
static async executeDecorator(options) {
|
74
|
-
const { testFunction, args, namespaces } = options;
|
75
|
-
const mockDescriptor = {
|
76
|
-
value: testFunction,
|
77
|
-
};
|
78
|
-
const decorator = this.getDecorator(namespaces);
|
79
|
-
decorator(this, 'myTest', mockDescriptor);
|
80
|
-
//@ts-ignore
|
81
|
-
await mockDescriptor.value(...(args ? args : []));
|
82
|
-
}
|
83
|
-
static getDecorator(namespaces) {
|
84
|
-
const slugs = namespaces !== null && namespaces !== void 0 ? namespaces : [this.skill.slug];
|
85
|
-
return install_1.default.skills(...slugs);
|
86
|
-
}
|
87
|
-
};
|
88
|
-
__decorate([
|
89
|
-
(0, test_utils_1.test)()
|
90
|
-
], UsingDecoratorsToInstallSkills, "throwsWhenMissingNamespaces", null);
|
91
|
-
__decorate([
|
92
|
-
(0, test_utils_1.test)()
|
93
|
-
], UsingDecoratorsToInstallSkills, "returnsDecorator", null);
|
94
|
-
__decorate([
|
95
|
-
(0, test_utils_1.test)(),
|
96
|
-
(0, seed_1.default)('organizations', 1)
|
97
|
-
], UsingDecoratorsToInstallSkills, "callsOriginalTestMethod", null);
|
98
|
-
__decorate([
|
99
|
-
(0, test_utils_1.test)('passes args 1', [1]),
|
100
|
-
(0, test_utils_1.test)('passes args 1', ['hello', 'world']),
|
101
|
-
(0, seed_1.default)('organizations', 1)
|
102
|
-
], UsingDecoratorsToInstallSkills, "passesThroughOriginalArgs", null);
|
103
|
-
__decorate([
|
104
|
-
(0, test_utils_1.test)()
|
105
|
-
], UsingDecoratorsToInstallSkills, "throwsWithoutSeedingOrg", null);
|
106
|
-
__decorate([
|
107
|
-
(0, test_utils_1.test)(),
|
108
|
-
(0, seed_1.default)('organizations', 1)
|
109
|
-
], UsingDecoratorsToInstallSkills, "throwsWhenInstallingBadSkill", null);
|
110
|
-
__decorate([
|
111
|
-
(0, test_utils_1.test)(),
|
112
|
-
(0, seed_1.default)('organizations', 1)
|
113
|
-
], UsingDecoratorsToInstallSkills, "doesNotEmitDidInstall", null);
|
114
|
-
UsingDecoratorsToInstallSkills = __decorate([
|
115
|
-
(0, login_1.default)(constants_1.DEMO_NUMBER_SKILL_DECORATORS)
|
116
|
-
], UsingDecoratorsToInstallSkills);
|
117
|
-
exports.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,55 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
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;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
const heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
|
13
|
-
const schema_1 = require("@sprucelabs/schema");
|
14
|
-
const test_utils_1 = require("@sprucelabs/test-utils");
|
15
|
-
const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
|
16
|
-
const Fake_svc_1 = __importDefault(require("../../../tests/Fake.svc"));
|
17
|
-
class FakingSkillViewControllersTest extends AbstractSpruceFixtureTest_1.default {
|
18
|
-
static async beforeEach() {
|
19
|
-
await super.beforeEach();
|
20
|
-
this.viewFixture = this.Fixture('view', {
|
21
|
-
controllerMap: {
|
22
|
-
fake: Fake_svc_1.default,
|
23
|
-
},
|
24
|
-
});
|
25
|
-
}
|
26
|
-
static async canRenderkFakeSkillViewController() {
|
27
|
-
const vc = this.viewFixture.Controller('fake', {});
|
28
|
-
const model = this.viewFixture.render(vc);
|
29
|
-
(0, schema_1.validateSchemaValues)(heartwood_view_controllers_1.skillViewSchema, model);
|
30
|
-
}
|
31
|
-
static async passesThroughConstructorAptions(options) {
|
32
|
-
const vc = this.viewFixture.Controller('fake', options);
|
33
|
-
test_utils_1.assert.doesInclude(vc.constructorOptions, options);
|
34
|
-
}
|
35
|
-
static async passesThroughLoadArgs(args) {
|
36
|
-
const vc = this.viewFixture.Controller('fake', {});
|
37
|
-
await this.viewFixture.load(vc, args);
|
38
|
-
test_utils_1.assert.isEqualDeep(vc.args, args);
|
39
|
-
}
|
40
|
-
}
|
41
|
-
FakingSkillViewControllersTest.controllerMap = {
|
42
|
-
fake: Fake_svc_1.default,
|
43
|
-
};
|
44
|
-
exports.default = FakingSkillViewControllersTest;
|
45
|
-
__decorate([
|
46
|
-
(0, test_utils_1.test)()
|
47
|
-
], FakingSkillViewControllersTest, "canRenderkFakeSkillViewController", null);
|
48
|
-
__decorate([
|
49
|
-
(0, test_utils_1.test)('passed constructor options 1', { hello: 'world' }),
|
50
|
-
(0, test_utils_1.test)('passed constructor options 2', { taco: 'bell' })
|
51
|
-
], FakingSkillViewControllersTest, "passesThroughConstructorAptions", null);
|
52
|
-
__decorate([
|
53
|
-
(0, test_utils_1.test)('passes args 1', { hello: 'world' }),
|
54
|
-
(0, test_utils_1.test)('passes args 2', { cheesey: 'burrito' })
|
55
|
-
], 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
|
-
}
|