@sprucelabs/spruce-test-fixtures 62.2.24 → 62.2.26
Sign up to get free protection for your applications and to get access to all the features.
- 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,141 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
const test_utils_1 = require("@sprucelabs/test-utils");
|
13
|
-
const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
|
14
|
-
const fake_1 = __importDefault(require("../../../tests/decorators/fake"));
|
15
|
-
const seed_1 = __importDefault(require("../../../tests/decorators/seed"));
|
16
|
-
let FakingAddingPeopleToAnOrgTest = class FakingAddingPeopleToAnOrgTest extends AbstractSpruceFixtureTest_1.default {
|
17
|
-
static async canCreateFakingAddingPeopleToAnOrg() {
|
18
|
-
test_utils_1.assert.isLength(this.fakedOwners, 2);
|
19
|
-
}
|
20
|
-
static async seedsDifferentTeammates() {
|
21
|
-
this.assertSeededPeopleAreDifferent('fakedTeammates');
|
22
|
-
}
|
23
|
-
static async seedsDifferentGuests() {
|
24
|
-
this.assertSeededPeopleAreDifferent('fakedGuests');
|
25
|
-
}
|
26
|
-
static async seedsDifferentManager() {
|
27
|
-
this.assertSeededPeopleAreDifferent('fakedManagers');
|
28
|
-
}
|
29
|
-
static async seedsDifferentGroupManager() {
|
30
|
-
this.assertSeededPeopleAreDifferent('fakedGroupManagers');
|
31
|
-
}
|
32
|
-
static async seedsDifferentOwners() {
|
33
|
-
const [, person1, person2] = this.fakedOwners;
|
34
|
-
test_utils_1.assert.isNotEqual(person1.id, person2.id);
|
35
|
-
}
|
36
|
-
static async seedsDifferentTeammatesThenGuests() {
|
37
|
-
const teammate = this.fakedTeammates[0];
|
38
|
-
const guest = this.fakedGuests[0];
|
39
|
-
test_utils_1.assert.isNotEqual(teammate.id, guest.id);
|
40
|
-
}
|
41
|
-
static async listingRolesHonorsOrgId() {
|
42
|
-
const [teammate1, teammate2] = this.fakedTeammates;
|
43
|
-
const [org1, org2] = this.fakedOrganizations;
|
44
|
-
await this.assertTotalRolesReturned(org2.id, teammate1.id, 0);
|
45
|
-
await this.assertTotalRolesReturned(org1.id, teammate2.id, 0);
|
46
|
-
await this.assertTotalRolesReturned(org1.id, teammate1.id, 1);
|
47
|
-
await this.assertTotalRolesReturned(org2.id, teammate2.id, 1);
|
48
|
-
}
|
49
|
-
static async removesRoleFromProperOrg() {
|
50
|
-
const [teammate] = this.fakedTeammates;
|
51
|
-
const [org1, org2] = this.fakedOrganizations;
|
52
|
-
await this.organizations.addPerson({
|
53
|
-
organizationId: org1.id,
|
54
|
-
personId: teammate.id,
|
55
|
-
roleBase: 'teammate',
|
56
|
-
});
|
57
|
-
await this.assertTotalRolesReturned(org1.id, teammate.id, 1);
|
58
|
-
await this.assertTotalRolesReturned(org2.id, teammate.id, 1);
|
59
|
-
await this.organizations.removePerson({
|
60
|
-
personId: teammate.id,
|
61
|
-
organizationId: org1.id,
|
62
|
-
roleBase: 'teammate',
|
63
|
-
});
|
64
|
-
await this.assertTotalRolesReturned(org1.id, teammate.id, 0);
|
65
|
-
await this.assertTotalRolesReturned(org2.id, teammate.id, 1);
|
66
|
-
}
|
67
|
-
static async assertTotalRolesReturned(orgId, teammateId, expected) {
|
68
|
-
const roles = await this.roles.listRoles({
|
69
|
-
organizationId: orgId,
|
70
|
-
personId: teammateId,
|
71
|
-
});
|
72
|
-
test_utils_1.assert.isLength(roles, expected);
|
73
|
-
}
|
74
|
-
static assertSeededPeopleAreDifferent(key) {
|
75
|
-
const [person1, person2] = this[key];
|
76
|
-
test_utils_1.assert.isNotEqual(person1.id, person2.id);
|
77
|
-
}
|
78
|
-
};
|
79
|
-
__decorate([
|
80
|
-
(0, test_utils_1.test)(),
|
81
|
-
(0, seed_1.default)('organizations', 1),
|
82
|
-
(0, seed_1.default)('owners', 1)
|
83
|
-
], FakingAddingPeopleToAnOrgTest, "canCreateFakingAddingPeopleToAnOrg", null);
|
84
|
-
__decorate([
|
85
|
-
(0, test_utils_1.test)(),
|
86
|
-
(0, seed_1.default)('organizations', 1),
|
87
|
-
(0, seed_1.default)('teammates', 1),
|
88
|
-
(0, seed_1.default)('organizations', 1),
|
89
|
-
(0, seed_1.default)('teammates', 1)
|
90
|
-
], FakingAddingPeopleToAnOrgTest, "seedsDifferentTeammates", null);
|
91
|
-
__decorate([
|
92
|
-
(0, test_utils_1.test)(),
|
93
|
-
(0, seed_1.default)('organizations', 1),
|
94
|
-
(0, seed_1.default)('guests', 1),
|
95
|
-
(0, seed_1.default)('organizations', 1),
|
96
|
-
(0, seed_1.default)('guests', 1)
|
97
|
-
], FakingAddingPeopleToAnOrgTest, "seedsDifferentGuests", null);
|
98
|
-
__decorate([
|
99
|
-
(0, test_utils_1.test)(),
|
100
|
-
(0, seed_1.default)('organizations', 1),
|
101
|
-
(0, seed_1.default)('managers', 1),
|
102
|
-
(0, seed_1.default)('organizations', 1),
|
103
|
-
(0, seed_1.default)('managers', 1)
|
104
|
-
], FakingAddingPeopleToAnOrgTest, "seedsDifferentManager", null);
|
105
|
-
__decorate([
|
106
|
-
(0, test_utils_1.test)(),
|
107
|
-
(0, seed_1.default)('organizations', 1),
|
108
|
-
(0, seed_1.default)('groupManagers', 1),
|
109
|
-
(0, seed_1.default)('organizations', 1),
|
110
|
-
(0, seed_1.default)('groupManagers', 1)
|
111
|
-
], FakingAddingPeopleToAnOrgTest, "seedsDifferentGroupManager", null);
|
112
|
-
__decorate([
|
113
|
-
(0, test_utils_1.test)(),
|
114
|
-
(0, seed_1.default)('organizations', 1),
|
115
|
-
(0, seed_1.default)('owners', 1),
|
116
|
-
(0, seed_1.default)('organizations', 1),
|
117
|
-
(0, seed_1.default)('owners', 1)
|
118
|
-
], FakingAddingPeopleToAnOrgTest, "seedsDifferentOwners", null);
|
119
|
-
__decorate([
|
120
|
-
(0, test_utils_1.test)(),
|
121
|
-
(0, seed_1.default)('organizations', 1),
|
122
|
-
(0, seed_1.default)('teammates', 1),
|
123
|
-
(0, seed_1.default)('guests', 1)
|
124
|
-
], FakingAddingPeopleToAnOrgTest, "seedsDifferentTeammatesThenGuests", null);
|
125
|
-
__decorate([
|
126
|
-
(0, test_utils_1.test)(),
|
127
|
-
(0, seed_1.default)('organizations', 1),
|
128
|
-
(0, seed_1.default)('teammates', 1),
|
129
|
-
(0, seed_1.default)('organizations', 1),
|
130
|
-
(0, seed_1.default)('teammates', 1)
|
131
|
-
], FakingAddingPeopleToAnOrgTest, "listingRolesHonorsOrgId", null);
|
132
|
-
__decorate([
|
133
|
-
(0, test_utils_1.test)(),
|
134
|
-
(0, seed_1.default)('organizations', 1),
|
135
|
-
(0, seed_1.default)('teammates', 1),
|
136
|
-
(0, seed_1.default)('organizations', 1)
|
137
|
-
], FakingAddingPeopleToAnOrgTest, "removesRoleFromProperOrg", null);
|
138
|
-
FakingAddingPeopleToAnOrgTest = __decorate([
|
139
|
-
fake_1.default.login()
|
140
|
-
], FakingAddingPeopleToAnOrgTest);
|
141
|
-
exports.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,35 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
const test_utils_1 = require("@sprucelabs/test-utils");
|
13
|
-
const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
|
14
|
-
const fake_1 = __importDefault(require("../../../tests/decorators/fake"));
|
15
|
-
let FakingAuthenticatorTest = class FakingAuthenticatorTest extends AbstractSpruceFixtureTest_1.default {
|
16
|
-
static async canCreateFakingAuthenticator() {
|
17
|
-
const auth = this.views.getAuthenticator();
|
18
|
-
test_utils_1.assert.isEqualDeep(auth.getPerson(), this.fakedPerson);
|
19
|
-
}
|
20
|
-
static async setsProperSessionToken() {
|
21
|
-
const auth = this.views.getAuthenticator();
|
22
|
-
//@ts-ignore
|
23
|
-
test_utils_1.assert.isEqual(auth.getSessionToken(), this.fakedClient.auth.token);
|
24
|
-
}
|
25
|
-
};
|
26
|
-
__decorate([
|
27
|
-
(0, test_utils_1.test)()
|
28
|
-
], FakingAuthenticatorTest, "canCreateFakingAuthenticator", null);
|
29
|
-
__decorate([
|
30
|
-
(0, test_utils_1.test)()
|
31
|
-
], FakingAuthenticatorTest, "setsProperSessionToken", null);
|
32
|
-
FakingAuthenticatorTest = __decorate([
|
33
|
-
fake_1.default.login()
|
34
|
-
], FakingAuthenticatorTest);
|
35
|
-
exports.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,42 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
const test_utils_1 = require("@sprucelabs/test-utils");
|
13
|
-
const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
|
14
|
-
const fake_1 = __importDefault(require("../../../tests/decorators/fake"));
|
15
|
-
const seed_1 = __importDefault(require("../../../tests/decorators/seed"));
|
16
|
-
let FakingInBeforeEachTest = class FakingInBeforeEachTest extends AbstractSpruceFixtureTest_1.default {
|
17
|
-
static async beforeEach() {
|
18
|
-
await super.beforeEach();
|
19
|
-
}
|
20
|
-
static async canGetLocations() {
|
21
|
-
test_utils_1.assert.isLength(this.fakedLocations, 1);
|
22
|
-
}
|
23
|
-
static async canGetRolesForBothSeededOrgs() {
|
24
|
-
const matches = this.fakedRoles.filter((r) => r.organizationId === this.fakedOrganizations[0].id);
|
25
|
-
const matches2 = this.fakedRoles.filter((r) => r.organizationId === this.fakedOrganizations[1].id);
|
26
|
-
test_utils_1.assert.isEqual(matches.length, matches2.length);
|
27
|
-
}
|
28
|
-
};
|
29
|
-
__decorate([
|
30
|
-
(0, seed_1.default)('locations', 1)
|
31
|
-
], FakingInBeforeEachTest, "beforeEach", null);
|
32
|
-
__decorate([
|
33
|
-
(0, test_utils_1.test)()
|
34
|
-
], FakingInBeforeEachTest, "canGetLocations", null);
|
35
|
-
__decorate([
|
36
|
-
(0, test_utils_1.test)(),
|
37
|
-
(0, seed_1.default)('organizations', 1)
|
38
|
-
], FakingInBeforeEachTest, "canGetRolesForBothSeededOrgs", null);
|
39
|
-
FakingInBeforeEachTest = __decorate([
|
40
|
-
fake_1.default.login()
|
41
|
-
], FakingInBeforeEachTest);
|
42
|
-
exports.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,45 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
const test_utils_1 = require("@sprucelabs/test-utils");
|
13
|
-
const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
|
14
|
-
const fake_1 = __importDefault(require("../../../tests/decorators/fake"));
|
15
|
-
const seed_1 = __importDefault(require("../../../tests/decorators/seed"));
|
16
|
-
let FakingLocationsTest = class FakingLocationsTest extends AbstractSpruceFixtureTest_1.default {
|
17
|
-
static async listingLocationsWithoutTargetGetsAllLocations() {
|
18
|
-
const locations = await this.emitListLocations();
|
19
|
-
test_utils_1.assert.isEqualDeep(locations, this.fakedLocations);
|
20
|
-
}
|
21
|
-
static async seededLocationsComeBackInDateCreatedDescOrder() {
|
22
|
-
const location1 = await this.locations.seedDemoLocation({});
|
23
|
-
const location2 = await this.locations.seedDemoLocation({});
|
24
|
-
const location3 = await this.locations.seedDemoLocation({});
|
25
|
-
const locations = await this.emitListLocations();
|
26
|
-
test_utils_1.assert.isEqualDeep(locations, [location3, location2, location1]);
|
27
|
-
}
|
28
|
-
static async emitListLocations() {
|
29
|
-
const [{ locations }] = await this.fakedClient.emitAndFlattenResponses('list-locations::v2020_12_25');
|
30
|
-
return locations;
|
31
|
-
}
|
32
|
-
};
|
33
|
-
__decorate([
|
34
|
-
(0, test_utils_1.test)(),
|
35
|
-
(0, seed_1.default)('locations', 1),
|
36
|
-
(0, seed_1.default)('organizations', 1),
|
37
|
-
(0, seed_1.default)('locations', 1)
|
38
|
-
], FakingLocationsTest, "listingLocationsWithoutTargetGetsAllLocations", null);
|
39
|
-
__decorate([
|
40
|
-
(0, test_utils_1.test)()
|
41
|
-
], FakingLocationsTest, "seededLocationsComeBackInDateCreatedDescOrder", null);
|
42
|
-
FakingLocationsTest = __decorate([
|
43
|
-
fake_1.default.login()
|
44
|
-
], FakingLocationsTest);
|
45
|
-
exports.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,140 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
const spruce_core_schemas_1 = require("@sprucelabs/spruce-core-schemas");
|
13
|
-
const test_utils_1 = require("@sprucelabs/test-utils");
|
14
|
-
const test_utils_2 = require("@sprucelabs/test-utils");
|
15
|
-
const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
|
16
|
-
const fake_1 = __importDefault(require("../../../tests/decorators/fake"));
|
17
|
-
const seed_1 = __importDefault(require("../../../tests/decorators/seed"));
|
18
|
-
const eventFaker_1 = __importDefault(require("../../../tests/eventFaker"));
|
19
|
-
let FakingRoleEventsTest = class FakingRoleEventsTest extends AbstractSpruceFixtureTest_1.default {
|
20
|
-
static async beforeEach() {
|
21
|
-
await super.beforeEach();
|
22
|
-
this.org = await this.organizations.seedDemoOrganization();
|
23
|
-
}
|
24
|
-
static async canListOwners() {
|
25
|
-
await this.assertPersonGetsBackRoleWithbase(fake_1.default.getPerson().id, 'owner');
|
26
|
-
}
|
27
|
-
static async canListOtherRoles() {
|
28
|
-
const teammate = this.fakedTeammates[0];
|
29
|
-
await this.assertPersonGetsBackRoleWithbase(teammate.id, 'teammate');
|
30
|
-
}
|
31
|
-
static async canGetRole(idx) {
|
32
|
-
const id = this.fakedRoles[idx].id;
|
33
|
-
const role = await this.emitGetRole(id);
|
34
|
-
test_utils_1.assert.isEqualDeep(role, this.fakedRoles[idx]);
|
35
|
-
}
|
36
|
-
static async throwsWithBadRole() {
|
37
|
-
const err = await test_utils_1.assert.doesThrowAsync(() => this.emitGetRole((0, test_utils_2.generateId)()));
|
38
|
-
test_utils_2.errorAssert.assertError(err, 'NOT_FOUND');
|
39
|
-
}
|
40
|
-
static async listingRolesByLocationFiltersByOrg() {
|
41
|
-
await this.assertRolesMatchOrg(0);
|
42
|
-
await this.assertRolesMatchOrg(1);
|
43
|
-
}
|
44
|
-
static async settingListenerOnListRolesResetsNextTest() {
|
45
|
-
let hitCount = 0;
|
46
|
-
await eventFaker_1.default.on('list-roles::v2020_12_25', () => {
|
47
|
-
hitCount++;
|
48
|
-
return {
|
49
|
-
roles: [],
|
50
|
-
};
|
51
|
-
});
|
52
|
-
await this.afterEach();
|
53
|
-
await this.listRolesForOrg();
|
54
|
-
test_utils_1.assert.isEqual(hitCount, 0);
|
55
|
-
}
|
56
|
-
static async allRolesArePrivateButGuestToStart() {
|
57
|
-
for (const role of this.fakedRoles) {
|
58
|
-
test_utils_1.assert.isEqual(role.isPublic, role.base === 'guest');
|
59
|
-
}
|
60
|
-
}
|
61
|
-
static async listRolesCanTogglePrivate() {
|
62
|
-
await this.assertTotalRolesReturned(1);
|
63
|
-
this.fakedRoles[0].isPublic = true;
|
64
|
-
await this.assertTotalRolesReturned(2);
|
65
|
-
}
|
66
|
-
static async assertTotalRolesReturned(expected) {
|
67
|
-
const [{ roles }] = await fake_1.default
|
68
|
-
.getClient()
|
69
|
-
.emitAndFlattenResponses('list-roles::v2020_12_25', {
|
70
|
-
target: {
|
71
|
-
organizationId: this.org.id,
|
72
|
-
},
|
73
|
-
});
|
74
|
-
test_utils_1.assert.isLength(roles, expected);
|
75
|
-
}
|
76
|
-
static async assertRolesMatchOrg(idx) {
|
77
|
-
const roles = await this.roles.listRoles({
|
78
|
-
locationId: this.fakedLocations[idx].id,
|
79
|
-
shouldIncludeMetaRoles: true,
|
80
|
-
});
|
81
|
-
test_utils_1.assert.isLength(roles, spruce_core_schemas_1.BASE_ROLES_WITH_META.length);
|
82
|
-
test_utils_1.assert.isEqual(roles[0].organizationId, this.fakedLocations[idx].organizationId);
|
83
|
-
}
|
84
|
-
static async emitGetRole(id) {
|
85
|
-
const [{ role }] = await fake_1.default
|
86
|
-
.getClient()
|
87
|
-
.emitAndFlattenResponses('get-role::v2020_12_25', {
|
88
|
-
target: {
|
89
|
-
roleId: id,
|
90
|
-
},
|
91
|
-
});
|
92
|
-
return role;
|
93
|
-
}
|
94
|
-
static async assertPersonGetsBackRoleWithbase(personId, base) {
|
95
|
-
const roles = await this.listRolesForOrg(personId);
|
96
|
-
test_utils_1.assert.isEqualDeep(roles[0], this.getFakedRole(base));
|
97
|
-
}
|
98
|
-
static getFakedRole(base) {
|
99
|
-
return this.fakedRoles.find((r) => r.base === base);
|
100
|
-
}
|
101
|
-
static async listRolesForOrg(personId) {
|
102
|
-
return await this.roles.listRoles({
|
103
|
-
organizationId: this.org.id,
|
104
|
-
personId,
|
105
|
-
});
|
106
|
-
}
|
107
|
-
};
|
108
|
-
__decorate([
|
109
|
-
(0, test_utils_1.test)()
|
110
|
-
], FakingRoleEventsTest, "canListOwners", null);
|
111
|
-
__decorate([
|
112
|
-
(0, test_utils_1.test)(),
|
113
|
-
(0, seed_1.default)('teammates', 1)
|
114
|
-
], FakingRoleEventsTest, "canListOtherRoles", null);
|
115
|
-
__decorate([
|
116
|
-
(0, test_utils_1.test)('can get role 1', 0),
|
117
|
-
(0, test_utils_1.test)('can get role 2', 1)
|
118
|
-
], FakingRoleEventsTest, "canGetRole", null);
|
119
|
-
__decorate([
|
120
|
-
(0, test_utils_1.test)()
|
121
|
-
], FakingRoleEventsTest, "throwsWithBadRole", null);
|
122
|
-
__decorate([
|
123
|
-
(0, test_utils_1.test)(),
|
124
|
-
(0, seed_1.default)('locations', 1),
|
125
|
-
(0, seed_1.default)('organizations', 1),
|
126
|
-
(0, seed_1.default)('locations', 1)
|
127
|
-
], FakingRoleEventsTest, "listingRolesByLocationFiltersByOrg", null);
|
128
|
-
__decorate([
|
129
|
-
(0, test_utils_1.test)()
|
130
|
-
], FakingRoleEventsTest, "settingListenerOnListRolesResetsNextTest", null);
|
131
|
-
__decorate([
|
132
|
-
(0, test_utils_1.test)()
|
133
|
-
], FakingRoleEventsTest, "allRolesArePrivateButGuestToStart", null);
|
134
|
-
__decorate([
|
135
|
-
(0, test_utils_1.test)()
|
136
|
-
], FakingRoleEventsTest, "listRolesCanTogglePrivate", null);
|
137
|
-
FakingRoleEventsTest = __decorate([
|
138
|
-
fake_1.default.login()
|
139
|
-
], FakingRoleEventsTest);
|
140
|
-
exports.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
|
-
}
|
@@ -1,174 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
const test_utils_1 = require("@sprucelabs/test-utils");
|
13
|
-
const test_utils_2 = require("@sprucelabs/test-utils");
|
14
|
-
const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
|
15
|
-
const fake_1 = __importDefault(require("../../../tests/decorators/fake"));
|
16
|
-
let FakingSkillEventsTest = class FakingSkillEventsTest extends AbstractSpruceFixtureTest_1.default {
|
17
|
-
static async canSeedSkill() {
|
18
|
-
const skill = await this.seedDemoSkill();
|
19
|
-
test_utils_1.assert.isEqual(skill.creators[0].personId, this.fakedPerson.id);
|
20
|
-
}
|
21
|
-
static async skillsGenerateUniqueValues() {
|
22
|
-
const skill1 = await this.seedDemoSkill();
|
23
|
-
const skill2 = await this.seedDemoSkill();
|
24
|
-
test_utils_1.assert.isNotEqual(skill1.id, skill2.id);
|
25
|
-
test_utils_1.assert.isNotEqual(skill1.slug, skill2.slug);
|
26
|
-
test_utils_1.assert.isNotEqual(skill1.name, skill2.name);
|
27
|
-
test_utils_1.assert.isNotEqual(skill1.apiKey, skill2.apiKey);
|
28
|
-
}
|
29
|
-
static async canLoginAsCurrentSkillWithoutEnvSet() {
|
30
|
-
await this.skills.loginAsCurrentSkill();
|
31
|
-
}
|
32
|
-
static async doesNotMutateSkillEnvIfExists() {
|
33
|
-
this.lastEnvSkillId = process.env.SKILL_ID = (0, test_utils_2.generateId)();
|
34
|
-
this.lastEnvApiKey = process.env.SKILL_API_KEY = (0, test_utils_2.generateId)();
|
35
|
-
}
|
36
|
-
static async doesNotMutateSkillEnvIfExistsCheck() {
|
37
|
-
test_utils_1.assert.isEqual(this.lastEnvSkillId, process.env.SKILL_ID);
|
38
|
-
test_utils_1.assert.isEqual(this.lastEnvApiKey, process.env.SKILL_API_KEY);
|
39
|
-
}
|
40
|
-
static async seededSkillsAvailableLocally() {
|
41
|
-
const skill1 = await this.seedDemoSkill();
|
42
|
-
test_utils_1.assert.isEqualDeep(this.fakedSkills, [skill1]);
|
43
|
-
const skill2 = await this.seedDemoSkill();
|
44
|
-
test_utils_1.assert.isEqualDeep(this.fakedSkills, [skill2, skill1]);
|
45
|
-
}
|
46
|
-
static async authenticateThrowsWhenBadAuth() {
|
47
|
-
const err = await test_utils_1.assert.doesThrowAsync(() => this.emitAuthenticateAsSkill('', ''));
|
48
|
-
test_utils_2.errorAssert.assertError(err, 'INVALID_AUTH_TOKEN');
|
49
|
-
}
|
50
|
-
static async authenticateThrowsWhenBadAuthId() {
|
51
|
-
const skill = await this.seedDemoSkill();
|
52
|
-
const err = await test_utils_1.assert.doesThrowAsync(() => this.emitAuthenticateAsSkill(skill.apiKey, (0, test_utils_2.generateId)()));
|
53
|
-
test_utils_2.errorAssert.assertError(err, 'INVALID_AUTH_TOKEN');
|
54
|
-
}
|
55
|
-
static async canAuthenticateAsSkill() {
|
56
|
-
const skill = await this.seedDemoSkill();
|
57
|
-
const { type } = await this.emitAuthenticateAsSkill(skill.apiKey, skill.id);
|
58
|
-
test_utils_1.assert.isEqual(type, 'authenticated');
|
59
|
-
}
|
60
|
-
static async returnsTheExpectedSkill() {
|
61
|
-
const skill1 = await this.seedDemoSkill();
|
62
|
-
const skill2 = await this.seedDemoSkill();
|
63
|
-
await this.assertCanAuthAsSkill(skill1);
|
64
|
-
await this.assertCanAuthAsSkill(skill2);
|
65
|
-
}
|
66
|
-
static async skillSeedsWithPassedValues() {
|
67
|
-
const skill1 = await this.seedDemoSkill({
|
68
|
-
name: 'taco',
|
69
|
-
slug: 'bravo',
|
70
|
-
});
|
71
|
-
test_utils_1.assert.isEqual(skill1.name, 'taco');
|
72
|
-
test_utils_1.assert.isEqual(skill1.slug, 'bravo');
|
73
|
-
}
|
74
|
-
static async whoAmIReturnsSkill() {
|
75
|
-
const { client, skill } = await this.skills.loginAsDemoSkill({
|
76
|
-
name: 'Testing login',
|
77
|
-
});
|
78
|
-
await this.assertExpectedWhoAmIResults(client, skill);
|
79
|
-
}
|
80
|
-
static async whoAmIReturnsSkillExpectedSkill() {
|
81
|
-
const { client, skill } = await this.skills.loginAsDemoSkill({
|
82
|
-
name: 'Testing login',
|
83
|
-
});
|
84
|
-
await this.seedDemoSkill();
|
85
|
-
await this.assertExpectedWhoAmIResults(client, skill);
|
86
|
-
}
|
87
|
-
static async returnsCurrentSkillIfEnvSet() {
|
88
|
-
const skillId = (0, test_utils_2.generateId)();
|
89
|
-
const apiKey = (0, test_utils_2.generateId)();
|
90
|
-
process.env.SKILL_ID = skillId;
|
91
|
-
process.env.SKILL_API_KEY = apiKey;
|
92
|
-
const client = await this.mercury.connectToApi();
|
93
|
-
const [{ type, auth }] = await client.emitAndFlattenResponses('authenticate::v2020_12_25', {
|
94
|
-
payload: {
|
95
|
-
skillId,
|
96
|
-
apiKey,
|
97
|
-
},
|
98
|
-
});
|
99
|
-
const { skill } = auth;
|
100
|
-
test_utils_1.assert.isEqual(type, 'authenticated');
|
101
|
-
test_utils_1.assert.isEqual(skill === null || skill === void 0 ? void 0 : skill.id, skillId);
|
102
|
-
test_utils_1.assert.isEqual(skill === null || skill === void 0 ? void 0 : skill.apiKey, apiKey);
|
103
|
-
}
|
104
|
-
static async assertExpectedWhoAmIResults(client, skill) {
|
105
|
-
const [{ type, auth }] = await client.emitAndFlattenResponses('whoami::v2020_12_25');
|
106
|
-
test_utils_1.assert.isEqual(type, 'authenticated');
|
107
|
-
test_utils_1.assert.isEqualDeep(auth.skill, skill);
|
108
|
-
}
|
109
|
-
static async seedDemoSkill(values) {
|
110
|
-
return await this.skills.seedDemoSkill(values);
|
111
|
-
}
|
112
|
-
static async assertCanAuthAsSkill(skill1) {
|
113
|
-
const { auth } = await this.emitAuthenticateAsSkill(skill1.apiKey, skill1.id);
|
114
|
-
test_utils_1.assert.isEqualDeep(auth.skill, skill1);
|
115
|
-
}
|
116
|
-
static async emitAuthenticateAsSkill(apiKey, skillId) {
|
117
|
-
const [{ auth, type }] = await this.client.emitAndFlattenResponses('authenticate::v2020_12_25', {
|
118
|
-
payload: {
|
119
|
-
apiKey,
|
120
|
-
skillId,
|
121
|
-
},
|
122
|
-
});
|
123
|
-
return { auth, type };
|
124
|
-
}
|
125
|
-
static get client() {
|
126
|
-
return fake_1.default.getClient();
|
127
|
-
}
|
128
|
-
};
|
129
|
-
__decorate([
|
130
|
-
(0, test_utils_1.test)()
|
131
|
-
], FakingSkillEventsTest, "canSeedSkill", null);
|
132
|
-
__decorate([
|
133
|
-
(0, test_utils_1.test)()
|
134
|
-
], FakingSkillEventsTest, "skillsGenerateUniqueValues", null);
|
135
|
-
__decorate([
|
136
|
-
(0, test_utils_1.test)()
|
137
|
-
], FakingSkillEventsTest, "canLoginAsCurrentSkillWithoutEnvSet", null);
|
138
|
-
__decorate([
|
139
|
-
(0, test_utils_1.test)()
|
140
|
-
], FakingSkillEventsTest, "doesNotMutateSkillEnvIfExists", null);
|
141
|
-
__decorate([
|
142
|
-
(0, test_utils_1.test)()
|
143
|
-
], FakingSkillEventsTest, "doesNotMutateSkillEnvIfExistsCheck", null);
|
144
|
-
__decorate([
|
145
|
-
(0, test_utils_1.test)()
|
146
|
-
], FakingSkillEventsTest, "seededSkillsAvailableLocally", null);
|
147
|
-
__decorate([
|
148
|
-
(0, test_utils_1.test)()
|
149
|
-
], FakingSkillEventsTest, "authenticateThrowsWhenBadAuth", null);
|
150
|
-
__decorate([
|
151
|
-
(0, test_utils_1.test)()
|
152
|
-
], FakingSkillEventsTest, "authenticateThrowsWhenBadAuthId", null);
|
153
|
-
__decorate([
|
154
|
-
(0, test_utils_1.test)()
|
155
|
-
], FakingSkillEventsTest, "canAuthenticateAsSkill", null);
|
156
|
-
__decorate([
|
157
|
-
(0, test_utils_1.test)()
|
158
|
-
], FakingSkillEventsTest, "returnsTheExpectedSkill", null);
|
159
|
-
__decorate([
|
160
|
-
(0, test_utils_1.test)()
|
161
|
-
], FakingSkillEventsTest, "skillSeedsWithPassedValues", null);
|
162
|
-
__decorate([
|
163
|
-
(0, test_utils_1.test)()
|
164
|
-
], FakingSkillEventsTest, "whoAmIReturnsSkill", null);
|
165
|
-
__decorate([
|
166
|
-
(0, test_utils_1.test)()
|
167
|
-
], FakingSkillEventsTest, "whoAmIReturnsSkillExpectedSkill", null);
|
168
|
-
__decorate([
|
169
|
-
(0, test_utils_1.test)()
|
170
|
-
], FakingSkillEventsTest, "returnsCurrentSkillIfEnvSet", null);
|
171
|
-
FakingSkillEventsTest = __decorate([
|
172
|
-
fake_1.default.login()
|
173
|
-
], FakingSkillEventsTest);
|
174
|
-
exports.default = FakingSkillEventsTest;
|