@sprucelabs/spruce-test-fixtures 62.2.24 → 62.2.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/esm/index.d.ts +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/tests/fixtures/ViewFixture.d.ts +1 -1
- package/build/esm/tests/routers/TestRouter.d.ts +1 -1
- package/build/esm/tests/routers/TestRouter.js +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.js +1 -1
- package/build/tests/fixtures/ViewFixture.d.ts +1 -1
- package/build/tests/routers/TestRouter.d.ts +1 -1
- package/build/tests/routers/TestRouter.js +1 -1
- package/package.json +19 -19
- package/build/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.d.ts +0 -15
- package/build/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +0 -112
- package/build/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.d.ts +0 -4
- package/build/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +0 -34
- package/build/__tests__/behavioral/DisablingSchemaValidationOnTest.test.d.ts +0 -5
- package/build/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +0 -26
- package/build/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.d.ts +0 -8
- package/build/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +0 -69
- package/build/__tests__/behavioral/FakingEventResponses.test.d.ts +0 -12
- package/build/__tests__/behavioral/FakingEventResponses.test.js +0 -126
- package/build/__tests__/behavioral/FixtureFactory.test.d.ts +0 -7
- package/build/__tests__/behavioral/FixtureFactory.test.js +0 -79
- package/build/__tests__/behavioral/LocationFixture.test.d.ts +0 -17
- package/build/__tests__/behavioral/LocationFixture.test.js +0 -144
- package/build/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.d.ts +0 -12
- package/build/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +0 -95
- package/build/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.d.ts +0 -4
- package/build/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +0 -35
- package/build/__tests__/behavioral/MercuryFixture.test.d.ts +0 -20
- package/build/__tests__/behavioral/MercuryFixture.test.js +0 -187
- package/build/__tests__/behavioral/OrganizationFixture.test.d.ts +0 -31
- package/build/__tests__/behavioral/OrganizationFixture.test.js +0 -333
- package/build/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.d.ts +0 -4
- package/build/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +0 -21
- package/build/__tests__/behavioral/PersonFixture.test.d.ts +0 -22
- package/build/__tests__/behavioral/PersonFixture.test.js +0 -225
- package/build/__tests__/behavioral/PhoneNumberIncrementor.test.d.ts +0 -11
- package/build/__tests__/behavioral/PhoneNumberIncrementor.test.js +0 -95
- package/build/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.d.ts +0 -8
- package/build/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +0 -67
- package/build/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.d.ts +0 -5
- package/build/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +0 -44
- package/build/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.d.ts +0 -8
- package/build/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +0 -55
- package/build/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.d.ts +0 -10
- package/build/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +0 -137
- package/build/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.d.ts +0 -7
- package/build/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +0 -54
- package/build/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.d.ts +0 -6
- package/build/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +0 -40
- package/build/__tests__/behavioral/RoleFixture.test.d.ts +0 -15
- package/build/__tests__/behavioral/RoleFixture.test.js +0 -118
- package/build/__tests__/behavioral/SkillFixture.test.d.ts +0 -13
- package/build/__tests__/behavioral/SkillFixture.test.js +0 -118
- package/build/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.d.ts +0 -7
- package/build/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.js +0 -41
- package/build/__tests__/behavioral/databases/DatabaseFixture.test.d.ts +0 -7
- package/build/__tests__/behavioral/databases/DatabaseFixture.test.js +0 -59
- package/build/__tests__/behavioral/databases/DbResetsAsExpected.test.d.ts +0 -5
- package/build/__tests__/behavioral/databases/DbResetsAsExpected.test.js +0 -34
- package/build/__tests__/behavioral/databases/DummyStore.d.ts +0 -55
- package/build/__tests__/behavioral/databases/DummyStore.js +0 -36
- package/build/__tests__/behavioral/databases/StoreFixture.test.d.ts +0 -23
- package/build/__tests__/behavioral/databases/StoreFixture.test.js +0 -156
- package/build/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.d.ts +0 -9
- package/build/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +0 -73
- package/build/__tests__/behavioral/faking/FakeDecorator.test.d.ts +0 -45
- package/build/__tests__/behavioral/faking/FakeDecorator.test.js +0 -421
- package/build/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.d.ts +0 -4
- package/build/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +0 -23
- package/build/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.d.ts +0 -4
- package/build/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +0 -27
- package/build/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +0 -8
- package/build/__tests__/behavioral/faking/FakeThemeManager.test.js +0 -93
- package/build/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.d.ts +0 -8
- package/build/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +0 -56
- package/build/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.d.ts +0 -14
- package/build/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +0 -141
- package/build/__tests__/behavioral/faking/FakingAuthenticator.test.d.ts +0 -5
- package/build/__tests__/behavioral/faking/FakingAuthenticator.test.js +0 -35
- package/build/__tests__/behavioral/faking/FakingInBeforeEach.test.d.ts +0 -6
- package/build/__tests__/behavioral/faking/FakingInBeforeEach.test.js +0 -42
- package/build/__tests__/behavioral/faking/FakingLocations.test.d.ts +0 -6
- package/build/__tests__/behavioral/faking/FakingLocations.test.js +0 -45
- package/build/__tests__/behavioral/faking/FakingRoleEvents.test.d.ts +0 -19
- package/build/__tests__/behavioral/faking/FakingRoleEvents.test.js +0 -140
- package/build/__tests__/behavioral/faking/FakingSkillEvents.test.d.ts +0 -24
- package/build/__tests__/behavioral/faking/FakingSkillEvents.test.js +0 -174
- package/build/__tests__/behavioral/faking/UpdatePerson.test.d.ts +0 -4
- package/build/__tests__/behavioral/faking/UpdatePerson.test.js +0 -32
- package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.d.ts +0 -35
- package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.js +0 -321
- package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +0 -4
- package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +0 -48
- package/build/__tests__/behavioral/faking/WhoAmI.test.d.ts +0 -19
- package/build/__tests__/behavioral/faking/WhoAmI.test.js +0 -105
- package/build/__tests__/behavioral/maps/SpyingMapUtil.test.d.ts +0 -10
- package/build/__tests__/behavioral/maps/SpyingMapUtil.test.js +0 -76
- package/build/__tests__/behavioral/permissions/FakeAuthorizer.test.d.ts +0 -34
- package/build/__tests__/behavioral/permissions/FakeAuthorizer.test.js +0 -272
- package/build/__tests__/behavioral/permissions/PermissionFixture.test.d.ts +0 -5
- package/build/__tests__/behavioral/permissions/PermissionFixture.test.js +0 -35
- package/build/__tests__/behavioral/seeding/SeedingData.test.d.ts +0 -24
- package/build/__tests__/behavioral/seeding/SeedingData.test.js +0 -271
- package/build/__tests__/behavioral/seeding/UsingDecorators.test.d.ts +0 -37
- package/build/__tests__/behavioral/seeding/UsingDecorators.test.js +0 -266
- package/build/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.d.ts +0 -14
- package/build/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +0 -117
- package/build/__tests__/behavioral/views/FakingSkillViewControllers.test.d.ts +0 -12
- package/build/__tests__/behavioral/views/FakingSkillViewControllers.test.js +0 -55
- package/build/__tests__/behavioral/views/Routing.test.d.ts +0 -36
- package/build/__tests__/behavioral/views/Routing.test.js +0 -177
- package/build/__tests__/behavioral/views/TestingScope.test.d.ts +0 -24
- package/build/__tests__/behavioral/views/TestingScope.test.js +0 -197
- package/build/__tests__/behavioral/views/ViewPlugins.test.d.ts +0 -12
- package/build/__tests__/behavioral/views/ViewPlugins.test.js +0 -83
- package/build/__tests__/behavioral/views/WorkingWithTimezones.test.d.ts +0 -11
- package/build/__tests__/behavioral/views/WorkingWithTimezones.test.js +0 -55
- package/build/__tests__/behavioral/views/viewFixture/ViewFixture.test.d.ts +0 -118
- package/build/__tests__/behavioral/views/viewFixture/ViewFixture.test.js +0 -761
- package/build/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.d.ts +0 -5
- package/build/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.js +0 -29
- package/build/__tests__/support/AbstractFakeDecoratorTest.d.ts +0 -5
- package/build/__tests__/support/AbstractFakeDecoratorTest.js +0 -27
- package/build/__tests__/support/EventFaker.d.ts +0 -5
- package/build/__tests__/support/EventFaker.js +0 -36
- package/build/__tests__/support/RandomViewPlugin.d.ts +0 -2
- package/build/__tests__/support/RandomViewPlugin.js +0 -5
- package/build/__tests__/support/RandomViewPlugin2.d.ts +0 -2
- package/build/__tests__/support/RandomViewPlugin2.js +0 -5
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/.spruce/stores/stores.d.ts +0 -5
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/.spruce/stores/stores.js +0 -9
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.d.ts +0 -51
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js +0 -33
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/src/.spruce/settings.json +0 -6
- package/build/__tests__/testDirsAndFiles/plugins1/build/.spruce/views/views.d.ts +0 -6
- package/build/__tests__/testDirsAndFiles/plugins1/build/.spruce/views/views.js +0 -11
- package/build/__tests__/testDirsAndFiles/plugins2/build/.spruce/views/views.d.ts +0 -6
- package/build/__tests__/testDirsAndFiles/plugins2/build/.spruce/views/views.js +0 -11
- package/build/__tests__/testDirsAndFiles/skill/build/.spruce/views/views.js +0 -18
- package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.d.ts +0 -5
- package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.js +0 -11
- package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.d.ts +0 -7
- package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.js +0 -19
- package/build/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.d.ts +0 -8
- package/build/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.js +0 -31
- package/build/__tests__/testDirsAndFiles/skill/package.json +0 -5
- package/build/__tests__/testDirsAndFiles/skill/src/.spruce/settings.json +0 -6
- package/build/__tests__/testDirsAndFiles/skill/src/.spruce/views/views.d.ts +0 -7
- package/build/__tests__/testDirsAndFiles/skill/src/.spruce/views/views.js +0 -17
- package/build/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.d.ts +0 -5
- package/build/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.js +0 -11
- package/build/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.d.ts +0 -8
- package/build/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.js +0 -31
- package/build/esm/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.d.ts +0 -15
- package/build/esm/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +0 -128
- package/build/esm/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +0 -40
- package/build/esm/__tests__/behavioral/DisablingSchemaValidationOnTest.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +0 -23
- package/build/esm/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +0 -80
- package/build/esm/__tests__/behavioral/FakingEventResponses.test.d.ts +0 -12
- package/build/esm/__tests__/behavioral/FakingEventResponses.test.js +0 -148
- package/build/esm/__tests__/behavioral/FixtureFactory.test.d.ts +0 -7
- package/build/esm/__tests__/behavioral/FixtureFactory.test.js +0 -61
- package/build/esm/__tests__/behavioral/LocationFixture.test.d.ts +0 -17
- package/build/esm/__tests__/behavioral/LocationFixture.test.js +0 -173
- package/build/esm/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.d.ts +0 -12
- package/build/esm/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +0 -113
- package/build/esm/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +0 -41
- package/build/esm/__tests__/behavioral/MercuryFixture.test.d.ts +0 -20
- package/build/esm/__tests__/behavioral/MercuryFixture.test.js +0 -223
- package/build/esm/__tests__/behavioral/OrganizationFixture.test.d.ts +0 -31
- package/build/esm/__tests__/behavioral/OrganizationFixture.test.js +0 -389
- package/build/esm/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +0 -18
- package/build/esm/__tests__/behavioral/PersonFixture.test.d.ts +0 -22
- package/build/esm/__tests__/behavioral/PersonFixture.test.js +0 -232
- package/build/esm/__tests__/behavioral/PhoneNumberIncrementor.test.d.ts +0 -11
- package/build/esm/__tests__/behavioral/PhoneNumberIncrementor.test.js +0 -112
- package/build/esm/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +0 -84
- package/build/esm/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +0 -55
- package/build/esm/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +0 -72
- package/build/esm/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.d.ts +0 -10
- package/build/esm/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +0 -146
- package/build/esm/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.d.ts +0 -7
- package/build/esm/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +0 -66
- package/build/esm/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.d.ts +0 -6
- package/build/esm/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +0 -51
- package/build/esm/__tests__/behavioral/RoleFixture.test.d.ts +0 -15
- package/build/esm/__tests__/behavioral/RoleFixture.test.js +0 -143
- package/build/esm/__tests__/behavioral/SkillFixture.test.d.ts +0 -13
- package/build/esm/__tests__/behavioral/SkillFixture.test.js +0 -141
- package/build/esm/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.d.ts +0 -7
- package/build/esm/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.js +0 -53
- package/build/esm/__tests__/behavioral/databases/DatabaseFixture.test.d.ts +0 -7
- package/build/esm/__tests__/behavioral/databases/DatabaseFixture.test.js +0 -48
- package/build/esm/__tests__/behavioral/databases/DbResetsAsExpected.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/databases/DbResetsAsExpected.test.js +0 -28
- package/build/esm/__tests__/behavioral/databases/DummyStore.d.ts +0 -55
- package/build/esm/__tests__/behavioral/databases/DummyStore.js +0 -43
- package/build/esm/__tests__/behavioral/databases/StoreFixture.test.d.ts +0 -23
- package/build/esm/__tests__/behavioral/databases/StoreFixture.test.js +0 -164
- package/build/esm/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.d.ts +0 -9
- package/build/esm/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +0 -89
- package/build/esm/__tests__/behavioral/faking/FakeDecorator.test.d.ts +0 -45
- package/build/esm/__tests__/behavioral/faking/FakeDecorator.test.js +0 -482
- package/build/esm/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +0 -28
- package/build/esm/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +0 -32
- package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.js +0 -82
- package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +0 -70
- package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.d.ts +0 -14
- package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +0 -165
- package/build/esm/__tests__/behavioral/faking/FakingAuthenticator.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/faking/FakingAuthenticator.test.js +0 -43
- package/build/esm/__tests__/behavioral/faking/FakingInBeforeEach.test.d.ts +0 -6
- package/build/esm/__tests__/behavioral/faking/FakingInBeforeEach.test.js +0 -55
- package/build/esm/__tests__/behavioral/faking/FakingLocations.test.d.ts +0 -6
- package/build/esm/__tests__/behavioral/faking/FakingLocations.test.js +0 -55
- package/build/esm/__tests__/behavioral/faking/FakingRoleEvents.test.d.ts +0 -19
- package/build/esm/__tests__/behavioral/faking/FakingRoleEvents.test.js +0 -175
- package/build/esm/__tests__/behavioral/faking/FakingSkillEvents.test.d.ts +0 -24
- package/build/esm/__tests__/behavioral/faking/FakingSkillEvents.test.js +0 -214
- package/build/esm/__tests__/behavioral/faking/UpdatePerson.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/faking/UpdatePerson.test.js +0 -38
- package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.d.ts +0 -35
- package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.js +0 -360
- package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +0 -31
- package/build/esm/__tests__/behavioral/faking/WhoAmI.test.d.ts +0 -19
- package/build/esm/__tests__/behavioral/faking/WhoAmI.test.js +0 -142
- package/build/esm/__tests__/behavioral/maps/SpyingMapUtil.test.d.ts +0 -10
- package/build/esm/__tests__/behavioral/maps/SpyingMapUtil.test.js +0 -94
- package/build/esm/__tests__/behavioral/permissions/FakeAuthorizer.test.d.ts +0 -34
- package/build/esm/__tests__/behavioral/permissions/FakeAuthorizer.test.js +0 -324
- package/build/esm/__tests__/behavioral/permissions/PermissionFixture.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/permissions/PermissionFixture.test.js +0 -43
- package/build/esm/__tests__/behavioral/seeding/SeedingData.test.d.ts +0 -24
- package/build/esm/__tests__/behavioral/seeding/SeedingData.test.js +0 -314
- package/build/esm/__tests__/behavioral/seeding/UsingDecorators.test.d.ts +0 -37
- package/build/esm/__tests__/behavioral/seeding/UsingDecorators.test.js +0 -322
- package/build/esm/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.d.ts +0 -14
- package/build/esm/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +0 -138
- package/build/esm/__tests__/behavioral/views/FakingSkillViewControllers.test.d.ts +0 -12
- package/build/esm/__tests__/behavioral/views/FakingSkillViewControllers.test.js +0 -70
- package/build/esm/__tests__/behavioral/views/Routing.test.d.ts +0 -36
- package/build/esm/__tests__/behavioral/views/Routing.test.js +0 -212
- package/build/esm/__tests__/behavioral/views/TestingScope.test.d.ts +0 -24
- package/build/esm/__tests__/behavioral/views/TestingScope.test.js +0 -238
- package/build/esm/__tests__/behavioral/views/ViewPlugins.test.d.ts +0 -12
- package/build/esm/__tests__/behavioral/views/ViewPlugins.test.js +0 -103
- package/build/esm/__tests__/behavioral/views/WorkingWithTimezones.test.d.ts +0 -11
- package/build/esm/__tests__/behavioral/views/WorkingWithTimezones.test.js +0 -64
- package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixture.test.d.ts +0 -118
- package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixture.test.js +0 -856
- package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.js +0 -39
- package/build/esm/__tests__/support/AbstractFakeDecoratorTest.d.ts +0 -5
- package/build/esm/__tests__/support/AbstractFakeDecoratorTest.js +0 -34
- package/build/esm/__tests__/support/EventFaker.d.ts +0 -5
- package/build/esm/__tests__/support/EventFaker.js +0 -45
- package/build/esm/__tests__/support/RandomViewPlugin.d.ts +0 -2
- package/build/esm/__tests__/support/RandomViewPlugin.js +0 -2
- package/build/esm/__tests__/support/RandomViewPlugin2.d.ts +0 -2
- package/build/esm/__tests__/support/RandomViewPlugin2.js +0 -2
- package/build/esm/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.d.ts +0 -51
- package/build/esm/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js +0 -41
- package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.d.ts +0 -5
- package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.js +0 -9
- package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.d.ts +0 -7
- package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.js +0 -28
- package/build/esm/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.d.ts +0 -8
- package/build/esm/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.js +0 -26
- package/build/esm/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.d.ts +0 -5
- package/build/esm/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.js +0 -9
- package/build/esm/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.d.ts +0 -8
- package/build/esm/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.js +0 -26
- /package/build/{__tests__/support → esm/tests}/FakeThemeManager.d.ts +0 -0
- /package/build/esm/{__tests__/support → tests}/FakeThemeManager.js +0 -0
- /package/build/{esm/__tests__/support → tests}/FakeThemeManager.d.ts +0 -0
- /package/build/{__tests__/support → tests}/FakeThemeManager.js +0 -0
|
@@ -1,482 +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 { randomInt } from 'crypto';
|
|
17
|
-
import { MercuryTestClient } from '@sprucelabs/mercury-client';
|
|
18
|
-
import { formatPhoneNumber } from '@sprucelabs/schema';
|
|
19
|
-
import { BASE_ROLES_WITH_META } from '@sprucelabs/spruce-core-schemas';
|
|
20
|
-
import { assert, test } from '@sprucelabs/test-utils';
|
|
21
|
-
import { errorAssert, generateId } from '@sprucelabs/test-utils';
|
|
22
|
-
import { DEMO_NUMBER, DEMO_NUMBER_ACCOUNT_AFTER_ALL_RESET, DEMO_NUMBER_DECORATORS, } from '../../../tests/constants.js';
|
|
23
|
-
import fake, { fakeTargetToPropName, pluralToSingular, } from '../../../tests/decorators/fake.js';
|
|
24
|
-
import AbstractFakeDecoratorTest from '../../support/AbstractFakeDecoratorTest.js';
|
|
25
|
-
export default class FakeDecoratorTest extends AbstractFakeDecoratorTest {
|
|
26
|
-
static beforeEach() {
|
|
27
|
-
const _super = Object.create(null, {
|
|
28
|
-
beforeEach: { get: () => super.beforeEach }
|
|
29
|
-
});
|
|
30
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
yield _super.beforeEach.call(this);
|
|
32
|
-
this.client = yield this.mercury.connectToApi();
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
static doesNotThrowWhenMissingPhone() {
|
|
36
|
-
fake.login();
|
|
37
|
-
}
|
|
38
|
-
static throwsWhenInvalidPhone() {
|
|
39
|
-
//@ts-ignore
|
|
40
|
-
assert.doesThrow(() => fake.login(generateId()));
|
|
41
|
-
}
|
|
42
|
-
static fakingLoginSetsRequireLocalListeners() {
|
|
43
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
-
yield this.fakeLogin(DEMO_NUMBER);
|
|
45
|
-
assert.isTrue(MercuryTestClient.getShouldRequireLocalListeners());
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
static getPersonThrowsWithoutPersonId() {
|
|
49
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
yield this.fakeLogin();
|
|
51
|
-
yield assert.doesThrowAsync(() => this.client.emitAndFlattenResponses('get-person::v2020_12_25', {
|
|
52
|
-
target: {},
|
|
53
|
-
}));
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
static fakesGetPerson() {
|
|
57
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
yield this.fakeLogin();
|
|
59
|
-
const [{ person }] = yield this.client.emitAndFlattenResponses('get-person::v2020_12_25', {
|
|
60
|
-
target: {
|
|
61
|
-
personId: this.fakedPerson.id,
|
|
62
|
-
},
|
|
63
|
-
});
|
|
64
|
-
assert.isEqualDeep(person, this.fakedPerson);
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
static getPersonThrowsWithBadId() {
|
|
68
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
-
yield this.fakeLogin();
|
|
70
|
-
const err = yield assert.doesThrowAsync(() => this.client.emitAndFlattenResponses('get-person::v2020_12_25', {
|
|
71
|
-
target: {
|
|
72
|
-
personId: generateId(),
|
|
73
|
-
},
|
|
74
|
-
}));
|
|
75
|
-
errorAssert.assertError(err, 'INVALID_TARGET');
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
static fakingFailWithMissingParams() {
|
|
79
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
-
//@ts-ignore
|
|
81
|
-
const err = assert.doesThrow(() => fake());
|
|
82
|
-
errorAssert.assertError(err, 'MISSING_PARAMETERS', {
|
|
83
|
-
parameters: ['target', 'total'],
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
static failsWithoutOwner() {
|
|
88
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
-
this.fakedPerson = null;
|
|
90
|
-
yield assert.doesThrowAsync(() => this.fakeRecords('organizations', 1), 'faker.login');
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
static seedsOrg(total) {
|
|
94
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
-
yield this.fakeLoginAndRecords('organizations', total);
|
|
96
|
-
assert.isLength(this.fakedOrganizations, total);
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
static fakesGetOrganization(orgIdx) {
|
|
100
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
-
yield this.fakeLoginAndRecords('organizations', 2);
|
|
102
|
-
const orgId = this.fakedOrganizations[orgIdx].id;
|
|
103
|
-
const organization = yield this.emitGetOrganization(orgId);
|
|
104
|
-
assert.isEqualDeep(this.fakedOrganizations[orgIdx], organization);
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
static gettingOrgThrowsWithBadOrgId() {
|
|
108
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
-
yield this.fakeLoginAndRecords('organizations', 1);
|
|
110
|
-
const err = yield assert.doesThrowAsync(() => this.emitGetOrganization(generateId()));
|
|
111
|
-
errorAssert.assertError(err, 'INVALID_TARGET');
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
static fakingOrgsMoreThanOnceStacks() {
|
|
115
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
116
|
-
yield this.fakeLoginAndRecords('organizations', 1);
|
|
117
|
-
yield this.fakeRecords('organizations', 1);
|
|
118
|
-
assert.isLength(this.fakedOrganizations, 2);
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
static fakesListOrgsAndReturnsNewestFirst() {
|
|
122
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
-
yield this.fakeLogin();
|
|
124
|
-
const first = yield this.seedAndGetNewestOrganization();
|
|
125
|
-
const second = yield this.seedAndGetNewestOrganization();
|
|
126
|
-
assert.isNotEqual(first.id, second.id);
|
|
127
|
-
const third = yield this.seedAndGetNewestOrganization();
|
|
128
|
-
const organizations = yield this.listOrganizations();
|
|
129
|
-
const expected = [third, second, first];
|
|
130
|
-
assert.isEqualDeep(organizations, expected);
|
|
131
|
-
assert.isEqualDeep(this.fakedOrganizations, expected);
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
static listOrgsHonorsLimit(limit) {
|
|
135
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
-
const orgs = yield this.fakeLoginAndListOrgs({
|
|
137
|
-
paging: {
|
|
138
|
-
pageSize: limit,
|
|
139
|
-
},
|
|
140
|
-
});
|
|
141
|
-
assert.isLength(orgs, limit);
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
static canGetLatestOrgWithScope() {
|
|
145
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
-
yield this.fakeLoginAndRecords('organizations', 5);
|
|
147
|
-
const org = yield this.views.getScope().getCurrentOrganization();
|
|
148
|
-
assert.isEqualDeep(org, this.fakedOrganizations[0]);
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
static seedingLocationSeedsOneOrg(totalLocations) {
|
|
152
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
-
yield this.fakeLoginAndRecords('locations', totalLocations);
|
|
154
|
-
assert.isLength(this.fakedOrganizations, 1);
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
static seedsGoodLocation(total) {
|
|
158
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
-
yield this.fakeLoginAndRecords('locations', total);
|
|
160
|
-
assert.isLength(this.fakedLocations, total);
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
static sortsLocationsNewestFirst() {
|
|
164
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
165
|
-
yield this.fakeLogin();
|
|
166
|
-
const first = yield this.seedAndGetNewestLocation();
|
|
167
|
-
const second = yield this.seedAndGetNewestLocation();
|
|
168
|
-
assert.isNotEqual(first.id, second.id);
|
|
169
|
-
const third = yield this.seedAndGetNewestLocation();
|
|
170
|
-
const expected = [third, second, first];
|
|
171
|
-
assert.isEqualDeep(this.fakedLocations, expected);
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
static canGetLocationFromScope() {
|
|
175
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
176
|
-
yield this.fakeLoginAndRecords('locations', 10);
|
|
177
|
-
const location = yield this.views.getScope().getCurrentLocation();
|
|
178
|
-
assert.isEqualDeep(location, this.fakedLocations[0]);
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
static fakingLoginsFakesRoles() {
|
|
182
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
183
|
-
yield this.fakeLogin();
|
|
184
|
-
assert.isLength(this.fakedRoles, 0);
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
static fakingOrgFakesRoles() {
|
|
188
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
189
|
-
yield this.fakeLoginAndRecords('organizations', 2);
|
|
190
|
-
const expected = BASE_ROLES_WITH_META;
|
|
191
|
-
for (const { slug, name } of expected) {
|
|
192
|
-
assert.doesInclude(this.fakedRoles, {
|
|
193
|
-
base: slug,
|
|
194
|
-
name: `Faked ${name}`,
|
|
195
|
-
organizationId: this.fakedOrganizations[0].id,
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
static listRolesReturnsFakedRoles() {
|
|
201
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
202
|
-
const roles = yield this.fakeLoginAndListRoles(0);
|
|
203
|
-
assert.isEqualDeep(roles, this.fakedRoles.filter((r) => r.organizationId === this.fakedOrganizations[0].id));
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
static listRolesHonorsOrgId() {
|
|
207
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
208
|
-
const roles = yield this.fakeLoginAndListRoles(1);
|
|
209
|
-
assert.isEqualDeep(roles, this.fakedRoles.filter((r) => r.organizationId === this.fakedOrganizations[1].id));
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
static listRolesForPersonWithoutTargetingOrgReturnsAllRolesForPerson() {
|
|
213
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
214
|
-
const { personId, organizationId } = yield this.createMultipleOrgsAndAddOwnerAdditionalTeammateRoleAtRandomOrg();
|
|
215
|
-
yield this.organizations.addPerson({
|
|
216
|
-
personId,
|
|
217
|
-
organizationId,
|
|
218
|
-
roleBase: 'teammate',
|
|
219
|
-
});
|
|
220
|
-
const [{ roles }] = yield this.listRolesForPerson(personId);
|
|
221
|
-
assert.isEqualDeep(roles.sort((a, b) => (a.id > b.id ? 1 : -1)), this.fakedRoles
|
|
222
|
-
.filter((r) => r.base === 'owner' ||
|
|
223
|
-
(r.base === 'teammate' &&
|
|
224
|
-
r.organizationId === organizationId))
|
|
225
|
-
.sort((a, b) => (a.id > b.id ? 1 : -1)));
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
static canSyncTeammates(target, total) {
|
|
229
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
230
|
-
var _a, _b;
|
|
231
|
-
yield this.fakeLoginAndRecords('locations', 1);
|
|
232
|
-
yield this.fakeRecords(target, total);
|
|
233
|
-
const fakedProp =
|
|
234
|
-
//@ts-ignore
|
|
235
|
-
this[fakeTargetToPropName(target)];
|
|
236
|
-
assert.isLength(fakedProp, total);
|
|
237
|
-
const people = yield this.people.listPeople({
|
|
238
|
-
locationId: (_a = this.fakedLocations[0]) === null || _a === void 0 ? void 0 : _a.id,
|
|
239
|
-
roleBases: [pluralToSingular(target)],
|
|
240
|
-
organizationId: (_b = this.fakedOrganizations[0]) === null || _b === void 0 ? void 0 : _b.id,
|
|
241
|
-
});
|
|
242
|
-
assert.isEqualDeep(fakedProp, people);
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
static canLoginAsPersonAndGetThemBack(phone) {
|
|
246
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
247
|
-
yield this.fakeLogin();
|
|
248
|
-
const [{ challenge }] = yield this.client.emitAndFlattenResponses('request-pin::v2020_12_25', {
|
|
249
|
-
payload: {
|
|
250
|
-
phone,
|
|
251
|
-
},
|
|
252
|
-
});
|
|
253
|
-
const [{ person }] = yield this.client.emitAndFlattenResponses('confirm-pin::v2020_12_25', {
|
|
254
|
-
payload: {
|
|
255
|
-
challenge,
|
|
256
|
-
pin: '234',
|
|
257
|
-
},
|
|
258
|
-
});
|
|
259
|
-
assert.isEqual(person.phone, formatPhoneNumber(phone));
|
|
260
|
-
assert.isEqualDeep(this.fakedPeople, [this.fakedPerson, person]);
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
static sendingBadChallengeThrows() {
|
|
264
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
265
|
-
yield this.fakeLogin();
|
|
266
|
-
const err = yield assert.doesThrowAsync(() => this.client.emitAndFlattenResponses('confirm-pin::v2020_12_25', {
|
|
267
|
-
payload: {
|
|
268
|
-
challenge: '1234',
|
|
269
|
-
pin: '234',
|
|
270
|
-
},
|
|
271
|
-
}));
|
|
272
|
-
errorAssert.assertError(err, 'INVALID_PIN');
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
static fakesSkillLifecycleEvents() {
|
|
276
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
277
|
-
yield this.client.emitAndFlattenResponses('unregister-listeners::v2020_12_25');
|
|
278
|
-
yield this.client.emitAndFlattenResponses('sync-event-contracts::v2020_12_25', {
|
|
279
|
-
payload: {
|
|
280
|
-
contract: {
|
|
281
|
-
eventSignatures: {
|
|
282
|
-
['did-sync']: {},
|
|
283
|
-
},
|
|
284
|
-
},
|
|
285
|
-
},
|
|
286
|
-
});
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
static callingRegisterProxyTokenOnAnonClientDoesNotThrough() {
|
|
290
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
291
|
-
const client = yield this.mercury.connectToApi({
|
|
292
|
-
shouldReUseClient: false,
|
|
293
|
-
});
|
|
294
|
-
yield client.emitAndFlattenResponses('register-proxy-token::v2020_12_25');
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
static fakeLoginAndListRoles(orgIdx) {
|
|
298
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
299
|
-
yield this.fakeLoginAndRecords('organizations', 2);
|
|
300
|
-
const [{ roles }] = yield this.client.emitAndFlattenResponses('list-roles::v2020_12_25', {
|
|
301
|
-
target: {
|
|
302
|
-
organizationId: this.fakedOrganizations[orgIdx].id,
|
|
303
|
-
},
|
|
304
|
-
payload: {
|
|
305
|
-
shouldIncludeMetaRoles: true,
|
|
306
|
-
shouldIncludePrivateRoles: true,
|
|
307
|
-
},
|
|
308
|
-
});
|
|
309
|
-
return roles;
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
static seedAndGetNewestOrganization() {
|
|
313
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
314
|
-
yield this.fakeRecords('organizations', 1);
|
|
315
|
-
return this.fakedOrganizations[0];
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
static seedAndGetNewestLocation() {
|
|
319
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
320
|
-
yield this.fakeRecords('locations', 1);
|
|
321
|
-
return this.fakedLocations[0];
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
static emitGetOrganization(orgId) {
|
|
325
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
326
|
-
const [{ organization }] = yield this.client.emitAndFlattenResponses('get-organization::v2020_12_25', {
|
|
327
|
-
target: {
|
|
328
|
-
organizationId: orgId,
|
|
329
|
-
},
|
|
330
|
-
});
|
|
331
|
-
return organization;
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
static fakeLoginAndRecords(target, count) {
|
|
335
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
336
|
-
yield this.fakeLogin();
|
|
337
|
-
yield this.fakeRecords(target, count);
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
|
-
static fakeRecords(target, count) {
|
|
341
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
342
|
-
const decorator = fake(target, count);
|
|
343
|
-
const descriptor = {
|
|
344
|
-
value() {
|
|
345
|
-
return __awaiter(this, void 0, void 0, function* () { });
|
|
346
|
-
},
|
|
347
|
-
};
|
|
348
|
-
decorator(this, 'testName', descriptor);
|
|
349
|
-
yield descriptor.value();
|
|
350
|
-
return decorator;
|
|
351
|
-
});
|
|
352
|
-
}
|
|
353
|
-
static fakeLoginAndListOrgs(payload) {
|
|
354
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
355
|
-
yield this.fakeLoginAndRecords('organizations', 5);
|
|
356
|
-
return yield this.listOrganizations(payload);
|
|
357
|
-
});
|
|
358
|
-
}
|
|
359
|
-
static listOrganizations(payload) {
|
|
360
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
361
|
-
const [{ organizations }] = yield this.client.emitAndFlattenResponses('list-organizations::v2020_12_25', {
|
|
362
|
-
payload,
|
|
363
|
-
});
|
|
364
|
-
return organizations;
|
|
365
|
-
});
|
|
366
|
-
}
|
|
367
|
-
static listRolesForPerson(personId) {
|
|
368
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
369
|
-
return yield this.client.emitAndFlattenResponses('list-roles::v2020_12_25', {
|
|
370
|
-
target: {
|
|
371
|
-
personId,
|
|
372
|
-
},
|
|
373
|
-
payload: {
|
|
374
|
-
shouldIncludePrivateRoles: true,
|
|
375
|
-
},
|
|
376
|
-
});
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
static createMultipleOrgsAndAddOwnerAdditionalTeammateRoleAtRandomOrg() {
|
|
380
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
381
|
-
const maxOrgs = randomInt(1, 4);
|
|
382
|
-
yield this.fakeLoginAndRecords('organizations', maxOrgs);
|
|
383
|
-
const personId = this.fakedPeople[0].id;
|
|
384
|
-
const organizationId = this.fakedOrganizations[maxOrgs - 1].id;
|
|
385
|
-
return { personId, organizationId };
|
|
386
|
-
});
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
__decorate([
|
|
390
|
-
test()
|
|
391
|
-
], FakeDecoratorTest, "doesNotThrowWhenMissingPhone", null);
|
|
392
|
-
__decorate([
|
|
393
|
-
test()
|
|
394
|
-
], FakeDecoratorTest, "throwsWhenInvalidPhone", null);
|
|
395
|
-
__decorate([
|
|
396
|
-
test()
|
|
397
|
-
], FakeDecoratorTest, "fakingLoginSetsRequireLocalListeners", null);
|
|
398
|
-
__decorate([
|
|
399
|
-
test()
|
|
400
|
-
], FakeDecoratorTest, "getPersonThrowsWithoutPersonId", null);
|
|
401
|
-
__decorate([
|
|
402
|
-
test()
|
|
403
|
-
], FakeDecoratorTest, "fakesGetPerson", null);
|
|
404
|
-
__decorate([
|
|
405
|
-
test()
|
|
406
|
-
], FakeDecoratorTest, "getPersonThrowsWithBadId", null);
|
|
407
|
-
__decorate([
|
|
408
|
-
test()
|
|
409
|
-
], FakeDecoratorTest, "fakingFailWithMissingParams", null);
|
|
410
|
-
__decorate([
|
|
411
|
-
test()
|
|
412
|
-
], FakeDecoratorTest, "failsWithoutOwner", null);
|
|
413
|
-
__decorate([
|
|
414
|
-
test('can seed 1 org', 1),
|
|
415
|
-
test('can seed 2 orgs', 2)
|
|
416
|
-
], FakeDecoratorTest, "seedsOrg", null);
|
|
417
|
-
__decorate([
|
|
418
|
-
test('can get 0th org', 0),
|
|
419
|
-
test('can get 1st org', 1)
|
|
420
|
-
], FakeDecoratorTest, "fakesGetOrganization", null);
|
|
421
|
-
__decorate([
|
|
422
|
-
test()
|
|
423
|
-
], FakeDecoratorTest, "gettingOrgThrowsWithBadOrgId", null);
|
|
424
|
-
__decorate([
|
|
425
|
-
test()
|
|
426
|
-
], FakeDecoratorTest, "fakingOrgsMoreThanOnceStacks", null);
|
|
427
|
-
__decorate([
|
|
428
|
-
test()
|
|
429
|
-
], FakeDecoratorTest, "fakesListOrgsAndReturnsNewestFirst", null);
|
|
430
|
-
__decorate([
|
|
431
|
-
test('honors limit 1', 1),
|
|
432
|
-
test('honors limit 2', 2)
|
|
433
|
-
], FakeDecoratorTest, "listOrgsHonorsLimit", null);
|
|
434
|
-
__decorate([
|
|
435
|
-
test()
|
|
436
|
-
], FakeDecoratorTest, "canGetLatestOrgWithScope", null);
|
|
437
|
-
__decorate([
|
|
438
|
-
test('seeding locations seeds 1 org 1', 1),
|
|
439
|
-
test('seeding locations seeds 1 org 2', 2)
|
|
440
|
-
], FakeDecoratorTest, "seedingLocationSeedsOneOrg", null);
|
|
441
|
-
__decorate([
|
|
442
|
-
test('seeds expected amount of locations 1', 1),
|
|
443
|
-
test('seeds expected amount of locations 2', 2)
|
|
444
|
-
], FakeDecoratorTest, "seedsGoodLocation", null);
|
|
445
|
-
__decorate([
|
|
446
|
-
test()
|
|
447
|
-
], FakeDecoratorTest, "sortsLocationsNewestFirst", null);
|
|
448
|
-
__decorate([
|
|
449
|
-
test()
|
|
450
|
-
], FakeDecoratorTest, "canGetLocationFromScope", null);
|
|
451
|
-
__decorate([
|
|
452
|
-
test()
|
|
453
|
-
], FakeDecoratorTest, "fakingLoginsFakesRoles", null);
|
|
454
|
-
__decorate([
|
|
455
|
-
test()
|
|
456
|
-
], FakeDecoratorTest, "fakingOrgFakesRoles", null);
|
|
457
|
-
__decorate([
|
|
458
|
-
test()
|
|
459
|
-
], FakeDecoratorTest, "listRolesReturnsFakedRoles", null);
|
|
460
|
-
__decorate([
|
|
461
|
-
test()
|
|
462
|
-
], FakeDecoratorTest, "listRolesHonorsOrgId", null);
|
|
463
|
-
__decorate([
|
|
464
|
-
test()
|
|
465
|
-
], FakeDecoratorTest, "listRolesForPersonWithoutTargetingOrgReturnsAllRolesForPerson", null);
|
|
466
|
-
__decorate([
|
|
467
|
-
test('can fake 1 teammate', 'teammates', 1),
|
|
468
|
-
test('can fake 2 teammate', 'teammates', 2)
|
|
469
|
-
], FakeDecoratorTest, "canSyncTeammates", null);
|
|
470
|
-
__decorate([
|
|
471
|
-
test('login with number 1', DEMO_NUMBER_DECORATORS),
|
|
472
|
-
test('login with number 2', DEMO_NUMBER_ACCOUNT_AFTER_ALL_RESET)
|
|
473
|
-
], FakeDecoratorTest, "canLoginAsPersonAndGetThemBack", null);
|
|
474
|
-
__decorate([
|
|
475
|
-
test()
|
|
476
|
-
], FakeDecoratorTest, "sendingBadChallengeThrows", null);
|
|
477
|
-
__decorate([
|
|
478
|
-
test()
|
|
479
|
-
], FakeDecoratorTest, "fakesSkillLifecycleEvents", null);
|
|
480
|
-
__decorate([
|
|
481
|
-
test()
|
|
482
|
-
], FakeDecoratorTest, "callingRegisterProxyTokenOnAnonClientDoesNotThrough", null);
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
import { assert, test } from '@sprucelabs/test-utils';
|
|
17
|
-
import AbstractFakeDecoratorTest from '../../support/AbstractFakeDecoratorTest.js';
|
|
18
|
-
export default class FakeDecoratorTest extends AbstractFakeDecoratorTest {
|
|
19
|
-
static setsPersonToClass() {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const auth = yield this.fakeLoginAndGetAuth();
|
|
22
|
-
assert.isEqualDeep(this.fakedPerson, auth.person);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
__decorate([
|
|
27
|
-
test()
|
|
28
|
-
], FakeDecoratorTest, "setsPersonToClass", null);
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
import { assert, test } from '@sprucelabs/test-utils';
|
|
17
|
-
import { DEMO_NUMBER_HIRING } from '../../../tests/constants.js';
|
|
18
|
-
import AbstractFakeDecoratorTest from '../../support/AbstractFakeDecoratorTest.js';
|
|
19
|
-
export default class FakeDecoratorTest extends AbstractFakeDecoratorTest {
|
|
20
|
-
static fakesWhoAmI() {
|
|
21
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const number = DEMO_NUMBER_HIRING;
|
|
23
|
-
const auth = yield this.fakeLoginAndGetAuth(number);
|
|
24
|
-
assert.doesInclude(auth.person, {
|
|
25
|
-
phone: number,
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
__decorate([
|
|
31
|
-
test()
|
|
32
|
-
], FakeDecoratorTest, "fakesWhoAmI", null);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import AbstractSpruceTest from '@sprucelabs/test-utils';
|
|
2
|
-
export default class FakeThemeManagerTest extends AbstractSpruceTest {
|
|
3
|
-
private static manager;
|
|
4
|
-
protected static beforeEach(): Promise<void>;
|
|
5
|
-
protected static comesWithThemeByDefault(): Promise<void>;
|
|
6
|
-
protected static canSetTheme(): Promise<void>;
|
|
7
|
-
private static assertThemeEquals;
|
|
8
|
-
}
|
|
@@ -1,82 +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 AbstractSpruceTest, { test, assert } from '@sprucelabs/test-utils';
|
|
17
|
-
import { generateId } from '@sprucelabs/test-utils';
|
|
18
|
-
import FakeThemeManager from '../../support/FakeThemeManager.js';
|
|
19
|
-
export default class FakeThemeManagerTest extends AbstractSpruceTest {
|
|
20
|
-
static beforeEach() {
|
|
21
|
-
const _super = Object.create(null, {
|
|
22
|
-
beforeEach: { get: () => super.beforeEach }
|
|
23
|
-
});
|
|
24
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
yield _super.beforeEach.call(this);
|
|
26
|
-
this.manager = new FakeThemeManager();
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
static comesWithThemeByDefault() {
|
|
30
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
this.assertThemeEquals({
|
|
32
|
-
name: 'Heartwood',
|
|
33
|
-
props: {
|
|
34
|
-
color1: '#ffffff',
|
|
35
|
-
color1Inverse: '#0f4c8a',
|
|
36
|
-
color1InverseGradient: 'linear-gradient(to left, #24c6dc, #514a9d)',
|
|
37
|
-
color2: '#757575',
|
|
38
|
-
color2Transparent: 'rgba(0,0,0,0.2)',
|
|
39
|
-
color2Inverse: 'white',
|
|
40
|
-
color2InverseTransparent: 'rgba(255,255,255,0.9)',
|
|
41
|
-
color3: '#303030',
|
|
42
|
-
color3Inverse: 'transparent',
|
|
43
|
-
color3Compliment: '#a7a7a7',
|
|
44
|
-
color4: '#626262',
|
|
45
|
-
color4Compliment: 'white',
|
|
46
|
-
color4ComplimentTransparent: 'rgba(0,0,0,0.1)',
|
|
47
|
-
color4Inverse: 'white',
|
|
48
|
-
color4InverseCompliment: '#c7c7c7',
|
|
49
|
-
controlBarColor1: 'black',
|
|
50
|
-
controlBarColor2: 'white',
|
|
51
|
-
toolBeltColor2: '#f1f1f1',
|
|
52
|
-
errorColor1: '#fff',
|
|
53
|
-
errorColor1Inverse: '#FF3326',
|
|
54
|
-
warningColor1: '#A16B14',
|
|
55
|
-
warningColor1Inverse: '#F7D352',
|
|
56
|
-
},
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
static canSetTheme() {
|
|
61
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
-
const set = {
|
|
63
|
-
name: generateId(),
|
|
64
|
-
props: {
|
|
65
|
-
//@ts-ignore
|
|
66
|
-
[generateId]: generateId(),
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
this.manager.setTheme(set);
|
|
70
|
-
this.assertThemeEquals(set);
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
static assertThemeEquals(expected) {
|
|
74
|
-
assert.isEqualDeep(this.manager.getTheme(), expected);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
__decorate([
|
|
78
|
-
test()
|
|
79
|
-
], FakeThemeManagerTest, "comesWithThemeByDefault", null);
|
|
80
|
-
__decorate([
|
|
81
|
-
test()
|
|
82
|
-
], FakeThemeManagerTest, "canSetTheme", null);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
|
|
2
|
-
export default class FakingAddingPeopleToALocationTest extends AbstractSpruceFixtureTest {
|
|
3
|
-
protected static noRolesAtLocationToStart(): Promise<void>;
|
|
4
|
-
protected static differenciatesBetweenOrgAndLocation(): Promise<void>;
|
|
5
|
-
protected static passesWhenFakedOwnerIsPartOfLocation(): Promise<void>;
|
|
6
|
-
private static assertIsNotPartOfLocation;
|
|
7
|
-
private static isPartOfLocation;
|
|
8
|
-
}
|