@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,70 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
import { test, assert } from '@sprucelabs/test-utils';
|
|
17
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest.js';
|
|
18
|
-
import fake from '../../../tests/decorators/fake.js';
|
|
19
|
-
import seed from '../../../tests/decorators/seed.js';
|
|
20
|
-
let FakingAddingPeopleToALocationTest = class FakingAddingPeopleToALocationTest extends AbstractSpruceFixtureTest {
|
|
21
|
-
static noRolesAtLocationToStart() {
|
|
22
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
const { person } = yield this.people.loginAsDemoPerson('555-555-1234');
|
|
24
|
-
yield this.assertIsNotPartOfLocation(person.id);
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
static differenciatesBetweenOrgAndLocation() {
|
|
28
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
yield this.assertIsNotPartOfLocation(this.fakedTeammates[0].id);
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
static passesWhenFakedOwnerIsPartOfLocation() {
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
const is = yield this.isPartOfLocation(this.fakedPerson.id);
|
|
35
|
-
assert.isTrue(is);
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
static assertIsNotPartOfLocation(personId) {
|
|
39
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
const is = yield this.isPartOfLocation(personId);
|
|
41
|
-
assert.isFalse(is);
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
static isPartOfLocation(personId) {
|
|
45
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
return yield this.locations.isPartOfLocation({
|
|
47
|
-
personId,
|
|
48
|
-
locationId: this.fakedLocations[0].id,
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
__decorate([
|
|
54
|
-
test(),
|
|
55
|
-
seed('locations', 1)
|
|
56
|
-
], FakingAddingPeopleToALocationTest, "noRolesAtLocationToStart", null);
|
|
57
|
-
__decorate([
|
|
58
|
-
test(),
|
|
59
|
-
seed('organizations', 1),
|
|
60
|
-
seed('teammates', 1),
|
|
61
|
-
seed('locations', 1)
|
|
62
|
-
], FakingAddingPeopleToALocationTest, "differenciatesBetweenOrgAndLocation", null);
|
|
63
|
-
__decorate([
|
|
64
|
-
test(),
|
|
65
|
-
seed('locations', 1)
|
|
66
|
-
], FakingAddingPeopleToALocationTest, "passesWhenFakedOwnerIsPartOfLocation", null);
|
|
67
|
-
FakingAddingPeopleToALocationTest = __decorate([
|
|
68
|
-
fake.login()
|
|
69
|
-
], FakingAddingPeopleToALocationTest);
|
|
70
|
-
export default FakingAddingPeopleToALocationTest;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
|
|
2
|
-
export default class FakingAddingPeopleToAnOrgTest extends AbstractSpruceFixtureTest {
|
|
3
|
-
protected static canCreateFakingAddingPeopleToAnOrg(): Promise<void>;
|
|
4
|
-
protected static seedsDifferentTeammates(): Promise<void>;
|
|
5
|
-
protected static seedsDifferentGuests(): Promise<void>;
|
|
6
|
-
protected static seedsDifferentManager(): Promise<void>;
|
|
7
|
-
protected static seedsDifferentGroupManager(): Promise<void>;
|
|
8
|
-
protected static seedsDifferentOwners(): Promise<void>;
|
|
9
|
-
protected static seedsDifferentTeammatesThenGuests(): Promise<void>;
|
|
10
|
-
protected static listingRolesHonorsOrgId(): Promise<void>;
|
|
11
|
-
protected static removesRoleFromProperOrg(): Promise<void>;
|
|
12
|
-
private static assertTotalRolesReturned;
|
|
13
|
-
private static assertSeededPeopleAreDifferent;
|
|
14
|
-
}
|
|
@@ -1,165 +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 { test, assert } from '@sprucelabs/test-utils';
|
|
17
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest.js';
|
|
18
|
-
import fake from '../../../tests/decorators/fake.js';
|
|
19
|
-
import seed from '../../../tests/decorators/seed.js';
|
|
20
|
-
let FakingAddingPeopleToAnOrgTest = class FakingAddingPeopleToAnOrgTest extends AbstractSpruceFixtureTest {
|
|
21
|
-
static canCreateFakingAddingPeopleToAnOrg() {
|
|
22
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
assert.isLength(this.fakedOwners, 2);
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
static seedsDifferentTeammates() {
|
|
27
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
this.assertSeededPeopleAreDifferent('fakedTeammates');
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
static seedsDifferentGuests() {
|
|
32
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
-
this.assertSeededPeopleAreDifferent('fakedGuests');
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
static seedsDifferentManager() {
|
|
37
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
this.assertSeededPeopleAreDifferent('fakedManagers');
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
static seedsDifferentGroupManager() {
|
|
42
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
this.assertSeededPeopleAreDifferent('fakedGroupManagers');
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
static seedsDifferentOwners() {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
const [, person1, person2] = this.fakedOwners;
|
|
49
|
-
assert.isNotEqual(person1.id, person2.id);
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
static seedsDifferentTeammatesThenGuests() {
|
|
53
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
const teammate = this.fakedTeammates[0];
|
|
55
|
-
const guest = this.fakedGuests[0];
|
|
56
|
-
assert.isNotEqual(teammate.id, guest.id);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
static listingRolesHonorsOrgId() {
|
|
60
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
const [teammate1, teammate2] = this.fakedTeammates;
|
|
62
|
-
const [org1, org2] = this.fakedOrganizations;
|
|
63
|
-
yield this.assertTotalRolesReturned(org2.id, teammate1.id, 0);
|
|
64
|
-
yield this.assertTotalRolesReturned(org1.id, teammate2.id, 0);
|
|
65
|
-
yield this.assertTotalRolesReturned(org1.id, teammate1.id, 1);
|
|
66
|
-
yield this.assertTotalRolesReturned(org2.id, teammate2.id, 1);
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
static removesRoleFromProperOrg() {
|
|
70
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
-
const [teammate] = this.fakedTeammates;
|
|
72
|
-
const [org1, org2] = this.fakedOrganizations;
|
|
73
|
-
yield this.organizations.addPerson({
|
|
74
|
-
organizationId: org1.id,
|
|
75
|
-
personId: teammate.id,
|
|
76
|
-
roleBase: 'teammate',
|
|
77
|
-
});
|
|
78
|
-
yield this.assertTotalRolesReturned(org1.id, teammate.id, 1);
|
|
79
|
-
yield this.assertTotalRolesReturned(org2.id, teammate.id, 1);
|
|
80
|
-
yield this.organizations.removePerson({
|
|
81
|
-
personId: teammate.id,
|
|
82
|
-
organizationId: org1.id,
|
|
83
|
-
roleBase: 'teammate',
|
|
84
|
-
});
|
|
85
|
-
yield this.assertTotalRolesReturned(org1.id, teammate.id, 0);
|
|
86
|
-
yield this.assertTotalRolesReturned(org2.id, teammate.id, 1);
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
static assertTotalRolesReturned(orgId, teammateId, expected) {
|
|
90
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
-
const roles = yield this.roles.listRoles({
|
|
92
|
-
organizationId: orgId,
|
|
93
|
-
personId: teammateId,
|
|
94
|
-
});
|
|
95
|
-
assert.isLength(roles, expected);
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
static assertSeededPeopleAreDifferent(key) {
|
|
99
|
-
const [person1, person2] = this[key];
|
|
100
|
-
assert.isNotEqual(person1.id, person2.id);
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
__decorate([
|
|
104
|
-
test(),
|
|
105
|
-
seed('organizations', 1),
|
|
106
|
-
seed('owners', 1)
|
|
107
|
-
], FakingAddingPeopleToAnOrgTest, "canCreateFakingAddingPeopleToAnOrg", null);
|
|
108
|
-
__decorate([
|
|
109
|
-
test(),
|
|
110
|
-
seed('organizations', 1),
|
|
111
|
-
seed('teammates', 1),
|
|
112
|
-
seed('organizations', 1),
|
|
113
|
-
seed('teammates', 1)
|
|
114
|
-
], FakingAddingPeopleToAnOrgTest, "seedsDifferentTeammates", null);
|
|
115
|
-
__decorate([
|
|
116
|
-
test(),
|
|
117
|
-
seed('organizations', 1),
|
|
118
|
-
seed('guests', 1),
|
|
119
|
-
seed('organizations', 1),
|
|
120
|
-
seed('guests', 1)
|
|
121
|
-
], FakingAddingPeopleToAnOrgTest, "seedsDifferentGuests", null);
|
|
122
|
-
__decorate([
|
|
123
|
-
test(),
|
|
124
|
-
seed('organizations', 1),
|
|
125
|
-
seed('managers', 1),
|
|
126
|
-
seed('organizations', 1),
|
|
127
|
-
seed('managers', 1)
|
|
128
|
-
], FakingAddingPeopleToAnOrgTest, "seedsDifferentManager", null);
|
|
129
|
-
__decorate([
|
|
130
|
-
test(),
|
|
131
|
-
seed('organizations', 1),
|
|
132
|
-
seed('groupManagers', 1),
|
|
133
|
-
seed('organizations', 1),
|
|
134
|
-
seed('groupManagers', 1)
|
|
135
|
-
], FakingAddingPeopleToAnOrgTest, "seedsDifferentGroupManager", null);
|
|
136
|
-
__decorate([
|
|
137
|
-
test(),
|
|
138
|
-
seed('organizations', 1),
|
|
139
|
-
seed('owners', 1),
|
|
140
|
-
seed('organizations', 1),
|
|
141
|
-
seed('owners', 1)
|
|
142
|
-
], FakingAddingPeopleToAnOrgTest, "seedsDifferentOwners", null);
|
|
143
|
-
__decorate([
|
|
144
|
-
test(),
|
|
145
|
-
seed('organizations', 1),
|
|
146
|
-
seed('teammates', 1),
|
|
147
|
-
seed('guests', 1)
|
|
148
|
-
], FakingAddingPeopleToAnOrgTest, "seedsDifferentTeammatesThenGuests", null);
|
|
149
|
-
__decorate([
|
|
150
|
-
test(),
|
|
151
|
-
seed('organizations', 1),
|
|
152
|
-
seed('teammates', 1),
|
|
153
|
-
seed('organizations', 1),
|
|
154
|
-
seed('teammates', 1)
|
|
155
|
-
], FakingAddingPeopleToAnOrgTest, "listingRolesHonorsOrgId", null);
|
|
156
|
-
__decorate([
|
|
157
|
-
test(),
|
|
158
|
-
seed('organizations', 1),
|
|
159
|
-
seed('teammates', 1),
|
|
160
|
-
seed('organizations', 1)
|
|
161
|
-
], FakingAddingPeopleToAnOrgTest, "removesRoleFromProperOrg", null);
|
|
162
|
-
FakingAddingPeopleToAnOrgTest = __decorate([
|
|
163
|
-
fake.login()
|
|
164
|
-
], FakingAddingPeopleToAnOrgTest);
|
|
165
|
-
export default FakingAddingPeopleToAnOrgTest;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
|
|
2
|
-
export default class FakingAuthenticatorTest extends AbstractSpruceFixtureTest {
|
|
3
|
-
protected static canCreateFakingAuthenticator(): Promise<void>;
|
|
4
|
-
protected static setsProperSessionToken(): Promise<void>;
|
|
5
|
-
}
|
|
@@ -1,43 +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 { test, assert } from '@sprucelabs/test-utils';
|
|
17
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest.js';
|
|
18
|
-
import fake from '../../../tests/decorators/fake.js';
|
|
19
|
-
let FakingAuthenticatorTest = class FakingAuthenticatorTest extends AbstractSpruceFixtureTest {
|
|
20
|
-
static canCreateFakingAuthenticator() {
|
|
21
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const auth = this.views.getAuthenticator();
|
|
23
|
-
assert.isEqualDeep(auth.getPerson(), this.fakedPerson);
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
static setsProperSessionToken() {
|
|
27
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
const auth = this.views.getAuthenticator();
|
|
29
|
-
//@ts-ignore
|
|
30
|
-
assert.isEqual(auth.getSessionToken(), this.fakedClient.auth.token);
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
__decorate([
|
|
35
|
-
test()
|
|
36
|
-
], FakingAuthenticatorTest, "canCreateFakingAuthenticator", null);
|
|
37
|
-
__decorate([
|
|
38
|
-
test()
|
|
39
|
-
], FakingAuthenticatorTest, "setsProperSessionToken", null);
|
|
40
|
-
FakingAuthenticatorTest = __decorate([
|
|
41
|
-
fake.login()
|
|
42
|
-
], FakingAuthenticatorTest);
|
|
43
|
-
export default FakingAuthenticatorTest;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
|
|
2
|
-
export default class FakingInBeforeEachTest extends AbstractSpruceFixtureTest {
|
|
3
|
-
protected static beforeEach(): Promise<void>;
|
|
4
|
-
protected static canGetLocations(): Promise<void>;
|
|
5
|
-
protected static canGetRolesForBothSeededOrgs(): Promise<void>;
|
|
6
|
-
}
|
|
@@ -1,55 +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 { test, assert } from '@sprucelabs/test-utils';
|
|
17
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest.js';
|
|
18
|
-
import fake from '../../../tests/decorators/fake.js';
|
|
19
|
-
import seed from '../../../tests/decorators/seed.js';
|
|
20
|
-
let FakingInBeforeEachTest = class FakingInBeforeEachTest extends AbstractSpruceFixtureTest {
|
|
21
|
-
static beforeEach() {
|
|
22
|
-
const _super = Object.create(null, {
|
|
23
|
-
beforeEach: { get: () => super.beforeEach }
|
|
24
|
-
});
|
|
25
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
yield _super.beforeEach.call(this);
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
static canGetLocations() {
|
|
30
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
assert.isLength(this.fakedLocations, 1);
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
static canGetRolesForBothSeededOrgs() {
|
|
35
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
const matches = this.fakedRoles.filter((r) => r.organizationId === this.fakedOrganizations[0].id);
|
|
37
|
-
const matches2 = this.fakedRoles.filter((r) => r.organizationId === this.fakedOrganizations[1].id);
|
|
38
|
-
assert.isEqual(matches.length, matches2.length);
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
__decorate([
|
|
43
|
-
seed('locations', 1)
|
|
44
|
-
], FakingInBeforeEachTest, "beforeEach", null);
|
|
45
|
-
__decorate([
|
|
46
|
-
test()
|
|
47
|
-
], FakingInBeforeEachTest, "canGetLocations", null);
|
|
48
|
-
__decorate([
|
|
49
|
-
test(),
|
|
50
|
-
seed('organizations', 1)
|
|
51
|
-
], FakingInBeforeEachTest, "canGetRolesForBothSeededOrgs", null);
|
|
52
|
-
FakingInBeforeEachTest = __decorate([
|
|
53
|
-
fake.login()
|
|
54
|
-
], FakingInBeforeEachTest);
|
|
55
|
-
export default FakingInBeforeEachTest;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
|
|
2
|
-
export default class FakingLocationsTest extends AbstractSpruceFixtureTest {
|
|
3
|
-
protected static listingLocationsWithoutTargetGetsAllLocations(): Promise<void>;
|
|
4
|
-
protected static seededLocationsComeBackInDateCreatedDescOrder(): Promise<void>;
|
|
5
|
-
private static emitListLocations;
|
|
6
|
-
}
|
|
@@ -1,55 +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 { test, assert } from '@sprucelabs/test-utils';
|
|
17
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest.js';
|
|
18
|
-
import fake from '../../../tests/decorators/fake.js';
|
|
19
|
-
import seed from '../../../tests/decorators/seed.js';
|
|
20
|
-
let FakingLocationsTest = class FakingLocationsTest extends AbstractSpruceFixtureTest {
|
|
21
|
-
static listingLocationsWithoutTargetGetsAllLocations() {
|
|
22
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
const locations = yield this.emitListLocations();
|
|
24
|
-
assert.isEqualDeep(locations, this.fakedLocations);
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
static seededLocationsComeBackInDateCreatedDescOrder() {
|
|
28
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
const location1 = yield this.locations.seedDemoLocation({});
|
|
30
|
-
const location2 = yield this.locations.seedDemoLocation({});
|
|
31
|
-
const location3 = yield this.locations.seedDemoLocation({});
|
|
32
|
-
const locations = yield this.emitListLocations();
|
|
33
|
-
assert.isEqualDeep(locations, [location3, location2, location1]);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
static emitListLocations() {
|
|
37
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
const [{ locations }] = yield this.fakedClient.emitAndFlattenResponses('list-locations::v2020_12_25');
|
|
39
|
-
return locations;
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
__decorate([
|
|
44
|
-
test(),
|
|
45
|
-
seed('locations', 1),
|
|
46
|
-
seed('organizations', 1),
|
|
47
|
-
seed('locations', 1)
|
|
48
|
-
], FakingLocationsTest, "listingLocationsWithoutTargetGetsAllLocations", null);
|
|
49
|
-
__decorate([
|
|
50
|
-
test()
|
|
51
|
-
], FakingLocationsTest, "seededLocationsComeBackInDateCreatedDescOrder", null);
|
|
52
|
-
FakingLocationsTest = __decorate([
|
|
53
|
-
fake.login()
|
|
54
|
-
], FakingLocationsTest);
|
|
55
|
-
export default FakingLocationsTest;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
|
|
2
|
-
export default class FakingRoleEventsTest extends AbstractSpruceFixtureTest {
|
|
3
|
-
private static org;
|
|
4
|
-
protected static beforeEach(): Promise<void>;
|
|
5
|
-
protected static canListOwners(): Promise<void>;
|
|
6
|
-
protected static canListOtherRoles(): Promise<void>;
|
|
7
|
-
protected static canGetRole(idx: number): Promise<void>;
|
|
8
|
-
protected static throwsWithBadRole(): Promise<void>;
|
|
9
|
-
protected static listingRolesByLocationFiltersByOrg(): Promise<void>;
|
|
10
|
-
protected static settingListenerOnListRolesResetsNextTest(): Promise<void>;
|
|
11
|
-
protected static allRolesArePrivateButGuestToStart(): Promise<void>;
|
|
12
|
-
protected static listRolesCanTogglePrivate(): Promise<void>;
|
|
13
|
-
private static assertTotalRolesReturned;
|
|
14
|
-
private static assertRolesMatchOrg;
|
|
15
|
-
private static emitGetRole;
|
|
16
|
-
private static assertPersonGetsBackRoleWithbase;
|
|
17
|
-
private static getFakedRole;
|
|
18
|
-
private static listRolesForOrg;
|
|
19
|
-
}
|
|
@@ -1,175 +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 { BASE_ROLES_WITH_META, } from '@sprucelabs/spruce-core-schemas';
|
|
17
|
-
import { test, assert } from '@sprucelabs/test-utils';
|
|
18
|
-
import { errorAssert, generateId } from '@sprucelabs/test-utils';
|
|
19
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest.js';
|
|
20
|
-
import fake from '../../../tests/decorators/fake.js';
|
|
21
|
-
import seed from '../../../tests/decorators/seed.js';
|
|
22
|
-
import eventFaker from '../../../tests/eventFaker.js';
|
|
23
|
-
let FakingRoleEventsTest = class FakingRoleEventsTest extends AbstractSpruceFixtureTest {
|
|
24
|
-
static beforeEach() {
|
|
25
|
-
const _super = Object.create(null, {
|
|
26
|
-
beforeEach: { get: () => super.beforeEach }
|
|
27
|
-
});
|
|
28
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
yield _super.beforeEach.call(this);
|
|
30
|
-
this.org = yield this.organizations.seedDemoOrganization();
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
static canListOwners() {
|
|
34
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
yield this.assertPersonGetsBackRoleWithbase(fake.getPerson().id, 'owner');
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
static canListOtherRoles() {
|
|
39
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
const teammate = this.fakedTeammates[0];
|
|
41
|
-
yield this.assertPersonGetsBackRoleWithbase(teammate.id, 'teammate');
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
static canGetRole(idx) {
|
|
45
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
const id = this.fakedRoles[idx].id;
|
|
47
|
-
const role = yield this.emitGetRole(id);
|
|
48
|
-
assert.isEqualDeep(role, this.fakedRoles[idx]);
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
static throwsWithBadRole() {
|
|
52
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
-
const err = yield assert.doesThrowAsync(() => this.emitGetRole(generateId()));
|
|
54
|
-
errorAssert.assertError(err, 'NOT_FOUND');
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
static listingRolesByLocationFiltersByOrg() {
|
|
58
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
-
yield this.assertRolesMatchOrg(0);
|
|
60
|
-
yield this.assertRolesMatchOrg(1);
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
static settingListenerOnListRolesResetsNextTest() {
|
|
64
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
-
let hitCount = 0;
|
|
66
|
-
yield eventFaker.on('list-roles::v2020_12_25', () => {
|
|
67
|
-
hitCount++;
|
|
68
|
-
return {
|
|
69
|
-
roles: [],
|
|
70
|
-
};
|
|
71
|
-
});
|
|
72
|
-
yield this.afterEach();
|
|
73
|
-
yield this.listRolesForOrg();
|
|
74
|
-
assert.isEqual(hitCount, 0);
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
static allRolesArePrivateButGuestToStart() {
|
|
78
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
-
for (const role of this.fakedRoles) {
|
|
80
|
-
assert.isEqual(role.isPublic, role.base === 'guest');
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
static listRolesCanTogglePrivate() {
|
|
85
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
-
yield this.assertTotalRolesReturned(1);
|
|
87
|
-
this.fakedRoles[0].isPublic = true;
|
|
88
|
-
yield this.assertTotalRolesReturned(2);
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
static assertTotalRolesReturned(expected) {
|
|
92
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
-
const [{ roles }] = yield fake
|
|
94
|
-
.getClient()
|
|
95
|
-
.emitAndFlattenResponses('list-roles::v2020_12_25', {
|
|
96
|
-
target: {
|
|
97
|
-
organizationId: this.org.id,
|
|
98
|
-
},
|
|
99
|
-
});
|
|
100
|
-
assert.isLength(roles, expected);
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
static assertRolesMatchOrg(idx) {
|
|
104
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
105
|
-
const roles = yield this.roles.listRoles({
|
|
106
|
-
locationId: this.fakedLocations[idx].id,
|
|
107
|
-
shouldIncludeMetaRoles: true,
|
|
108
|
-
});
|
|
109
|
-
assert.isLength(roles, BASE_ROLES_WITH_META.length);
|
|
110
|
-
assert.isEqual(roles[0].organizationId, this.fakedLocations[idx].organizationId);
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
static emitGetRole(id) {
|
|
114
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
-
const [{ role }] = yield fake
|
|
116
|
-
.getClient()
|
|
117
|
-
.emitAndFlattenResponses('get-role::v2020_12_25', {
|
|
118
|
-
target: {
|
|
119
|
-
roleId: id,
|
|
120
|
-
},
|
|
121
|
-
});
|
|
122
|
-
return role;
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
static assertPersonGetsBackRoleWithbase(personId, base) {
|
|
126
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
-
const roles = yield this.listRolesForOrg(personId);
|
|
128
|
-
assert.isEqualDeep(roles[0], this.getFakedRole(base));
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
static getFakedRole(base) {
|
|
132
|
-
return this.fakedRoles.find((r) => r.base === base);
|
|
133
|
-
}
|
|
134
|
-
static listRolesForOrg(personId) {
|
|
135
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
-
return yield this.roles.listRoles({
|
|
137
|
-
organizationId: this.org.id,
|
|
138
|
-
personId,
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
__decorate([
|
|
144
|
-
test()
|
|
145
|
-
], FakingRoleEventsTest, "canListOwners", null);
|
|
146
|
-
__decorate([
|
|
147
|
-
test(),
|
|
148
|
-
seed('teammates', 1)
|
|
149
|
-
], FakingRoleEventsTest, "canListOtherRoles", null);
|
|
150
|
-
__decorate([
|
|
151
|
-
test('can get role 1', 0),
|
|
152
|
-
test('can get role 2', 1)
|
|
153
|
-
], FakingRoleEventsTest, "canGetRole", null);
|
|
154
|
-
__decorate([
|
|
155
|
-
test()
|
|
156
|
-
], FakingRoleEventsTest, "throwsWithBadRole", null);
|
|
157
|
-
__decorate([
|
|
158
|
-
test(),
|
|
159
|
-
seed('locations', 1),
|
|
160
|
-
seed('organizations', 1),
|
|
161
|
-
seed('locations', 1)
|
|
162
|
-
], FakingRoleEventsTest, "listingRolesByLocationFiltersByOrg", null);
|
|
163
|
-
__decorate([
|
|
164
|
-
test()
|
|
165
|
-
], FakingRoleEventsTest, "settingListenerOnListRolesResetsNextTest", null);
|
|
166
|
-
__decorate([
|
|
167
|
-
test()
|
|
168
|
-
], FakingRoleEventsTest, "allRolesArePrivateButGuestToStart", null);
|
|
169
|
-
__decorate([
|
|
170
|
-
test()
|
|
171
|
-
], FakingRoleEventsTest, "listRolesCanTogglePrivate", null);
|
|
172
|
-
FakingRoleEventsTest = __decorate([
|
|
173
|
-
fake.login()
|
|
174
|
-
], FakingRoleEventsTest);
|
|
175
|
-
export default FakingRoleEventsTest;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
|
|
2
|
-
export default class FakingSkillEventsTest extends AbstractSpruceFixtureTest {
|
|
3
|
-
private static lastEnvSkillId;
|
|
4
|
-
private static lastEnvApiKey;
|
|
5
|
-
protected static canSeedSkill(): Promise<void>;
|
|
6
|
-
protected static skillsGenerateUniqueValues(): Promise<void>;
|
|
7
|
-
protected static canLoginAsCurrentSkillWithoutEnvSet(): Promise<void>;
|
|
8
|
-
protected static doesNotMutateSkillEnvIfExists(): Promise<void>;
|
|
9
|
-
protected static doesNotMutateSkillEnvIfExistsCheck(): Promise<void>;
|
|
10
|
-
protected static seededSkillsAvailableLocally(): Promise<void>;
|
|
11
|
-
protected static authenticateThrowsWhenBadAuth(): Promise<void>;
|
|
12
|
-
protected static authenticateThrowsWhenBadAuthId(): Promise<void>;
|
|
13
|
-
protected static canAuthenticateAsSkill(): Promise<void>;
|
|
14
|
-
protected static returnsTheExpectedSkill(): Promise<void>;
|
|
15
|
-
protected static skillSeedsWithPassedValues(): Promise<void>;
|
|
16
|
-
protected static whoAmIReturnsSkill(): Promise<void>;
|
|
17
|
-
protected static whoAmIReturnsSkillExpectedSkill(): Promise<void>;
|
|
18
|
-
protected static returnsCurrentSkillIfEnvSet(): Promise<void>;
|
|
19
|
-
private static assertExpectedWhoAmIResults;
|
|
20
|
-
private static seedDemoSkill;
|
|
21
|
-
private static assertCanAuthAsSkill;
|
|
22
|
-
private static emitAuthenticateAsSkill;
|
|
23
|
-
private static get client();
|
|
24
|
-
}
|