@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,173 +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
|
-
var LocationFixtureTest_1;
|
17
|
-
import { test, assert } from '@sprucelabs/test-utils';
|
18
|
-
import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest.js';
|
19
|
-
import { DEMO_NUMBER_LOCATION_FIXTURE, DEMO_NUMBER_LOCATION_FIXTURE_OUTSIDER, } from '../../tests/constants.js';
|
20
|
-
import fake from '../../tests/decorators/fake.js';
|
21
|
-
import LocationFixture from '../../tests/fixtures/LocationFixture.js';
|
22
|
-
let LocationFixtureTest = LocationFixtureTest_1 = class LocationFixtureTest extends AbstractSpruceFixtureTest {
|
23
|
-
static beforeEach() {
|
24
|
-
const _super = Object.create(null, {
|
25
|
-
beforeEach: { get: () => super.beforeEach }
|
26
|
-
});
|
27
|
-
return __awaiter(this, void 0, void 0, function* () {
|
28
|
-
yield _super.beforeEach.call(this);
|
29
|
-
yield this.seeder.resetAccount();
|
30
|
-
yield this.seeder.resetAccount(DEMO_NUMBER_LOCATION_FIXTURE_OUTSIDER);
|
31
|
-
});
|
32
|
-
}
|
33
|
-
static canCreateWithSpecificOrg() {
|
34
|
-
return __awaiter(this, void 0, void 0, function* () {
|
35
|
-
const org = yield this.organizations.seedDemoOrganization({
|
36
|
-
name: 'Location fixture org',
|
37
|
-
});
|
38
|
-
const location = yield this.locations.seedDemoLocation({
|
39
|
-
name: 'Location fixture location',
|
40
|
-
organizationId: org.id,
|
41
|
-
});
|
42
|
-
assert.isEqual(org.id, location.organizationId);
|
43
|
-
});
|
44
|
-
}
|
45
|
-
static canCreatLocationWithNoParams() {
|
46
|
-
return __awaiter(this, void 0, void 0, function* () {
|
47
|
-
const location = yield this.locations.seedDemoLocation({});
|
48
|
-
assert.isTruthy(location);
|
49
|
-
});
|
50
|
-
}
|
51
|
-
static isNotPartOfLocationToStart() {
|
52
|
-
return __awaiter(this, void 0, void 0, function* () {
|
53
|
-
const location = yield this.locations.seedDemoLocation({
|
54
|
-
name: 'Location fixture location',
|
55
|
-
});
|
56
|
-
const { person } = yield this.people.loginAsDemoPerson(DEMO_NUMBER_LOCATION_FIXTURE_OUTSIDER);
|
57
|
-
const isHired = yield this.locations.isPartOfLocation({
|
58
|
-
personId: person.id,
|
59
|
-
locationId: location.id,
|
60
|
-
phone: DEMO_NUMBER_LOCATION_FIXTURE,
|
61
|
-
});
|
62
|
-
assert.isFalse(isHired);
|
63
|
-
});
|
64
|
-
}
|
65
|
-
static uniqueLocationName() {
|
66
|
-
return __awaiter(this, void 0, void 0, function* () {
|
67
|
-
const location1 = yield this.locations.seedDemoLocation({});
|
68
|
-
const location2 = yield this.locations.seedDemoLocation({});
|
69
|
-
assert.isNotEqual(location1.name, location2.name);
|
70
|
-
});
|
71
|
-
}
|
72
|
-
static locationCountResetBeforeEach() {
|
73
|
-
return __awaiter(this, void 0, void 0, function* () {
|
74
|
-
//@ts-ignore
|
75
|
-
assert.isEqual(LocationFixture.locationCount, 0);
|
76
|
-
});
|
77
|
-
}
|
78
|
-
static canAddPersonToLocation() {
|
79
|
-
return __awaiter(this, void 0, void 0, function* () {
|
80
|
-
const { person, location } = yield this.seedLocationAndAddPerson();
|
81
|
-
const isHired = yield LocationFixtureTest_1.isPersonPartOfLocation(person.id, location.id);
|
82
|
-
assert.isTrue(isHired);
|
83
|
-
});
|
84
|
-
}
|
85
|
-
static throwsWhenTryingToRemovePersonWithBadIds() {
|
86
|
-
return __awaiter(this, void 0, void 0, function* () {
|
87
|
-
yield assert.doesThrowAsync(() => this.locations.removePerson({
|
88
|
-
phone: DEMO_NUMBER_LOCATION_FIXTURE,
|
89
|
-
personId: 'aoeu',
|
90
|
-
locationId: 'aoeu',
|
91
|
-
roleBase: 'test',
|
92
|
-
organizationId: '234',
|
93
|
-
}));
|
94
|
-
});
|
95
|
-
}
|
96
|
-
static canRemoveRole() {
|
97
|
-
return __awaiter(this, void 0, void 0, function* () {
|
98
|
-
const { person, location } = yield this.seedLocationAndAddPerson();
|
99
|
-
yield this.locations.removePerson({
|
100
|
-
phone: DEMO_NUMBER_LOCATION_FIXTURE,
|
101
|
-
personId: person.id,
|
102
|
-
locationId: location.id,
|
103
|
-
organizationId: location.organizationId,
|
104
|
-
roleBase: 'guest',
|
105
|
-
});
|
106
|
-
const isHired = yield this.isPersonPartOfLocation(person.id, location.id);
|
107
|
-
assert.isFalse(isHired);
|
108
|
-
});
|
109
|
-
}
|
110
|
-
static isPersonPartOfLocation(personId, locationId) {
|
111
|
-
return __awaiter(this, void 0, void 0, function* () {
|
112
|
-
return yield this.locations.isPartOfLocation({
|
113
|
-
phone: DEMO_NUMBER_LOCATION_FIXTURE,
|
114
|
-
personId,
|
115
|
-
locationId,
|
116
|
-
});
|
117
|
-
});
|
118
|
-
}
|
119
|
-
static seedLocationAndAddPerson() {
|
120
|
-
return __awaiter(this, void 0, void 0, function* () {
|
121
|
-
const org = yield this.organizations.seedDemoOrganization({
|
122
|
-
name: 'Location fixture org',
|
123
|
-
phone: DEMO_NUMBER_LOCATION_FIXTURE,
|
124
|
-
});
|
125
|
-
yield this.organizations.seedDemoOrganization({
|
126
|
-
name: 'Outside org',
|
127
|
-
phone: DEMO_NUMBER_LOCATION_FIXTURE_OUTSIDER,
|
128
|
-
});
|
129
|
-
const location = yield this.locations.seedDemoLocation({
|
130
|
-
name: 'Location fixture location',
|
131
|
-
phone: DEMO_NUMBER_LOCATION_FIXTURE,
|
132
|
-
organizationId: org.id,
|
133
|
-
});
|
134
|
-
const { person } = yield this.people.loginAsDemoPerson(DEMO_NUMBER_LOCATION_FIXTURE_OUTSIDER);
|
135
|
-
yield this.locations.addPerson({
|
136
|
-
personId: person.id,
|
137
|
-
organizationId: org.id,
|
138
|
-
locationId: location.id,
|
139
|
-
roleBase: 'guest',
|
140
|
-
phone: DEMO_NUMBER_LOCATION_FIXTURE,
|
141
|
-
});
|
142
|
-
return { location, person };
|
143
|
-
});
|
144
|
-
}
|
145
|
-
};
|
146
|
-
__decorate([
|
147
|
-
test()
|
148
|
-
], LocationFixtureTest, "canCreateWithSpecificOrg", null);
|
149
|
-
__decorate([
|
150
|
-
test()
|
151
|
-
], LocationFixtureTest, "canCreatLocationWithNoParams", null);
|
152
|
-
__decorate([
|
153
|
-
test()
|
154
|
-
], LocationFixtureTest, "isNotPartOfLocationToStart", null);
|
155
|
-
__decorate([
|
156
|
-
test()
|
157
|
-
], LocationFixtureTest, "uniqueLocationName", null);
|
158
|
-
__decorate([
|
159
|
-
test()
|
160
|
-
], LocationFixtureTest, "locationCountResetBeforeEach", null);
|
161
|
-
__decorate([
|
162
|
-
test()
|
163
|
-
], LocationFixtureTest, "canAddPersonToLocation", null);
|
164
|
-
__decorate([
|
165
|
-
test()
|
166
|
-
], LocationFixtureTest, "throwsWhenTryingToRemovePersonWithBadIds", null);
|
167
|
-
__decorate([
|
168
|
-
test()
|
169
|
-
], LocationFixtureTest, "canRemoveRole", null);
|
170
|
-
LocationFixtureTest = LocationFixtureTest_1 = __decorate([
|
171
|
-
fake.login(DEMO_NUMBER_LOCATION_FIXTURE)
|
172
|
-
], LocationFixtureTest);
|
173
|
-
export default LocationFixtureTest;
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest';
|
2
|
-
export default class LoginDecoratorHandlingProxiesForMeTest extends AbstractSpruceFixtureTest {
|
3
|
-
private static lastToken?;
|
4
|
-
protected static proxyTokenGeneratorReturnsExpectedProxyToken(expected: string): Promise<void>;
|
5
|
-
protected static onlyEmitsEventOnce(): Promise<void>;
|
6
|
-
protected static tokenSetBackAfterEachTest(): Promise<void>;
|
7
|
-
protected static tokenBackToOriginLoggedInPerson(): Promise<void>;
|
8
|
-
protected static loggingAnAsDemoPerson2AgainSetsValidProxy(): Promise<void>;
|
9
|
-
private static getDecorator;
|
10
|
-
private static generateToken;
|
11
|
-
private static loginAsSecondPerson;
|
12
|
-
}
|
@@ -1,113 +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 { eventResponseUtil } from '@sprucelabs/spruce-event-utils';
|
17
|
-
import { test, assert } from '@sprucelabs/test-utils';
|
18
|
-
import ClientProxyDecorator from '../../ClientProxyDecorator.js';
|
19
|
-
import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest.js';
|
20
|
-
import { DEMO_NUMBER_LOGIN_DECORATOR, DEMO_NUMBER_LOGIN_DECORATOR_2, } from '../../tests/constants.js';
|
21
|
-
import login from '../../tests/decorators/login.js';
|
22
|
-
import MercuryFixture from '../../tests/fixtures/MercuryFixture.js';
|
23
|
-
MercuryFixture.setShouldRequireLocalListeners(false);
|
24
|
-
let LoginDecoratorHandlingProxiesForMeTest = class LoginDecoratorHandlingProxiesForMeTest extends AbstractSpruceFixtureTest {
|
25
|
-
static proxyTokenGeneratorReturnsExpectedProxyToken(expected) {
|
26
|
-
return __awaiter(this, void 0, void 0, function* () {
|
27
|
-
yield login.getClient().on('register-proxy-token::v2020_12_25', () => {
|
28
|
-
return {
|
29
|
-
token: expected,
|
30
|
-
};
|
31
|
-
});
|
32
|
-
const token = yield this.generateToken();
|
33
|
-
assert.isEqual(token, expected);
|
34
|
-
});
|
35
|
-
}
|
36
|
-
static onlyEmitsEventOnce() {
|
37
|
-
return __awaiter(this, void 0, void 0, function* () {
|
38
|
-
let hitCount = 0;
|
39
|
-
yield login.getClient().on('register-proxy-token::v2020_12_25', () => {
|
40
|
-
hitCount++;
|
41
|
-
return {
|
42
|
-
token: 'aoeu',
|
43
|
-
};
|
44
|
-
});
|
45
|
-
const generator = this.getDecorator().getProxyTokenGenerator();
|
46
|
-
yield (generator === null || generator === void 0 ? void 0 : generator());
|
47
|
-
assert.isEqual(hitCount, 0);
|
48
|
-
yield (generator === null || generator === void 0 ? void 0 : generator());
|
49
|
-
yield (generator === null || generator === void 0 ? void 0 : generator());
|
50
|
-
assert.isEqual(hitCount, 0);
|
51
|
-
});
|
52
|
-
}
|
53
|
-
static tokenSetBackAfterEachTest() {
|
54
|
-
return __awaiter(this, void 0, void 0, function* () {
|
55
|
-
this.lastToken = yield this.generateToken();
|
56
|
-
yield this.loginAsSecondPerson();
|
57
|
-
const newToken = yield this.generateToken();
|
58
|
-
assert.isNotEqual(this.lastToken, newToken);
|
59
|
-
});
|
60
|
-
}
|
61
|
-
static tokenBackToOriginLoggedInPerson() {
|
62
|
-
return __awaiter(this, void 0, void 0, function* () {
|
63
|
-
const token = yield this.generateToken();
|
64
|
-
assert.isEqual(this.lastToken, token);
|
65
|
-
});
|
66
|
-
}
|
67
|
-
static loggingAnAsDemoPerson2AgainSetsValidProxy() {
|
68
|
-
return __awaiter(this, void 0, void 0, function* () {
|
69
|
-
const { client } = yield this.loginAsSecondPerson();
|
70
|
-
const token = yield this.generateToken();
|
71
|
-
const results = yield client.emit('whoami::v2020_12_25', {
|
72
|
-
source: {
|
73
|
-
proxyToken: token,
|
74
|
-
},
|
75
|
-
});
|
76
|
-
eventResponseUtil.getFirstResponseOrThrow(results);
|
77
|
-
});
|
78
|
-
}
|
79
|
-
static getDecorator() {
|
80
|
-
return ClientProxyDecorator.getInstance();
|
81
|
-
}
|
82
|
-
static generateToken() {
|
83
|
-
return __awaiter(this, void 0, void 0, function* () {
|
84
|
-
const generator = this.getDecorator().getProxyTokenGenerator();
|
85
|
-
const token = yield (generator === null || generator === void 0 ? void 0 : generator());
|
86
|
-
return token;
|
87
|
-
});
|
88
|
-
}
|
89
|
-
static loginAsSecondPerson() {
|
90
|
-
return __awaiter(this, void 0, void 0, function* () {
|
91
|
-
return this.Fixture('view').loginAsDemoPerson(DEMO_NUMBER_LOGIN_DECORATOR_2);
|
92
|
-
});
|
93
|
-
}
|
94
|
-
};
|
95
|
-
__decorate([
|
96
|
-
test('proxy set to random', `${Math.random() * new Date().getTime()}`)
|
97
|
-
], LoginDecoratorHandlingProxiesForMeTest, "proxyTokenGeneratorReturnsExpectedProxyToken", null);
|
98
|
-
__decorate([
|
99
|
-
test()
|
100
|
-
], LoginDecoratorHandlingProxiesForMeTest, "onlyEmitsEventOnce", null);
|
101
|
-
__decorate([
|
102
|
-
test()
|
103
|
-
], LoginDecoratorHandlingProxiesForMeTest, "tokenSetBackAfterEachTest", null);
|
104
|
-
__decorate([
|
105
|
-
test()
|
106
|
-
], LoginDecoratorHandlingProxiesForMeTest, "tokenBackToOriginLoggedInPerson", null);
|
107
|
-
__decorate([
|
108
|
-
test()
|
109
|
-
], LoginDecoratorHandlingProxiesForMeTest, "loggingAnAsDemoPerson2AgainSetsValidProxy", null);
|
110
|
-
LoginDecoratorHandlingProxiesForMeTest = __decorate([
|
111
|
-
login(DEMO_NUMBER_LOGIN_DECORATOR)
|
112
|
-
], LoginDecoratorHandlingProxiesForMeTest);
|
113
|
-
export default LoginDecoratorHandlingProxiesForMeTest;
|
@@ -1,41 +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 { MercuryTestClient } from '@sprucelabs/mercury-client';
|
17
|
-
import { AuthService } from '@sprucelabs/spruce-skill-utils';
|
18
|
-
import { assert, test } from '@sprucelabs/test-utils';
|
19
|
-
import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest.js';
|
20
|
-
import { DEMO_NUMBER_HANDLING_EVENTS_LOCALLY } from '../../tests/constants.js';
|
21
|
-
import login from '../../tests/decorators/login.js';
|
22
|
-
import MercuryFixture from '../../tests/fixtures/MercuryFixture.js';
|
23
|
-
MercuryFixture.setShouldRequireLocalListeners(false);
|
24
|
-
let MakingSureLocalEventsAreHandledLocallyTest = class MakingSureLocalEventsAreHandledLocallyTest extends AbstractSpruceFixtureTest {
|
25
|
-
static throwsWhenNoListenerSetForLocalEvent() {
|
26
|
-
return __awaiter(this, void 0, void 0, function* () {
|
27
|
-
yield this.SkillFromTestDir('skill');
|
28
|
-
const skill = yield this.skills.seedDemoSkill();
|
29
|
-
AuthService.Auth(this.cwd).updateCurrentSkill(skill);
|
30
|
-
yield MercuryFixture.beforeEach(this.cwd);
|
31
|
-
assert.isEqualDeep(MercuryTestClient.getNamespacesThatMustBeHandledLocally(), [skill.slug]);
|
32
|
-
});
|
33
|
-
}
|
34
|
-
};
|
35
|
-
__decorate([
|
36
|
-
test()
|
37
|
-
], MakingSureLocalEventsAreHandledLocallyTest, "throwsWhenNoListenerSetForLocalEvent", null);
|
38
|
-
MakingSureLocalEventsAreHandledLocallyTest = __decorate([
|
39
|
-
login(DEMO_NUMBER_HANDLING_EVENTS_LOCALLY)
|
40
|
-
], MakingSureLocalEventsAreHandledLocallyTest);
|
41
|
-
export default MakingSureLocalEventsAreHandledLocallyTest;
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest';
|
2
|
-
export default class MercuryFixtureTest extends AbstractSpruceFixtureTest {
|
3
|
-
private static fixture;
|
4
|
-
protected static beforeEach(): Promise<void>;
|
5
|
-
protected static hasDefaultContractByDefault(): Promise<void>;
|
6
|
-
protected static canGetMoreThanOneClient(): Promise<void>;
|
7
|
-
protected static canCreateMercuryFixture(): Promise<void>;
|
8
|
-
protected static returnsConnectedClient(): Promise<void>;
|
9
|
-
protected static returnsSameClientOnSecondConnect(): Promise<void>;
|
10
|
-
protected static importsContractIfLocalOneIsGenerated(sigs: any[]): Promise<void>;
|
11
|
-
protected static beforeEachResetsBackToSavedContract(): Promise<void>;
|
12
|
-
protected static typesTestProperly(): Promise<void>;
|
13
|
-
protected static canSetDefaultClient(): Promise<void>;
|
14
|
-
protected static allClientsGoingForwardUseThatClient(): Promise<void>;
|
15
|
-
protected static resetsDefaultClientBeforeEach(): Promise<void>;
|
16
|
-
protected static canForceNewClient(): Promise<void>;
|
17
|
-
protected static setsRequiresLocalListenersByDefault(): Promise<void>;
|
18
|
-
private static connectToApi;
|
19
|
-
private static createDirWriteContractFileAndSetCwd;
|
20
|
-
}
|
@@ -1,223 +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 { MercuryTestClient, connectionStatusContract, } from '@sprucelabs/mercury-client';
|
17
|
-
import { coreEventContracts } from '@sprucelabs/mercury-core-events';
|
18
|
-
import { eventContractUtil } from '@sprucelabs/spruce-event-utils';
|
19
|
-
import { diskUtil, HASH_SPRUCE_BUILD_DIR } from '@sprucelabs/spruce-skill-utils';
|
20
|
-
import { test, assert } from '@sprucelabs/test-utils';
|
21
|
-
import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest.js';
|
22
|
-
import FixtureFactory from '../../tests/fixtures/FixtureFactory.js';
|
23
|
-
import MercuryFixture from '../../tests/fixtures/MercuryFixture.js';
|
24
|
-
export default class MercuryFixtureTest 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.fixture = this.Fixture('mercury');
|
32
|
-
});
|
33
|
-
}
|
34
|
-
static hasDefaultContractByDefault() {
|
35
|
-
return __awaiter(this, void 0, void 0, function* () {
|
36
|
-
const client = yield this.fixture.connectToApi();
|
37
|
-
//@ts-ignore
|
38
|
-
assert.isTruthy(client.eventContract);
|
39
|
-
const mixed = eventContractUtil.unifyContracts([
|
40
|
-
coreEventContracts[0],
|
41
|
-
connectionStatusContract,
|
42
|
-
]);
|
43
|
-
assert.doesInclude(
|
44
|
-
//@ts-ignore
|
45
|
-
client.eventContract, mixed);
|
46
|
-
});
|
47
|
-
}
|
48
|
-
static canGetMoreThanOneClient() {
|
49
|
-
return __awaiter(this, void 0, void 0, function* () {
|
50
|
-
yield this.fixture.connectToApi({ shouldReUseClient: false });
|
51
|
-
yield this.fixture.connectToApi({ shouldReUseClient: false });
|
52
|
-
});
|
53
|
-
}
|
54
|
-
static canCreateMercuryFixture() {
|
55
|
-
return __awaiter(this, void 0, void 0, function* () {
|
56
|
-
assert.isTruthy(this.fixture);
|
57
|
-
});
|
58
|
-
}
|
59
|
-
static returnsConnectedClient() {
|
60
|
-
return __awaiter(this, void 0, void 0, function* () {
|
61
|
-
const client = yield this.fixture.connectToApi();
|
62
|
-
assert.isTrue(client.isConnected());
|
63
|
-
yield client.disconnect();
|
64
|
-
});
|
65
|
-
}
|
66
|
-
static returnsSameClientOnSecondConnect() {
|
67
|
-
return __awaiter(this, void 0, void 0, function* () {
|
68
|
-
const client = yield this.fixture.connectToApi();
|
69
|
-
//@ts-ignore
|
70
|
-
client.__monkeyPatch = true;
|
71
|
-
const client2 = yield this.fixture.connectToApi();
|
72
|
-
//@ts-ignore
|
73
|
-
assert.isTrue(client2.__monkeyPatch);
|
74
|
-
yield client.disconnect();
|
75
|
-
assert.isFalse(client2.isConnected());
|
76
|
-
});
|
77
|
-
}
|
78
|
-
static importsContractIfLocalOneIsGenerated(sigs) {
|
79
|
-
return __awaiter(this, void 0, void 0, function* () {
|
80
|
-
this.createDirWriteContractFileAndSetCwd(sigs);
|
81
|
-
const client = yield this.connectToApi();
|
82
|
-
//@ts-ignore
|
83
|
-
assert.isTruthy(client.eventContract);
|
84
|
-
assert.doesInclude(
|
85
|
-
//@ts-ignore
|
86
|
-
client.eventContract.eventSignatures, sigs[0].eventSignatures);
|
87
|
-
eventContractUtil.getSignatureByName(
|
88
|
-
//@ts-ignore
|
89
|
-
client.eventContract, 'add-role::v2020_12_25');
|
90
|
-
});
|
91
|
-
}
|
92
|
-
static beforeEachResetsBackToSavedContract() {
|
93
|
-
return __awaiter(this, void 0, void 0, function* () {
|
94
|
-
this.createDirWriteContractFileAndSetCwd([
|
95
|
-
{
|
96
|
-
eventSignatures: {
|
97
|
-
['new-event']: true,
|
98
|
-
},
|
99
|
-
},
|
100
|
-
]);
|
101
|
-
const client = (yield this.connectToApi());
|
102
|
-
yield MercuryFixture.beforeEach(this.cwd);
|
103
|
-
yield client.on('new-event', () => { });
|
104
|
-
});
|
105
|
-
}
|
106
|
-
static typesTestProperly() {
|
107
|
-
return __awaiter(this, void 0, void 0, function* () {
|
108
|
-
const test = () => {
|
109
|
-
return {};
|
110
|
-
};
|
111
|
-
const value = test();
|
112
|
-
assert.isTruthy(value);
|
113
|
-
});
|
114
|
-
}
|
115
|
-
static canSetDefaultClient() {
|
116
|
-
return __awaiter(this, void 0, void 0, function* () {
|
117
|
-
assert.isFunction(MercuryFixture.setDefaultClient);
|
118
|
-
const client = yield this.connectToApi();
|
119
|
-
MercuryFixture.setDefaultClient(client);
|
120
|
-
assert.isEqual(MercuryFixture.getDefaultClient(), client);
|
121
|
-
});
|
122
|
-
}
|
123
|
-
static allClientsGoingForwardUseThatClient() {
|
124
|
-
return __awaiter(this, void 0, void 0, function* () {
|
125
|
-
const client = yield this.connectToApi();
|
126
|
-
MercuryFixture.setDefaultClient(client);
|
127
|
-
const client2 = yield this.connectToApi();
|
128
|
-
assert.isEqual(client, client2);
|
129
|
-
});
|
130
|
-
}
|
131
|
-
static resetsDefaultClientBeforeEach() {
|
132
|
-
return __awaiter(this, void 0, void 0, function* () {
|
133
|
-
const client = yield this.connectToApi();
|
134
|
-
MercuryFixture.setDefaultClient(client);
|
135
|
-
yield MercuryFixture.beforeEach(this.cwd);
|
136
|
-
const client2 = yield this.connectToApi();
|
137
|
-
assert.isNotEqual(client, client2);
|
138
|
-
});
|
139
|
-
}
|
140
|
-
static canForceNewClient() {
|
141
|
-
return __awaiter(this, void 0, void 0, function* () {
|
142
|
-
const client = yield this.connectToApi();
|
143
|
-
MercuryFixture.setDefaultClient(client);
|
144
|
-
const client2 = yield this.Fixture('mercury').connectToApi({
|
145
|
-
shouldReUseClient: false,
|
146
|
-
});
|
147
|
-
assert.isNotEqual(client, client2);
|
148
|
-
});
|
149
|
-
}
|
150
|
-
static setsRequiresLocalListenersByDefault() {
|
151
|
-
return __awaiter(this, void 0, void 0, function* () {
|
152
|
-
assert.isTrue(MercuryTestClient.getShouldRequireLocalListeners());
|
153
|
-
});
|
154
|
-
}
|
155
|
-
static connectToApi(options) {
|
156
|
-
return __awaiter(this, void 0, void 0, function* () {
|
157
|
-
return yield new FixtureFactory({ cwd: this.cwd })
|
158
|
-
.Fixture('mercury')
|
159
|
-
.connectToApi(options);
|
160
|
-
});
|
161
|
-
}
|
162
|
-
static createDirWriteContractFileAndSetCwd(sigs) {
|
163
|
-
this.cwd = diskUtil.createRandomTempDir();
|
164
|
-
const destination = diskUtil.resolvePath(this.cwd, HASH_SPRUCE_BUILD_DIR, 'events/events.contract.js');
|
165
|
-
const contents = `exports["default"] = ${JSON.stringify([
|
166
|
-
...coreEventContracts,
|
167
|
-
...sigs,
|
168
|
-
])};`;
|
169
|
-
diskUtil.writeFile(destination, contents);
|
170
|
-
}
|
171
|
-
}
|
172
|
-
__decorate([
|
173
|
-
test()
|
174
|
-
], MercuryFixtureTest, "hasDefaultContractByDefault", null);
|
175
|
-
__decorate([
|
176
|
-
test()
|
177
|
-
], MercuryFixtureTest, "canGetMoreThanOneClient", null);
|
178
|
-
__decorate([
|
179
|
-
test()
|
180
|
-
], MercuryFixtureTest, "canCreateMercuryFixture", null);
|
181
|
-
__decorate([
|
182
|
-
test()
|
183
|
-
], MercuryFixtureTest, "returnsConnectedClient", null);
|
184
|
-
__decorate([
|
185
|
-
test()
|
186
|
-
], MercuryFixtureTest, "returnsSameClientOnSecondConnect", null);
|
187
|
-
__decorate([
|
188
|
-
test('auto imports signature 1', [
|
189
|
-
{
|
190
|
-
eventSignatures: {
|
191
|
-
['taco-bravo']: true,
|
192
|
-
},
|
193
|
-
},
|
194
|
-
]),
|
195
|
-
test('auto imports signature 2', [
|
196
|
-
{
|
197
|
-
eventSignatures: {
|
198
|
-
['taco-bravo2']: true,
|
199
|
-
},
|
200
|
-
},
|
201
|
-
])
|
202
|
-
], MercuryFixtureTest, "importsContractIfLocalOneIsGenerated", null);
|
203
|
-
__decorate([
|
204
|
-
test()
|
205
|
-
], MercuryFixtureTest, "beforeEachResetsBackToSavedContract", null);
|
206
|
-
__decorate([
|
207
|
-
test()
|
208
|
-
], MercuryFixtureTest, "typesTestProperly", null);
|
209
|
-
__decorate([
|
210
|
-
test()
|
211
|
-
], MercuryFixtureTest, "canSetDefaultClient", null);
|
212
|
-
__decorate([
|
213
|
-
test()
|
214
|
-
], MercuryFixtureTest, "allClientsGoingForwardUseThatClient", null);
|
215
|
-
__decorate([
|
216
|
-
test()
|
217
|
-
], MercuryFixtureTest, "resetsDefaultClientBeforeEach", null);
|
218
|
-
__decorate([
|
219
|
-
test()
|
220
|
-
], MercuryFixtureTest, "canForceNewClient", null);
|
221
|
-
__decorate([
|
222
|
-
test()
|
223
|
-
], MercuryFixtureTest, "setsRequiresLocalListenersByDefault", null);
|
@@ -1,31 +0,0 @@
|
|
1
|
-
import AbstractSpruceFixtureTest from '../../tests/AbstractSpruceFixtureTest';
|
2
|
-
import { RoleBase } from '../../types/fixture.types';
|
3
|
-
export default class OrganizationFixtureTest extends AbstractSpruceFixtureTest {
|
4
|
-
protected static canCreateOrganizationFixture(): Promise<void>;
|
5
|
-
protected static canSeedOrg(): Promise<void>;
|
6
|
-
protected static orgFixtureDestroysOrgs(): Promise<void>;
|
7
|
-
protected static isNotPartOfOrgtoStart(): Promise<void>;
|
8
|
-
protected static updatingBadOrgTHrows(): Promise<void>;
|
9
|
-
protected static canUpdateOrg(): Promise<void>;
|
10
|
-
protected static canUpdateOrgAddress(): Promise<void>;
|
11
|
-
protected static canMakeOrgPublicAndPrivate(): Promise<void>;
|
12
|
-
protected static canAddPersonToOrg(base: RoleBase): Promise<void>;
|
13
|
-
private static isPersonPartOfOrg;
|
14
|
-
protected static isNotInstalledByDefault(): Promise<void>;
|
15
|
-
protected static showsAsInstalled(): Promise<void>;
|
16
|
-
protected static cantInstallWithBadSkill(): Promise<void>;
|
17
|
-
protected static canInstallWithSlug(): Promise<void>;
|
18
|
-
protected static canInstallSkillFromAnotherPerson(): Promise<void>;
|
19
|
-
protected static canDeleteAllExistingOrgs(): Promise<void>;
|
20
|
-
protected static passesThroughAllFieldsToRequest(): Promise<void>;
|
21
|
-
protected static canPassPersonFixture(): void;
|
22
|
-
protected static canSeedOrgWithNoOptions(): Promise<void>;
|
23
|
-
protected static removePersonThrowsWithBadIds(): Promise<void>;
|
24
|
-
protected static canRemovePersonFromOrg(roleBase: RoleBase): Promise<void>;
|
25
|
-
private static Org;
|
26
|
-
private static seedOrgAndHirePerson;
|
27
|
-
private static assertSkillIsInstalled;
|
28
|
-
private static seedOrgAndSkill;
|
29
|
-
private static assertOrgIsPublicValue;
|
30
|
-
private static setAndAssertOrgIsPublic;
|
31
|
-
}
|