@sprucelabs/spruce-test-fixtures 62.2.23 → 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,144 +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
|
-
var LocationFixtureTest_1;
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
13
|
-
const test_utils_1 = require("@sprucelabs/test-utils");
|
14
|
-
const AbstractSpruceFixtureTest_1 = __importDefault(require("../../tests/AbstractSpruceFixtureTest"));
|
15
|
-
const constants_1 = require("../../tests/constants");
|
16
|
-
const fake_1 = __importDefault(require("../../tests/decorators/fake"));
|
17
|
-
const LocationFixture_1 = __importDefault(require("../../tests/fixtures/LocationFixture"));
|
18
|
-
let LocationFixtureTest = LocationFixtureTest_1 = class LocationFixtureTest extends AbstractSpruceFixtureTest_1.default {
|
19
|
-
static async beforeEach() {
|
20
|
-
await super.beforeEach();
|
21
|
-
await this.seeder.resetAccount();
|
22
|
-
await this.seeder.resetAccount(constants_1.DEMO_NUMBER_LOCATION_FIXTURE_OUTSIDER);
|
23
|
-
}
|
24
|
-
static async canCreateWithSpecificOrg() {
|
25
|
-
const org = await this.organizations.seedDemoOrganization({
|
26
|
-
name: 'Location fixture org',
|
27
|
-
});
|
28
|
-
const location = await this.locations.seedDemoLocation({
|
29
|
-
name: 'Location fixture location',
|
30
|
-
organizationId: org.id,
|
31
|
-
});
|
32
|
-
test_utils_1.assert.isEqual(org.id, location.organizationId);
|
33
|
-
}
|
34
|
-
static async canCreatLocationWithNoParams() {
|
35
|
-
const location = await this.locations.seedDemoLocation({});
|
36
|
-
test_utils_1.assert.isTruthy(location);
|
37
|
-
}
|
38
|
-
static async isNotPartOfLocationToStart() {
|
39
|
-
const location = await this.locations.seedDemoLocation({
|
40
|
-
name: 'Location fixture location',
|
41
|
-
});
|
42
|
-
const { person } = await this.people.loginAsDemoPerson(constants_1.DEMO_NUMBER_LOCATION_FIXTURE_OUTSIDER);
|
43
|
-
const isHired = await this.locations.isPartOfLocation({
|
44
|
-
personId: person.id,
|
45
|
-
locationId: location.id,
|
46
|
-
phone: constants_1.DEMO_NUMBER_LOCATION_FIXTURE,
|
47
|
-
});
|
48
|
-
test_utils_1.assert.isFalse(isHired);
|
49
|
-
}
|
50
|
-
static async uniqueLocationName() {
|
51
|
-
const location1 = await this.locations.seedDemoLocation({});
|
52
|
-
const location2 = await this.locations.seedDemoLocation({});
|
53
|
-
test_utils_1.assert.isNotEqual(location1.name, location2.name);
|
54
|
-
}
|
55
|
-
static async locationCountResetBeforeEach() {
|
56
|
-
//@ts-ignore
|
57
|
-
test_utils_1.assert.isEqual(LocationFixture_1.default.locationCount, 0);
|
58
|
-
}
|
59
|
-
static async canAddPersonToLocation() {
|
60
|
-
const { person, location } = await this.seedLocationAndAddPerson();
|
61
|
-
const isHired = await LocationFixtureTest_1.isPersonPartOfLocation(person.id, location.id);
|
62
|
-
test_utils_1.assert.isTrue(isHired);
|
63
|
-
}
|
64
|
-
static async throwsWhenTryingToRemovePersonWithBadIds() {
|
65
|
-
await test_utils_1.assert.doesThrowAsync(() => this.locations.removePerson({
|
66
|
-
phone: constants_1.DEMO_NUMBER_LOCATION_FIXTURE,
|
67
|
-
personId: 'aoeu',
|
68
|
-
locationId: 'aoeu',
|
69
|
-
roleBase: 'test',
|
70
|
-
organizationId: '234',
|
71
|
-
}));
|
72
|
-
}
|
73
|
-
static async canRemoveRole() {
|
74
|
-
const { person, location } = await this.seedLocationAndAddPerson();
|
75
|
-
await this.locations.removePerson({
|
76
|
-
phone: constants_1.DEMO_NUMBER_LOCATION_FIXTURE,
|
77
|
-
personId: person.id,
|
78
|
-
locationId: location.id,
|
79
|
-
organizationId: location.organizationId,
|
80
|
-
roleBase: 'guest',
|
81
|
-
});
|
82
|
-
const isHired = await this.isPersonPartOfLocation(person.id, location.id);
|
83
|
-
test_utils_1.assert.isFalse(isHired);
|
84
|
-
}
|
85
|
-
static async isPersonPartOfLocation(personId, locationId) {
|
86
|
-
return await this.locations.isPartOfLocation({
|
87
|
-
phone: constants_1.DEMO_NUMBER_LOCATION_FIXTURE,
|
88
|
-
personId,
|
89
|
-
locationId,
|
90
|
-
});
|
91
|
-
}
|
92
|
-
static async seedLocationAndAddPerson() {
|
93
|
-
const org = await this.organizations.seedDemoOrganization({
|
94
|
-
name: 'Location fixture org',
|
95
|
-
phone: constants_1.DEMO_NUMBER_LOCATION_FIXTURE,
|
96
|
-
});
|
97
|
-
await this.organizations.seedDemoOrganization({
|
98
|
-
name: 'Outside org',
|
99
|
-
phone: constants_1.DEMO_NUMBER_LOCATION_FIXTURE_OUTSIDER,
|
100
|
-
});
|
101
|
-
const location = await this.locations.seedDemoLocation({
|
102
|
-
name: 'Location fixture location',
|
103
|
-
phone: constants_1.DEMO_NUMBER_LOCATION_FIXTURE,
|
104
|
-
organizationId: org.id,
|
105
|
-
});
|
106
|
-
const { person } = await this.people.loginAsDemoPerson(constants_1.DEMO_NUMBER_LOCATION_FIXTURE_OUTSIDER);
|
107
|
-
await this.locations.addPerson({
|
108
|
-
personId: person.id,
|
109
|
-
organizationId: org.id,
|
110
|
-
locationId: location.id,
|
111
|
-
roleBase: 'guest',
|
112
|
-
phone: constants_1.DEMO_NUMBER_LOCATION_FIXTURE,
|
113
|
-
});
|
114
|
-
return { location, person };
|
115
|
-
}
|
116
|
-
};
|
117
|
-
__decorate([
|
118
|
-
(0, test_utils_1.test)()
|
119
|
-
], LocationFixtureTest, "canCreateWithSpecificOrg", null);
|
120
|
-
__decorate([
|
121
|
-
(0, test_utils_1.test)()
|
122
|
-
], LocationFixtureTest, "canCreatLocationWithNoParams", null);
|
123
|
-
__decorate([
|
124
|
-
(0, test_utils_1.test)()
|
125
|
-
], LocationFixtureTest, "isNotPartOfLocationToStart", null);
|
126
|
-
__decorate([
|
127
|
-
(0, test_utils_1.test)()
|
128
|
-
], LocationFixtureTest, "uniqueLocationName", null);
|
129
|
-
__decorate([
|
130
|
-
(0, test_utils_1.test)()
|
131
|
-
], LocationFixtureTest, "locationCountResetBeforeEach", null);
|
132
|
-
__decorate([
|
133
|
-
(0, test_utils_1.test)()
|
134
|
-
], LocationFixtureTest, "canAddPersonToLocation", null);
|
135
|
-
__decorate([
|
136
|
-
(0, test_utils_1.test)()
|
137
|
-
], LocationFixtureTest, "throwsWhenTryingToRemovePersonWithBadIds", null);
|
138
|
-
__decorate([
|
139
|
-
(0, test_utils_1.test)()
|
140
|
-
], LocationFixtureTest, "canRemoveRole", null);
|
141
|
-
LocationFixtureTest = LocationFixtureTest_1 = __decorate([
|
142
|
-
fake_1.default.login(constants_1.DEMO_NUMBER_LOCATION_FIXTURE)
|
143
|
-
], LocationFixtureTest);
|
144
|
-
exports.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,95 +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 spruce_event_utils_1 = require("@sprucelabs/spruce-event-utils");
|
13
|
-
const test_utils_1 = require("@sprucelabs/test-utils");
|
14
|
-
const ClientProxyDecorator_1 = __importDefault(require("../../ClientProxyDecorator"));
|
15
|
-
const AbstractSpruceFixtureTest_1 = __importDefault(require("../../tests/AbstractSpruceFixtureTest"));
|
16
|
-
const constants_1 = require("../../tests/constants");
|
17
|
-
const login_1 = __importDefault(require("../../tests/decorators/login"));
|
18
|
-
const MercuryFixture_1 = __importDefault(require("../../tests/fixtures/MercuryFixture"));
|
19
|
-
MercuryFixture_1.default.setShouldRequireLocalListeners(false);
|
20
|
-
let LoginDecoratorHandlingProxiesForMeTest = class LoginDecoratorHandlingProxiesForMeTest extends AbstractSpruceFixtureTest_1.default {
|
21
|
-
static async proxyTokenGeneratorReturnsExpectedProxyToken(expected) {
|
22
|
-
await login_1.default.getClient().on('register-proxy-token::v2020_12_25', () => {
|
23
|
-
return {
|
24
|
-
token: expected,
|
25
|
-
};
|
26
|
-
});
|
27
|
-
const token = await this.generateToken();
|
28
|
-
test_utils_1.assert.isEqual(token, expected);
|
29
|
-
}
|
30
|
-
static async onlyEmitsEventOnce() {
|
31
|
-
let hitCount = 0;
|
32
|
-
await login_1.default.getClient().on('register-proxy-token::v2020_12_25', () => {
|
33
|
-
hitCount++;
|
34
|
-
return {
|
35
|
-
token: 'aoeu',
|
36
|
-
};
|
37
|
-
});
|
38
|
-
const generator = this.getDecorator().getProxyTokenGenerator();
|
39
|
-
await (generator === null || generator === void 0 ? void 0 : generator());
|
40
|
-
test_utils_1.assert.isEqual(hitCount, 0);
|
41
|
-
await (generator === null || generator === void 0 ? void 0 : generator());
|
42
|
-
await (generator === null || generator === void 0 ? void 0 : generator());
|
43
|
-
test_utils_1.assert.isEqual(hitCount, 0);
|
44
|
-
}
|
45
|
-
static async tokenSetBackAfterEachTest() {
|
46
|
-
this.lastToken = await this.generateToken();
|
47
|
-
await this.loginAsSecondPerson();
|
48
|
-
const newToken = await this.generateToken();
|
49
|
-
test_utils_1.assert.isNotEqual(this.lastToken, newToken);
|
50
|
-
}
|
51
|
-
static async tokenBackToOriginLoggedInPerson() {
|
52
|
-
const token = await this.generateToken();
|
53
|
-
test_utils_1.assert.isEqual(this.lastToken, token);
|
54
|
-
}
|
55
|
-
static async loggingAnAsDemoPerson2AgainSetsValidProxy() {
|
56
|
-
const { client } = await this.loginAsSecondPerson();
|
57
|
-
const token = await this.generateToken();
|
58
|
-
const results = await client.emit('whoami::v2020_12_25', {
|
59
|
-
source: {
|
60
|
-
proxyToken: token,
|
61
|
-
},
|
62
|
-
});
|
63
|
-
spruce_event_utils_1.eventResponseUtil.getFirstResponseOrThrow(results);
|
64
|
-
}
|
65
|
-
static getDecorator() {
|
66
|
-
return ClientProxyDecorator_1.default.getInstance();
|
67
|
-
}
|
68
|
-
static async generateToken() {
|
69
|
-
const generator = this.getDecorator().getProxyTokenGenerator();
|
70
|
-
const token = await (generator === null || generator === void 0 ? void 0 : generator());
|
71
|
-
return token;
|
72
|
-
}
|
73
|
-
static async loginAsSecondPerson() {
|
74
|
-
return this.Fixture('view').loginAsDemoPerson(constants_1.DEMO_NUMBER_LOGIN_DECORATOR_2);
|
75
|
-
}
|
76
|
-
};
|
77
|
-
__decorate([
|
78
|
-
(0, test_utils_1.test)('proxy set to random', `${Math.random() * new Date().getTime()}`)
|
79
|
-
], LoginDecoratorHandlingProxiesForMeTest, "proxyTokenGeneratorReturnsExpectedProxyToken", null);
|
80
|
-
__decorate([
|
81
|
-
(0, test_utils_1.test)()
|
82
|
-
], LoginDecoratorHandlingProxiesForMeTest, "onlyEmitsEventOnce", null);
|
83
|
-
__decorate([
|
84
|
-
(0, test_utils_1.test)()
|
85
|
-
], LoginDecoratorHandlingProxiesForMeTest, "tokenSetBackAfterEachTest", null);
|
86
|
-
__decorate([
|
87
|
-
(0, test_utils_1.test)()
|
88
|
-
], LoginDecoratorHandlingProxiesForMeTest, "tokenBackToOriginLoggedInPerson", null);
|
89
|
-
__decorate([
|
90
|
-
(0, test_utils_1.test)()
|
91
|
-
], LoginDecoratorHandlingProxiesForMeTest, "loggingAnAsDemoPerson2AgainSetsValidProxy", null);
|
92
|
-
LoginDecoratorHandlingProxiesForMeTest = __decorate([
|
93
|
-
(0, login_1.default)(constants_1.DEMO_NUMBER_LOGIN_DECORATOR)
|
94
|
-
], LoginDecoratorHandlingProxiesForMeTest);
|
95
|
-
exports.default = LoginDecoratorHandlingProxiesForMeTest;
|
@@ -1,35 +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 mercury_client_1 = require("@sprucelabs/mercury-client");
|
13
|
-
const spruce_skill_utils_1 = require("@sprucelabs/spruce-skill-utils");
|
14
|
-
const test_utils_1 = require("@sprucelabs/test-utils");
|
15
|
-
const AbstractSpruceFixtureTest_1 = __importDefault(require("../../tests/AbstractSpruceFixtureTest"));
|
16
|
-
const constants_1 = require("../../tests/constants");
|
17
|
-
const login_1 = __importDefault(require("../../tests/decorators/login"));
|
18
|
-
const MercuryFixture_1 = __importDefault(require("../../tests/fixtures/MercuryFixture"));
|
19
|
-
MercuryFixture_1.default.setShouldRequireLocalListeners(false);
|
20
|
-
let MakingSureLocalEventsAreHandledLocallyTest = class MakingSureLocalEventsAreHandledLocallyTest extends AbstractSpruceFixtureTest_1.default {
|
21
|
-
static async throwsWhenNoListenerSetForLocalEvent() {
|
22
|
-
await this.SkillFromTestDir('skill');
|
23
|
-
const skill = await this.skills.seedDemoSkill();
|
24
|
-
spruce_skill_utils_1.AuthService.Auth(this.cwd).updateCurrentSkill(skill);
|
25
|
-
await MercuryFixture_1.default.beforeEach(this.cwd);
|
26
|
-
test_utils_1.assert.isEqualDeep(mercury_client_1.MercuryTestClient.getNamespacesThatMustBeHandledLocally(), [skill.slug]);
|
27
|
-
}
|
28
|
-
};
|
29
|
-
__decorate([
|
30
|
-
(0, test_utils_1.test)()
|
31
|
-
], MakingSureLocalEventsAreHandledLocallyTest, "throwsWhenNoListenerSetForLocalEvent", null);
|
32
|
-
MakingSureLocalEventsAreHandledLocallyTest = __decorate([
|
33
|
-
(0, login_1.default)(constants_1.DEMO_NUMBER_HANDLING_EVENTS_LOCALLY)
|
34
|
-
], MakingSureLocalEventsAreHandledLocallyTest);
|
35
|
-
exports.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,187 +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 mercury_client_1 = require("@sprucelabs/mercury-client");
|
13
|
-
const mercury_core_events_1 = require("@sprucelabs/mercury-core-events");
|
14
|
-
const spruce_event_utils_1 = require("@sprucelabs/spruce-event-utils");
|
15
|
-
const spruce_skill_utils_1 = require("@sprucelabs/spruce-skill-utils");
|
16
|
-
const test_utils_1 = require("@sprucelabs/test-utils");
|
17
|
-
const AbstractSpruceFixtureTest_1 = __importDefault(require("../../tests/AbstractSpruceFixtureTest"));
|
18
|
-
const FixtureFactory_1 = __importDefault(require("../../tests/fixtures/FixtureFactory"));
|
19
|
-
const MercuryFixture_1 = __importDefault(require("../../tests/fixtures/MercuryFixture"));
|
20
|
-
class MercuryFixtureTest extends AbstractSpruceFixtureTest_1.default {
|
21
|
-
static async beforeEach() {
|
22
|
-
await super.beforeEach();
|
23
|
-
this.fixture = this.Fixture('mercury');
|
24
|
-
}
|
25
|
-
static async hasDefaultContractByDefault() {
|
26
|
-
const client = await this.fixture.connectToApi();
|
27
|
-
//@ts-ignore
|
28
|
-
test_utils_1.assert.isTruthy(client.eventContract);
|
29
|
-
const mixed = spruce_event_utils_1.eventContractUtil.unifyContracts([
|
30
|
-
mercury_core_events_1.coreEventContracts[0],
|
31
|
-
mercury_client_1.connectionStatusContract,
|
32
|
-
]);
|
33
|
-
test_utils_1.assert.doesInclude(
|
34
|
-
//@ts-ignore
|
35
|
-
client.eventContract, mixed);
|
36
|
-
}
|
37
|
-
static async canGetMoreThanOneClient() {
|
38
|
-
await this.fixture.connectToApi({ shouldReUseClient: false });
|
39
|
-
await this.fixture.connectToApi({ shouldReUseClient: false });
|
40
|
-
}
|
41
|
-
static async canCreateMercuryFixture() {
|
42
|
-
test_utils_1.assert.isTruthy(this.fixture);
|
43
|
-
}
|
44
|
-
static async returnsConnectedClient() {
|
45
|
-
const client = await this.fixture.connectToApi();
|
46
|
-
test_utils_1.assert.isTrue(client.isConnected());
|
47
|
-
await client.disconnect();
|
48
|
-
}
|
49
|
-
static async returnsSameClientOnSecondConnect() {
|
50
|
-
const client = await this.fixture.connectToApi();
|
51
|
-
//@ts-ignore
|
52
|
-
client.__monkeyPatch = true;
|
53
|
-
const client2 = await this.fixture.connectToApi();
|
54
|
-
//@ts-ignore
|
55
|
-
test_utils_1.assert.isTrue(client2.__monkeyPatch);
|
56
|
-
await client.disconnect();
|
57
|
-
test_utils_1.assert.isFalse(client2.isConnected());
|
58
|
-
}
|
59
|
-
static async importsContractIfLocalOneIsGenerated(sigs) {
|
60
|
-
this.createDirWriteContractFileAndSetCwd(sigs);
|
61
|
-
const client = await this.connectToApi();
|
62
|
-
//@ts-ignore
|
63
|
-
test_utils_1.assert.isTruthy(client.eventContract);
|
64
|
-
test_utils_1.assert.doesInclude(
|
65
|
-
//@ts-ignore
|
66
|
-
client.eventContract.eventSignatures, sigs[0].eventSignatures);
|
67
|
-
spruce_event_utils_1.eventContractUtil.getSignatureByName(
|
68
|
-
//@ts-ignore
|
69
|
-
client.eventContract, 'add-role::v2020_12_25');
|
70
|
-
}
|
71
|
-
static async beforeEachResetsBackToSavedContract() {
|
72
|
-
this.createDirWriteContractFileAndSetCwd([
|
73
|
-
{
|
74
|
-
eventSignatures: {
|
75
|
-
['new-event']: true,
|
76
|
-
},
|
77
|
-
},
|
78
|
-
]);
|
79
|
-
const client = (await this.connectToApi());
|
80
|
-
await MercuryFixture_1.default.beforeEach(this.cwd);
|
81
|
-
await client.on('new-event', () => { });
|
82
|
-
}
|
83
|
-
static async typesTestProperly() {
|
84
|
-
const test = () => {
|
85
|
-
return {};
|
86
|
-
};
|
87
|
-
const value = test();
|
88
|
-
test_utils_1.assert.isTruthy(value);
|
89
|
-
}
|
90
|
-
static async canSetDefaultClient() {
|
91
|
-
test_utils_1.assert.isFunction(MercuryFixture_1.default.setDefaultClient);
|
92
|
-
const client = await this.connectToApi();
|
93
|
-
MercuryFixture_1.default.setDefaultClient(client);
|
94
|
-
test_utils_1.assert.isEqual(MercuryFixture_1.default.getDefaultClient(), client);
|
95
|
-
}
|
96
|
-
static async allClientsGoingForwardUseThatClient() {
|
97
|
-
const client = await this.connectToApi();
|
98
|
-
MercuryFixture_1.default.setDefaultClient(client);
|
99
|
-
const client2 = await this.connectToApi();
|
100
|
-
test_utils_1.assert.isEqual(client, client2);
|
101
|
-
}
|
102
|
-
static async resetsDefaultClientBeforeEach() {
|
103
|
-
const client = await this.connectToApi();
|
104
|
-
MercuryFixture_1.default.setDefaultClient(client);
|
105
|
-
await MercuryFixture_1.default.beforeEach(this.cwd);
|
106
|
-
const client2 = await this.connectToApi();
|
107
|
-
test_utils_1.assert.isNotEqual(client, client2);
|
108
|
-
}
|
109
|
-
static async canForceNewClient() {
|
110
|
-
const client = await this.connectToApi();
|
111
|
-
MercuryFixture_1.default.setDefaultClient(client);
|
112
|
-
const client2 = await this.Fixture('mercury').connectToApi({
|
113
|
-
shouldReUseClient: false,
|
114
|
-
});
|
115
|
-
test_utils_1.assert.isNotEqual(client, client2);
|
116
|
-
}
|
117
|
-
static async setsRequiresLocalListenersByDefault() {
|
118
|
-
test_utils_1.assert.isTrue(mercury_client_1.MercuryTestClient.getShouldRequireLocalListeners());
|
119
|
-
}
|
120
|
-
static async connectToApi(options) {
|
121
|
-
return await new FixtureFactory_1.default({ cwd: this.cwd })
|
122
|
-
.Fixture('mercury')
|
123
|
-
.connectToApi(options);
|
124
|
-
}
|
125
|
-
static createDirWriteContractFileAndSetCwd(sigs) {
|
126
|
-
this.cwd = spruce_skill_utils_1.diskUtil.createRandomTempDir();
|
127
|
-
const destination = spruce_skill_utils_1.diskUtil.resolvePath(this.cwd, spruce_skill_utils_1.HASH_SPRUCE_BUILD_DIR, 'events/events.contract.js');
|
128
|
-
const contents = `exports["default"] = ${JSON.stringify([
|
129
|
-
...mercury_core_events_1.coreEventContracts,
|
130
|
-
...sigs,
|
131
|
-
])};`;
|
132
|
-
spruce_skill_utils_1.diskUtil.writeFile(destination, contents);
|
133
|
-
}
|
134
|
-
}
|
135
|
-
exports.default = MercuryFixtureTest;
|
136
|
-
__decorate([
|
137
|
-
(0, test_utils_1.test)()
|
138
|
-
], MercuryFixtureTest, "hasDefaultContractByDefault", null);
|
139
|
-
__decorate([
|
140
|
-
(0, test_utils_1.test)()
|
141
|
-
], MercuryFixtureTest, "canGetMoreThanOneClient", null);
|
142
|
-
__decorate([
|
143
|
-
(0, test_utils_1.test)()
|
144
|
-
], MercuryFixtureTest, "canCreateMercuryFixture", null);
|
145
|
-
__decorate([
|
146
|
-
(0, test_utils_1.test)()
|
147
|
-
], MercuryFixtureTest, "returnsConnectedClient", null);
|
148
|
-
__decorate([
|
149
|
-
(0, test_utils_1.test)()
|
150
|
-
], MercuryFixtureTest, "returnsSameClientOnSecondConnect", null);
|
151
|
-
__decorate([
|
152
|
-
(0, test_utils_1.test)('auto imports signature 1', [
|
153
|
-
{
|
154
|
-
eventSignatures: {
|
155
|
-
['taco-bravo']: true,
|
156
|
-
},
|
157
|
-
},
|
158
|
-
]),
|
159
|
-
(0, test_utils_1.test)('auto imports signature 2', [
|
160
|
-
{
|
161
|
-
eventSignatures: {
|
162
|
-
['taco-bravo2']: true,
|
163
|
-
},
|
164
|
-
},
|
165
|
-
])
|
166
|
-
], MercuryFixtureTest, "importsContractIfLocalOneIsGenerated", null);
|
167
|
-
__decorate([
|
168
|
-
(0, test_utils_1.test)()
|
169
|
-
], MercuryFixtureTest, "beforeEachResetsBackToSavedContract", null);
|
170
|
-
__decorate([
|
171
|
-
(0, test_utils_1.test)()
|
172
|
-
], MercuryFixtureTest, "typesTestProperly", null);
|
173
|
-
__decorate([
|
174
|
-
(0, test_utils_1.test)()
|
175
|
-
], MercuryFixtureTest, "canSetDefaultClient", null);
|
176
|
-
__decorate([
|
177
|
-
(0, test_utils_1.test)()
|
178
|
-
], MercuryFixtureTest, "allClientsGoingForwardUseThatClient", null);
|
179
|
-
__decorate([
|
180
|
-
(0, test_utils_1.test)()
|
181
|
-
], MercuryFixtureTest, "resetsDefaultClientBeforeEach", null);
|
182
|
-
__decorate([
|
183
|
-
(0, test_utils_1.test)()
|
184
|
-
], MercuryFixtureTest, "canForceNewClient", null);
|
185
|
-
__decorate([
|
186
|
-
(0, test_utils_1.test)()
|
187
|
-
], 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
|
-
}
|