@sprucelabs/spruce-test-fixtures 62.2.23 → 62.2.25
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +19 -19
- package/build/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.d.ts +0 -15
- package/build/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +0 -112
- package/build/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.d.ts +0 -4
- package/build/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +0 -34
- package/build/__tests__/behavioral/DisablingSchemaValidationOnTest.test.d.ts +0 -5
- package/build/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +0 -26
- package/build/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.d.ts +0 -8
- package/build/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +0 -69
- package/build/__tests__/behavioral/FakingEventResponses.test.d.ts +0 -12
- package/build/__tests__/behavioral/FakingEventResponses.test.js +0 -126
- package/build/__tests__/behavioral/FixtureFactory.test.d.ts +0 -7
- package/build/__tests__/behavioral/FixtureFactory.test.js +0 -79
- package/build/__tests__/behavioral/LocationFixture.test.d.ts +0 -17
- package/build/__tests__/behavioral/LocationFixture.test.js +0 -144
- package/build/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.d.ts +0 -12
- package/build/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +0 -95
- package/build/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.d.ts +0 -4
- package/build/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +0 -35
- package/build/__tests__/behavioral/MercuryFixture.test.d.ts +0 -20
- package/build/__tests__/behavioral/MercuryFixture.test.js +0 -187
- package/build/__tests__/behavioral/OrganizationFixture.test.d.ts +0 -31
- package/build/__tests__/behavioral/OrganizationFixture.test.js +0 -333
- package/build/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.d.ts +0 -4
- package/build/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +0 -21
- package/build/__tests__/behavioral/PersonFixture.test.d.ts +0 -22
- package/build/__tests__/behavioral/PersonFixture.test.js +0 -225
- package/build/__tests__/behavioral/PhoneNumberIncrementor.test.d.ts +0 -11
- package/build/__tests__/behavioral/PhoneNumberIncrementor.test.js +0 -95
- package/build/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.d.ts +0 -8
- package/build/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +0 -67
- package/build/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.d.ts +0 -5
- package/build/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +0 -44
- package/build/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.d.ts +0 -8
- package/build/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +0 -55
- package/build/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.d.ts +0 -10
- package/build/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +0 -137
- package/build/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.d.ts +0 -7
- package/build/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +0 -54
- package/build/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.d.ts +0 -6
- package/build/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +0 -40
- package/build/__tests__/behavioral/RoleFixture.test.d.ts +0 -15
- package/build/__tests__/behavioral/RoleFixture.test.js +0 -118
- package/build/__tests__/behavioral/SkillFixture.test.d.ts +0 -13
- package/build/__tests__/behavioral/SkillFixture.test.js +0 -118
- package/build/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.d.ts +0 -7
- package/build/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.js +0 -41
- package/build/__tests__/behavioral/databases/DatabaseFixture.test.d.ts +0 -7
- package/build/__tests__/behavioral/databases/DatabaseFixture.test.js +0 -59
- package/build/__tests__/behavioral/databases/DbResetsAsExpected.test.d.ts +0 -5
- package/build/__tests__/behavioral/databases/DbResetsAsExpected.test.js +0 -34
- package/build/__tests__/behavioral/databases/DummyStore.d.ts +0 -55
- package/build/__tests__/behavioral/databases/DummyStore.js +0 -36
- package/build/__tests__/behavioral/databases/StoreFixture.test.d.ts +0 -23
- package/build/__tests__/behavioral/databases/StoreFixture.test.js +0 -156
- package/build/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.d.ts +0 -9
- package/build/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +0 -73
- package/build/__tests__/behavioral/faking/FakeDecorator.test.d.ts +0 -45
- package/build/__tests__/behavioral/faking/FakeDecorator.test.js +0 -421
- package/build/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.d.ts +0 -4
- package/build/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +0 -23
- package/build/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.d.ts +0 -4
- package/build/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +0 -27
- package/build/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +0 -8
- package/build/__tests__/behavioral/faking/FakeThemeManager.test.js +0 -93
- package/build/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.d.ts +0 -8
- package/build/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +0 -56
- package/build/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.d.ts +0 -14
- package/build/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +0 -141
- package/build/__tests__/behavioral/faking/FakingAuthenticator.test.d.ts +0 -5
- package/build/__tests__/behavioral/faking/FakingAuthenticator.test.js +0 -35
- package/build/__tests__/behavioral/faking/FakingInBeforeEach.test.d.ts +0 -6
- package/build/__tests__/behavioral/faking/FakingInBeforeEach.test.js +0 -42
- package/build/__tests__/behavioral/faking/FakingLocations.test.d.ts +0 -6
- package/build/__tests__/behavioral/faking/FakingLocations.test.js +0 -45
- package/build/__tests__/behavioral/faking/FakingRoleEvents.test.d.ts +0 -19
- package/build/__tests__/behavioral/faking/FakingRoleEvents.test.js +0 -140
- package/build/__tests__/behavioral/faking/FakingSkillEvents.test.d.ts +0 -24
- package/build/__tests__/behavioral/faking/FakingSkillEvents.test.js +0 -174
- package/build/__tests__/behavioral/faking/UpdatePerson.test.d.ts +0 -4
- package/build/__tests__/behavioral/faking/UpdatePerson.test.js +0 -32
- package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.d.ts +0 -35
- package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.js +0 -321
- package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +0 -4
- package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +0 -48
- package/build/__tests__/behavioral/faking/WhoAmI.test.d.ts +0 -19
- package/build/__tests__/behavioral/faking/WhoAmI.test.js +0 -105
- package/build/__tests__/behavioral/maps/SpyingMapUtil.test.d.ts +0 -10
- package/build/__tests__/behavioral/maps/SpyingMapUtil.test.js +0 -76
- package/build/__tests__/behavioral/permissions/FakeAuthorizer.test.d.ts +0 -34
- package/build/__tests__/behavioral/permissions/FakeAuthorizer.test.js +0 -272
- package/build/__tests__/behavioral/permissions/PermissionFixture.test.d.ts +0 -5
- package/build/__tests__/behavioral/permissions/PermissionFixture.test.js +0 -35
- package/build/__tests__/behavioral/seeding/SeedingData.test.d.ts +0 -24
- package/build/__tests__/behavioral/seeding/SeedingData.test.js +0 -271
- package/build/__tests__/behavioral/seeding/UsingDecorators.test.d.ts +0 -37
- package/build/__tests__/behavioral/seeding/UsingDecorators.test.js +0 -266
- package/build/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.d.ts +0 -14
- package/build/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +0 -117
- package/build/__tests__/behavioral/views/FakingSkillViewControllers.test.d.ts +0 -12
- package/build/__tests__/behavioral/views/FakingSkillViewControllers.test.js +0 -55
- package/build/__tests__/behavioral/views/Routing.test.d.ts +0 -36
- package/build/__tests__/behavioral/views/Routing.test.js +0 -177
- package/build/__tests__/behavioral/views/TestingScope.test.d.ts +0 -24
- package/build/__tests__/behavioral/views/TestingScope.test.js +0 -197
- package/build/__tests__/behavioral/views/ViewPlugins.test.d.ts +0 -12
- package/build/__tests__/behavioral/views/ViewPlugins.test.js +0 -83
- package/build/__tests__/behavioral/views/WorkingWithTimezones.test.d.ts +0 -11
- package/build/__tests__/behavioral/views/WorkingWithTimezones.test.js +0 -55
- package/build/__tests__/behavioral/views/viewFixture/ViewFixture.test.d.ts +0 -118
- package/build/__tests__/behavioral/views/viewFixture/ViewFixture.test.js +0 -761
- package/build/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.d.ts +0 -5
- package/build/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.js +0 -29
- package/build/__tests__/support/AbstractFakeDecoratorTest.d.ts +0 -5
- package/build/__tests__/support/AbstractFakeDecoratorTest.js +0 -27
- package/build/__tests__/support/EventFaker.d.ts +0 -5
- package/build/__tests__/support/EventFaker.js +0 -36
- package/build/__tests__/support/FakeThemeManager.d.ts +0 -8
- package/build/__tests__/support/FakeThemeManager.js +0 -40
- package/build/__tests__/support/RandomViewPlugin.d.ts +0 -2
- package/build/__tests__/support/RandomViewPlugin.js +0 -5
- package/build/__tests__/support/RandomViewPlugin2.d.ts +0 -2
- package/build/__tests__/support/RandomViewPlugin2.js +0 -5
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/.spruce/stores/stores.d.ts +0 -5
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/.spruce/stores/stores.js +0 -9
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.d.ts +0 -51
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js +0 -33
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/src/.spruce/settings.json +0 -6
- package/build/__tests__/testDirsAndFiles/plugins1/build/.spruce/views/views.d.ts +0 -6
- package/build/__tests__/testDirsAndFiles/plugins1/build/.spruce/views/views.js +0 -11
- package/build/__tests__/testDirsAndFiles/plugins2/build/.spruce/views/views.d.ts +0 -6
- package/build/__tests__/testDirsAndFiles/plugins2/build/.spruce/views/views.js +0 -11
- package/build/__tests__/testDirsAndFiles/skill/build/.spruce/views/views.js +0 -18
- package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.d.ts +0 -5
- package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.js +0 -11
- package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.d.ts +0 -7
- package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.js +0 -19
- package/build/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.d.ts +0 -8
- package/build/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.js +0 -31
- package/build/__tests__/testDirsAndFiles/skill/package.json +0 -5
- package/build/__tests__/testDirsAndFiles/skill/src/.spruce/settings.json +0 -6
- package/build/__tests__/testDirsAndFiles/skill/src/.spruce/views/views.d.ts +0 -7
- package/build/__tests__/testDirsAndFiles/skill/src/.spruce/views/views.js +0 -17
- package/build/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.d.ts +0 -5
- package/build/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.js +0 -11
- package/build/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.d.ts +0 -8
- package/build/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.js +0 -31
- package/build/esm/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.d.ts +0 -15
- package/build/esm/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +0 -128
- package/build/esm/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +0 -40
- package/build/esm/__tests__/behavioral/DisablingSchemaValidationOnTest.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +0 -23
- package/build/esm/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +0 -80
- package/build/esm/__tests__/behavioral/FakingEventResponses.test.d.ts +0 -12
- package/build/esm/__tests__/behavioral/FakingEventResponses.test.js +0 -148
- package/build/esm/__tests__/behavioral/FixtureFactory.test.d.ts +0 -7
- package/build/esm/__tests__/behavioral/FixtureFactory.test.js +0 -61
- package/build/esm/__tests__/behavioral/LocationFixture.test.d.ts +0 -17
- package/build/esm/__tests__/behavioral/LocationFixture.test.js +0 -173
- package/build/esm/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.d.ts +0 -12
- package/build/esm/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +0 -113
- package/build/esm/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +0 -41
- package/build/esm/__tests__/behavioral/MercuryFixture.test.d.ts +0 -20
- package/build/esm/__tests__/behavioral/MercuryFixture.test.js +0 -223
- package/build/esm/__tests__/behavioral/OrganizationFixture.test.d.ts +0 -31
- package/build/esm/__tests__/behavioral/OrganizationFixture.test.js +0 -389
- package/build/esm/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +0 -18
- package/build/esm/__tests__/behavioral/PersonFixture.test.d.ts +0 -22
- package/build/esm/__tests__/behavioral/PersonFixture.test.js +0 -232
- package/build/esm/__tests__/behavioral/PhoneNumberIncrementor.test.d.ts +0 -11
- package/build/esm/__tests__/behavioral/PhoneNumberIncrementor.test.js +0 -112
- package/build/esm/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +0 -84
- package/build/esm/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +0 -55
- package/build/esm/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +0 -72
- package/build/esm/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.d.ts +0 -10
- package/build/esm/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +0 -146
- package/build/esm/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.d.ts +0 -7
- package/build/esm/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +0 -66
- package/build/esm/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.d.ts +0 -6
- package/build/esm/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +0 -51
- package/build/esm/__tests__/behavioral/RoleFixture.test.d.ts +0 -15
- package/build/esm/__tests__/behavioral/RoleFixture.test.js +0 -143
- package/build/esm/__tests__/behavioral/SkillFixture.test.d.ts +0 -13
- package/build/esm/__tests__/behavioral/SkillFixture.test.js +0 -141
- package/build/esm/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.d.ts +0 -7
- package/build/esm/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.js +0 -53
- package/build/esm/__tests__/behavioral/databases/DatabaseFixture.test.d.ts +0 -7
- package/build/esm/__tests__/behavioral/databases/DatabaseFixture.test.js +0 -48
- package/build/esm/__tests__/behavioral/databases/DbResetsAsExpected.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/databases/DbResetsAsExpected.test.js +0 -28
- package/build/esm/__tests__/behavioral/databases/DummyStore.d.ts +0 -55
- package/build/esm/__tests__/behavioral/databases/DummyStore.js +0 -43
- package/build/esm/__tests__/behavioral/databases/StoreFixture.test.d.ts +0 -23
- package/build/esm/__tests__/behavioral/databases/StoreFixture.test.js +0 -164
- package/build/esm/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.d.ts +0 -9
- package/build/esm/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +0 -89
- package/build/esm/__tests__/behavioral/faking/FakeDecorator.test.d.ts +0 -45
- package/build/esm/__tests__/behavioral/faking/FakeDecorator.test.js +0 -482
- package/build/esm/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +0 -28
- package/build/esm/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +0 -32
- package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.js +0 -82
- package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +0 -70
- package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.d.ts +0 -14
- package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +0 -165
- package/build/esm/__tests__/behavioral/faking/FakingAuthenticator.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/faking/FakingAuthenticator.test.js +0 -43
- package/build/esm/__tests__/behavioral/faking/FakingInBeforeEach.test.d.ts +0 -6
- package/build/esm/__tests__/behavioral/faking/FakingInBeforeEach.test.js +0 -55
- package/build/esm/__tests__/behavioral/faking/FakingLocations.test.d.ts +0 -6
- package/build/esm/__tests__/behavioral/faking/FakingLocations.test.js +0 -55
- package/build/esm/__tests__/behavioral/faking/FakingRoleEvents.test.d.ts +0 -19
- package/build/esm/__tests__/behavioral/faking/FakingRoleEvents.test.js +0 -175
- package/build/esm/__tests__/behavioral/faking/FakingSkillEvents.test.d.ts +0 -24
- package/build/esm/__tests__/behavioral/faking/FakingSkillEvents.test.js +0 -214
- package/build/esm/__tests__/behavioral/faking/UpdatePerson.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/faking/UpdatePerson.test.js +0 -38
- package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.d.ts +0 -35
- package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.js +0 -360
- package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +0 -31
- package/build/esm/__tests__/behavioral/faking/WhoAmI.test.d.ts +0 -19
- package/build/esm/__tests__/behavioral/faking/WhoAmI.test.js +0 -142
- package/build/esm/__tests__/behavioral/maps/SpyingMapUtil.test.d.ts +0 -10
- package/build/esm/__tests__/behavioral/maps/SpyingMapUtil.test.js +0 -94
- package/build/esm/__tests__/behavioral/permissions/FakeAuthorizer.test.d.ts +0 -34
- package/build/esm/__tests__/behavioral/permissions/FakeAuthorizer.test.js +0 -324
- package/build/esm/__tests__/behavioral/permissions/PermissionFixture.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/permissions/PermissionFixture.test.js +0 -43
- package/build/esm/__tests__/behavioral/seeding/SeedingData.test.d.ts +0 -24
- package/build/esm/__tests__/behavioral/seeding/SeedingData.test.js +0 -314
- package/build/esm/__tests__/behavioral/seeding/UsingDecorators.test.d.ts +0 -37
- package/build/esm/__tests__/behavioral/seeding/UsingDecorators.test.js +0 -322
- package/build/esm/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.d.ts +0 -14
- package/build/esm/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +0 -138
- package/build/esm/__tests__/behavioral/views/FakingSkillViewControllers.test.d.ts +0 -12
- package/build/esm/__tests__/behavioral/views/FakingSkillViewControllers.test.js +0 -70
- package/build/esm/__tests__/behavioral/views/Routing.test.d.ts +0 -36
- package/build/esm/__tests__/behavioral/views/Routing.test.js +0 -212
- package/build/esm/__tests__/behavioral/views/TestingScope.test.d.ts +0 -24
- package/build/esm/__tests__/behavioral/views/TestingScope.test.js +0 -238
- package/build/esm/__tests__/behavioral/views/ViewPlugins.test.d.ts +0 -12
- package/build/esm/__tests__/behavioral/views/ViewPlugins.test.js +0 -103
- package/build/esm/__tests__/behavioral/views/WorkingWithTimezones.test.d.ts +0 -11
- package/build/esm/__tests__/behavioral/views/WorkingWithTimezones.test.js +0 -64
- package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixture.test.d.ts +0 -118
- package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixture.test.js +0 -856
- package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.js +0 -39
- package/build/esm/__tests__/support/AbstractFakeDecoratorTest.d.ts +0 -5
- package/build/esm/__tests__/support/AbstractFakeDecoratorTest.js +0 -34
- package/build/esm/__tests__/support/EventFaker.d.ts +0 -5
- package/build/esm/__tests__/support/EventFaker.js +0 -45
- package/build/esm/__tests__/support/FakeThemeManager.d.ts +0 -8
- package/build/esm/__tests__/support/FakeThemeManager.js +0 -37
- package/build/esm/__tests__/support/RandomViewPlugin.d.ts +0 -2
- package/build/esm/__tests__/support/RandomViewPlugin.js +0 -2
- package/build/esm/__tests__/support/RandomViewPlugin2.d.ts +0 -2
- package/build/esm/__tests__/support/RandomViewPlugin2.js +0 -2
- package/build/esm/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.d.ts +0 -51
- package/build/esm/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js +0 -41
- package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.d.ts +0 -5
- package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.js +0 -9
- package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.d.ts +0 -7
- package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.js +0 -28
- package/build/esm/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.d.ts +0 -8
- package/build/esm/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.js +0 -26
- package/build/esm/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.d.ts +0 -5
- package/build/esm/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.js +0 -9
- package/build/esm/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.d.ts +0 -8
- package/build/esm/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.js +0 -26
@@ -1,32 +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 __1 = require("../../..");
|
15
|
-
const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
|
16
|
-
let UpdatePersonTest = class UpdatePersonTest extends AbstractSpruceFixtureTest_1.default {
|
17
|
-
static async badUpdateThrowsBadTarget() {
|
18
|
-
const err = await test_utils_1.assert.doesThrowAsync(() => this.fakedClient.emitAndFlattenResponses('update-person::v2020_12_25', {
|
19
|
-
target: {
|
20
|
-
personId: (0, test_utils_2.generateId)(),
|
21
|
-
},
|
22
|
-
}));
|
23
|
-
test_utils_2.errorAssert.assertError(err, 'INVALID_TARGET');
|
24
|
-
}
|
25
|
-
};
|
26
|
-
__decorate([
|
27
|
-
(0, test_utils_1.test)()
|
28
|
-
], UpdatePersonTest, "badUpdateThrowsBadTarget", null);
|
29
|
-
UpdatePersonTest = __decorate([
|
30
|
-
__1.fake.login()
|
31
|
-
], UpdatePersonTest);
|
32
|
-
exports.default = UpdatePersonTest;
|
@@ -1,35 +0,0 @@
|
|
1
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
|
2
|
-
import { CoreSeedTarget } from '../../../tests/decorators/seed';
|
3
|
-
export default class UsingFakeDecoratorsTest extends AbstractSpruceFixtureTest {
|
4
|
-
private static wasBeforeAllInvoked;
|
5
|
-
private static wasBeforeEachInvoked;
|
6
|
-
private static client;
|
7
|
-
protected static beforeAll(): Promise<void>;
|
8
|
-
protected static beforeEach(): Promise<void>;
|
9
|
-
protected static resetsFakedOwners(): Promise<void>;
|
10
|
-
protected static canGetClient(): Promise<void>;
|
11
|
-
protected static skillCallsHooks(): Promise<void>;
|
12
|
-
protected static canSeedOrganization(): Promise<void>;
|
13
|
-
protected static seedingLocationSeedsToExpectedOrg(orgIdx: number): Promise<void>;
|
14
|
-
protected static canSeedAndListLocations(orgIdx: number): Promise<void>;
|
15
|
-
protected static canSeedTeammates(target: CoreSeedTarget): Promise<void>;
|
16
|
-
protected static canSeedOwners(): Promise<void>;
|
17
|
-
protected static whoAmIReturnsExpectedPerson(): Promise<void>;
|
18
|
-
protected static canSkillBeAnonLogin(): Promise<void>;
|
19
|
-
protected static canListTeammatesByLocation(): Promise<void>;
|
20
|
-
protected static setsFakedOwners(): Promise<void>;
|
21
|
-
protected static someThingsThrowWhenNotFaked(): void;
|
22
|
-
protected static deletingOrgAndLocationDoesNotCrash(): Promise<void>;
|
23
|
-
protected static canBeUsedWithSeedDecorator(): void;
|
24
|
-
protected static canGetLocationById(idx: number): Promise<void>;
|
25
|
-
protected static throwsAsExpectedWithBadLocation(): Promise<void>;
|
26
|
-
protected static canFilterByManyRolesAtOnceWhenListingPeople(): Promise<void>;
|
27
|
-
protected static listingPeopleThrowsWhenDoingSomethingNotSupported(payload: any): Promise<void>;
|
28
|
-
protected static throwingInRequestPinDoesNotCrashNextTest(): Promise<void>;
|
29
|
-
protected static thisTestShouldNotCrashBecauseTestBeforeIt(): Promise<void>;
|
30
|
-
protected static emitGetLocationEvent(locationId: string): Promise<Pick<import("@sprucelabs/schema").SchemaStaticValues<import("@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schemas.types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<import("@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schemas.types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<import("@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schemas.types").SpruceSchemas.Spruce.v2020_07_22.LocationSchema, false>>, "id" | "address" | "phone" | "name" | "organizationId" | "timezone" | "dateCreated" | "dateDeleted" | "isPublic" | "slug" | "num">>;
|
31
|
-
protected static shouldBeAbleToOffListenersAndNotBreakEverything(): Promise<void>;
|
32
|
-
protected static thisWhoAmIShouldStillWork(): Promise<void>;
|
33
|
-
private static emitWhoAmI;
|
34
|
-
private static assertFakedPeople;
|
35
|
-
}
|
@@ -1,321 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
19
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
20
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
21
|
-
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;
|
22
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
23
|
-
};
|
24
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
25
|
-
if (mod && mod.__esModule) return mod;
|
26
|
-
var result = {};
|
27
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
28
|
-
__setModuleDefault(result, mod);
|
29
|
-
return result;
|
30
|
-
};
|
31
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
32
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
33
|
-
};
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
35
|
-
const schema_1 = require("@sprucelabs/schema");
|
36
|
-
const test_utils_1 = require("@sprucelabs/test-utils");
|
37
|
-
const test_utils_2 = require("@sprucelabs/test-utils");
|
38
|
-
const __1 = require("../../..");
|
39
|
-
const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
|
40
|
-
const fake_1 = __importStar(require("../../../tests/decorators/fake"));
|
41
|
-
const eventFaker_1 = __importDefault(require("../../../tests/eventFaker"));
|
42
|
-
const MercuryFixture_1 = __importDefault(require("../../../tests/fixtures/MercuryFixture"));
|
43
|
-
// eslint-disable-next-line spruce/prohibit-import-from-build-folder
|
44
|
-
const Good_store_1 = __importDefault(require("../../testDirsAndFiles/one-good-store-skill/build/stores/Good.store"));
|
45
|
-
const DummyStore_1 = require("../databases/DummyStore");
|
46
|
-
let UsingFakeDecoratorsTest = class UsingFakeDecoratorsTest extends AbstractSpruceFixtureTest_1.default {
|
47
|
-
static async beforeAll() {
|
48
|
-
await super.beforeAll();
|
49
|
-
this.wasBeforeAllInvoked = true;
|
50
|
-
}
|
51
|
-
static async beforeEach() {
|
52
|
-
await super.beforeEach();
|
53
|
-
this.wasBeforeEachInvoked = true;
|
54
|
-
this.client = await this.mercury.connectToApi();
|
55
|
-
await this.client.emitAndFlattenResponses('whoami::v2020_12_25');
|
56
|
-
}
|
57
|
-
static async resetsFakedOwners() {
|
58
|
-
test_utils_1.assert.isEqualDeep(this.fakedOwners, []);
|
59
|
-
}
|
60
|
-
static async canGetClient() {
|
61
|
-
test_utils_1.assert.isEqual(MercuryFixture_1.default.getDefaultClient(), fake_1.default.getClient());
|
62
|
-
test_utils_1.assert.isEqual(this.fakedPerson, fake_1.default.getPerson());
|
63
|
-
}
|
64
|
-
static async skillCallsHooks() {
|
65
|
-
test_utils_1.assert.isTrue(this.wasBeforeAllInvoked);
|
66
|
-
test_utils_1.assert.isTrue(this.wasBeforeEachInvoked);
|
67
|
-
}
|
68
|
-
static async canSeedOrganization() {
|
69
|
-
const org = await this.organizations.seedDemoOrganization({
|
70
|
-
name: 'Test org',
|
71
|
-
});
|
72
|
-
test_utils_1.assert.isEqual(org.name, 'Test org');
|
73
|
-
}
|
74
|
-
static async seedingLocationSeedsToExpectedOrg(orgIdx) {
|
75
|
-
const id = this.fakedOrganizations[orgIdx].id;
|
76
|
-
const location = await this.locations.seedDemoLocation({
|
77
|
-
name: 'Test location',
|
78
|
-
organizationId: id,
|
79
|
-
});
|
80
|
-
test_utils_1.assert.isEqual(id, location.organizationId);
|
81
|
-
}
|
82
|
-
static async canSeedAndListLocations(orgIdx) {
|
83
|
-
const id = this.fakedOrganizations[orgIdx].id;
|
84
|
-
const [{ locations }] = await this.client.emitAndFlattenResponses('list-locations::v2020_12_25', {
|
85
|
-
target: {
|
86
|
-
organizationId: id,
|
87
|
-
},
|
88
|
-
});
|
89
|
-
const expected = this.fakedLocations.filter((l) => l.organizationId === id);
|
90
|
-
test_utils_1.assert.isEqualDeep(locations, expected);
|
91
|
-
}
|
92
|
-
static async canSeedTeammates(target) {
|
93
|
-
let total = 3;
|
94
|
-
const { people, fakedRecords } = await this.assertFakedPeople(target, total);
|
95
|
-
test_utils_1.assert.doesNotInclude(people, this.fakedPerson);
|
96
|
-
test_utils_1.assert.isEqualDeep(people, fakedRecords);
|
97
|
-
}
|
98
|
-
static async canSeedOwners() {
|
99
|
-
await this.assertFakedPeople('owners', 4);
|
100
|
-
}
|
101
|
-
static async whoAmIReturnsExpectedPerson() {
|
102
|
-
const phone = (0, schema_1.formatPhoneNumber)('555-111-1111');
|
103
|
-
const { person, client } = await this.people.loginAsDemoPerson(phone);
|
104
|
-
test_utils_1.assert.isEqual(person.phone, phone);
|
105
|
-
const [{ auth }] = await client.emitAndFlattenResponses('whoami::v2020_12_25');
|
106
|
-
test_utils_1.assert.isEqualDeep(auth.person, person);
|
107
|
-
}
|
108
|
-
static async canSkillBeAnonLogin() {
|
109
|
-
const client = await this.mercury.connectToApi({
|
110
|
-
shouldReUseClient: false,
|
111
|
-
});
|
112
|
-
const [{ type }] = await client.emitAndFlattenResponses('whoami::v2020_12_25');
|
113
|
-
test_utils_1.assert.isEqualDeep(type, 'anonymous');
|
114
|
-
}
|
115
|
-
static async canListTeammatesByLocation() {
|
116
|
-
const [{ people }] = await this.client.emitAndFlattenResponses('list-people::v2020_12_25', {
|
117
|
-
target: {
|
118
|
-
organizationId: this.fakedLocations[0].organizationId,
|
119
|
-
locationId: this.fakedLocations[0].id,
|
120
|
-
},
|
121
|
-
});
|
122
|
-
test_utils_1.assert.isLength(people, 5);
|
123
|
-
}
|
124
|
-
static async setsFakedOwners() {
|
125
|
-
test_utils_1.assert.isEqual(this.fakedPerson, this.fakedOwners[0]);
|
126
|
-
}
|
127
|
-
static someThingsThrowWhenNotFaked() {
|
128
|
-
test_utils_1.assert.doesThrow(() => this.fakedLocations);
|
129
|
-
}
|
130
|
-
static async deletingOrgAndLocationDoesNotCrash() {
|
131
|
-
await this.client.emit('delete-organization::v2020_12_25', {
|
132
|
-
target: {
|
133
|
-
organizationId: '1234',
|
134
|
-
},
|
135
|
-
});
|
136
|
-
}
|
137
|
-
static canBeUsedWithSeedDecorator() { }
|
138
|
-
static async canGetLocationById(idx) {
|
139
|
-
const location = await this.emitGetLocationEvent(this.fakedLocations[idx].id);
|
140
|
-
test_utils_1.assert.isEqualDeep(location, this.fakedLocations[idx]);
|
141
|
-
}
|
142
|
-
static async throwsAsExpectedWithBadLocation() {
|
143
|
-
const err = await test_utils_1.assert.doesThrowAsync(() => this.emitGetLocationEvent((0, test_utils_2.generateId)()));
|
144
|
-
test_utils_2.errorAssert.assertError(err, 'INVALID_TARGET');
|
145
|
-
}
|
146
|
-
static async canFilterByManyRolesAtOnceWhenListingPeople() {
|
147
|
-
const [{ people }] = await this.client.emitAndFlattenResponses('list-people::v2020_12_25', {
|
148
|
-
payload: {
|
149
|
-
roleBases: ['teammate', 'manager'],
|
150
|
-
},
|
151
|
-
});
|
152
|
-
test_utils_1.assert.isLength(people, 2);
|
153
|
-
}
|
154
|
-
static async listingPeopleThrowsWhenDoingSomethingNotSupported(payload) {
|
155
|
-
await test_utils_1.assert.doesThrowAsync(() => this.client.emitAndFlattenResponses('list-people::v2020_12_25', {
|
156
|
-
payload,
|
157
|
-
}));
|
158
|
-
}
|
159
|
-
static async throwingInRequestPinDoesNotCrashNextTest() {
|
160
|
-
await eventFaker_1.default.makeEventThrow('request-pin::v2020_12_25');
|
161
|
-
}
|
162
|
-
static async thisTestShouldNotCrashBecauseTestBeforeIt() { }
|
163
|
-
static async emitGetLocationEvent(locationId) {
|
164
|
-
const [{ location }] = await this.client.emitAndFlattenResponses('get-location::v2020_12_25', {
|
165
|
-
target: {
|
166
|
-
locationId,
|
167
|
-
},
|
168
|
-
});
|
169
|
-
return location;
|
170
|
-
}
|
171
|
-
static async shouldBeAbleToOffListenersAndNotBreakEverything() {
|
172
|
-
await this.client.off('whoami::v2020_12_25');
|
173
|
-
await this.client.on('whoami::v2020_12_25', () => {
|
174
|
-
return {
|
175
|
-
auth: {},
|
176
|
-
type: 'authenticated',
|
177
|
-
};
|
178
|
-
});
|
179
|
-
const results = await this.emitWhoAmI();
|
180
|
-
test_utils_1.assert.isLength(results, 1);
|
181
|
-
}
|
182
|
-
static async thisWhoAmIShouldStillWork() {
|
183
|
-
const [{ auth }] = await this.emitWhoAmI();
|
184
|
-
const { client } = await this.views.loginAsDemoPerson();
|
185
|
-
test_utils_1.assert.isEqualDeep(DummyStore_1.DummyStore.lastFakedOwner, auth.person);
|
186
|
-
//@ts-ignore
|
187
|
-
test_utils_1.assert.isEqualDeep(auth.person, client.auth.person);
|
188
|
-
test_utils_1.assert.isEqualDeep(auth.person, this.fakedPerson);
|
189
|
-
}
|
190
|
-
static async emitWhoAmI() {
|
191
|
-
return this.client.emitAndFlattenResponses('whoami::v2020_12_25');
|
192
|
-
}
|
193
|
-
static async assertFakedPeople(target, total) {
|
194
|
-
//@ts-ignore
|
195
|
-
const fakedRecords = this[`${(0, fake_1.fakeTargetToPropName)(target)}`];
|
196
|
-
test_utils_1.assert.isLength(fakedRecords, total);
|
197
|
-
const people = await this.people.listPeople({
|
198
|
-
locationId: this.fakedLocations[0].id,
|
199
|
-
roleBases: [(0, fake_1.pluralToSingular)(target)],
|
200
|
-
organizationId: this.fakedLocations[0].organizationId,
|
201
|
-
});
|
202
|
-
test_utils_1.assert.isLength(people, total);
|
203
|
-
test_utils_1.assert.isTruthy(fakedRecords[0].firstName);
|
204
|
-
test_utils_1.assert.isNotEqual(fakedRecords[0].casualName, 'friend');
|
205
|
-
return { people, fakedRecords };
|
206
|
-
}
|
207
|
-
};
|
208
|
-
UsingFakeDecoratorsTest.wasBeforeAllInvoked = false;
|
209
|
-
UsingFakeDecoratorsTest.wasBeforeEachInvoked = false;
|
210
|
-
__decorate([
|
211
|
-
(0, __1.seed)('dummies', 1)
|
212
|
-
], UsingFakeDecoratorsTest, "beforeEach", null);
|
213
|
-
__decorate([
|
214
|
-
(0, test_utils_1.test)()
|
215
|
-
], UsingFakeDecoratorsTest, "resetsFakedOwners", null);
|
216
|
-
__decorate([
|
217
|
-
(0, test_utils_1.test)()
|
218
|
-
], UsingFakeDecoratorsTest, "canGetClient", null);
|
219
|
-
__decorate([
|
220
|
-
(0, test_utils_1.test)()
|
221
|
-
], UsingFakeDecoratorsTest, "skillCallsHooks", null);
|
222
|
-
__decorate([
|
223
|
-
(0, test_utils_1.test)()
|
224
|
-
], UsingFakeDecoratorsTest, "canSeedOrganization", null);
|
225
|
-
__decorate([
|
226
|
-
(0, test_utils_1.test)('can seed location to org 1', 0),
|
227
|
-
(0, test_utils_1.test)('can seed location to org 2', 1),
|
228
|
-
(0, __1.seed)('organizations', 2)
|
229
|
-
], UsingFakeDecoratorsTest, "seedingLocationSeedsToExpectedOrg", null);
|
230
|
-
__decorate([
|
231
|
-
(0, test_utils_1.test)('list locations by org 1', 0),
|
232
|
-
(0, test_utils_1.test)('list locations by org 0', 1),
|
233
|
-
(0, __1.seed)('organizations', 1),
|
234
|
-
(0, __1.seed)('locations', 2),
|
235
|
-
(0, __1.seed)('organizations', 1),
|
236
|
-
(0, __1.seed)('locations', 2)
|
237
|
-
], UsingFakeDecoratorsTest, "canSeedAndListLocations", null);
|
238
|
-
__decorate([
|
239
|
-
(0, test_utils_1.test)('can seed teammates', 'teammates'),
|
240
|
-
(0, test_utils_1.test)('can seed managers', 'managers'),
|
241
|
-
(0, test_utils_1.test)('can seed guests', 'guests'),
|
242
|
-
(0, test_utils_1.test)('can seed groupManagers', 'groupManagers'),
|
243
|
-
(0, __1.seed)('locations', 1),
|
244
|
-
(0, __1.seed)('teammates', 3),
|
245
|
-
(0, __1.seed)('managers', 3),
|
246
|
-
(0, __1.seed)('guests', 3),
|
247
|
-
(0, __1.seed)('groupManagers', 3)
|
248
|
-
], UsingFakeDecoratorsTest, "canSeedTeammates", null);
|
249
|
-
__decorate([
|
250
|
-
(0, test_utils_1.test)(),
|
251
|
-
(0, __1.seed)('locations', 1),
|
252
|
-
(0, __1.seed)('owners', 3)
|
253
|
-
], UsingFakeDecoratorsTest, "canSeedOwners", null);
|
254
|
-
__decorate([
|
255
|
-
(0, test_utils_1.test)(),
|
256
|
-
(0, __1.seed)('locations', 1)
|
257
|
-
], UsingFakeDecoratorsTest, "whoAmIReturnsExpectedPerson", null);
|
258
|
-
__decorate([
|
259
|
-
(0, test_utils_1.test)()
|
260
|
-
], UsingFakeDecoratorsTest, "canSkillBeAnonLogin", null);
|
261
|
-
__decorate([
|
262
|
-
(0, test_utils_1.test)(),
|
263
|
-
(0, __1.seed)('locations', 1),
|
264
|
-
(0, __1.seed)('teammates', 4)
|
265
|
-
], UsingFakeDecoratorsTest, "canListTeammatesByLocation", null);
|
266
|
-
__decorate([
|
267
|
-
(0, test_utils_1.test)(),
|
268
|
-
(0, __1.seed)('locations', 1)
|
269
|
-
], UsingFakeDecoratorsTest, "setsFakedOwners", null);
|
270
|
-
__decorate([
|
271
|
-
(0, test_utils_1.test)()
|
272
|
-
], UsingFakeDecoratorsTest, "someThingsThrowWhenNotFaked", null);
|
273
|
-
__decorate([
|
274
|
-
(0, test_utils_1.test)()
|
275
|
-
], UsingFakeDecoratorsTest, "deletingOrgAndLocationDoesNotCrash", null);
|
276
|
-
__decorate([
|
277
|
-
(0, test_utils_1.test)(),
|
278
|
-
(0, __1.seed)('good')
|
279
|
-
], UsingFakeDecoratorsTest, "canBeUsedWithSeedDecorator", null);
|
280
|
-
__decorate([
|
281
|
-
(0, test_utils_1.test)('can get location by id 1', 0),
|
282
|
-
(0, test_utils_1.test)('can get location by id 2', 1),
|
283
|
-
(0, __1.seed)('locations', 3)
|
284
|
-
], UsingFakeDecoratorsTest, "canGetLocationById", null);
|
285
|
-
__decorate([
|
286
|
-
(0, test_utils_1.test)()
|
287
|
-
], UsingFakeDecoratorsTest, "throwsAsExpectedWithBadLocation", null);
|
288
|
-
__decorate([
|
289
|
-
(0, test_utils_1.test)(),
|
290
|
-
(0, __1.seed)('locations', 1),
|
291
|
-
(0, __1.seed)('teammates', 1),
|
292
|
-
(0, __1.seed)('managers', 1)
|
293
|
-
], UsingFakeDecoratorsTest, "canFilterByManyRolesAtOnceWhenListingPeople", null);
|
294
|
-
__decorate([
|
295
|
-
(0, test_utils_1.test)('listing by people by role id throws', { roleIds: [] }),
|
296
|
-
(0, test_utils_1.test)('listing by people by person id throws', { personIds: [] })
|
297
|
-
], UsingFakeDecoratorsTest, "listingPeopleThrowsWhenDoingSomethingNotSupported", null);
|
298
|
-
__decorate([
|
299
|
-
(0, test_utils_1.test)()
|
300
|
-
], UsingFakeDecoratorsTest, "throwingInRequestPinDoesNotCrashNextTest", null);
|
301
|
-
__decorate([
|
302
|
-
(0, test_utils_1.test)()
|
303
|
-
], UsingFakeDecoratorsTest, "thisTestShouldNotCrashBecauseTestBeforeIt", null);
|
304
|
-
__decorate([
|
305
|
-
(0, test_utils_1.test)()
|
306
|
-
], UsingFakeDecoratorsTest, "shouldBeAbleToOffListenersAndNotBreakEverything", null);
|
307
|
-
__decorate([
|
308
|
-
(0, test_utils_1.test)()
|
309
|
-
], UsingFakeDecoratorsTest, "thisWhoAmIShouldStillWork", null);
|
310
|
-
UsingFakeDecoratorsTest = __decorate([
|
311
|
-
fake_1.default.login('555-000-0001')
|
312
|
-
], UsingFakeDecoratorsTest);
|
313
|
-
exports.default = UsingFakeDecoratorsTest;
|
314
|
-
DummyStore_1.DummyStore.seedCb = async () => {
|
315
|
-
var _a, _b;
|
316
|
-
fake_1.default.getPerson();
|
317
|
-
//@ts-ignore
|
318
|
-
DummyStore_1.DummyStore.lastFakedOwner = (_b = (_a = MercuryFixture_1.default.getDefaultClient()) === null || _a === void 0 ? void 0 : _a.auth) === null || _b === void 0 ? void 0 : _b.person;
|
319
|
-
};
|
320
|
-
__1.StoreFixture.setStore('good', Good_store_1.default);
|
321
|
-
__1.StoreFixture.setStore('dummies', DummyStore_1.DummyStore);
|
@@ -1,48 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
19
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
20
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
21
|
-
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;
|
22
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
23
|
-
};
|
24
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
25
|
-
if (mod && mod.__esModule) return mod;
|
26
|
-
var result = {};
|
27
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
28
|
-
__setModuleDefault(result, mod);
|
29
|
-
return result;
|
30
|
-
};
|
31
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
32
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
33
|
-
};
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
35
|
-
const test_utils_1 = __importStar(require("@sprucelabs/test-utils"));
|
36
|
-
const fake_1 = __importDefault(require("../../../tests/decorators/fake"));
|
37
|
-
let UsingFakesOnIncompatibleClassTest = class UsingFakesOnIncompatibleClassTest extends test_utils_1.default {
|
38
|
-
static async shouldNotCrash() {
|
39
|
-
test_utils_1.assert.isTrue(true);
|
40
|
-
}
|
41
|
-
};
|
42
|
-
__decorate([
|
43
|
-
(0, test_utils_1.test)()
|
44
|
-
], UsingFakesOnIncompatibleClassTest, "shouldNotCrash", null);
|
45
|
-
UsingFakesOnIncompatibleClassTest = __decorate([
|
46
|
-
fake_1.default.login()
|
47
|
-
], UsingFakesOnIncompatibleClassTest);
|
48
|
-
exports.default = UsingFakesOnIncompatibleClassTest;
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
|
2
|
-
export default class WhoAmITest extends AbstractSpruceFixtureTest {
|
3
|
-
private static auth;
|
4
|
-
private static didLoginCount;
|
5
|
-
protected static beforeEach(): Promise<void>;
|
6
|
-
protected static afterEach(): Promise<void>;
|
7
|
-
protected static afterAll(): Promise<void>;
|
8
|
-
protected static canWhoAmI(): Promise<void>;
|
9
|
-
protected static authIsResetBeforeEachSoListenersAreReset(): Promise<void>;
|
10
|
-
protected static canRegisterProxyToken(): Promise<void>;
|
11
|
-
protected static canUseProxyToEmitAsOtherPerson(): Promise<void>;
|
12
|
-
protected static canUseProxyAsSecondPerson(): Promise<void>;
|
13
|
-
private static loginAsOutsider;
|
14
|
-
private static emitWhoAmI;
|
15
|
-
private static registerOwnerProxy;
|
16
|
-
private static get client();
|
17
|
-
protected static resolveTestPath(...pathAfterTestDirsAndFiles: string[]): string;
|
18
|
-
private static emitRegister;
|
19
|
-
}
|
@@ -1,105 +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 __1 = require("../../..");
|
14
|
-
const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
|
15
|
-
let WhoAmITest = class WhoAmITest extends AbstractSpruceFixtureTest_1.default {
|
16
|
-
static async beforeEach() {
|
17
|
-
await super.beforeEach();
|
18
|
-
this.cwd = this.resolveTestPath('skill');
|
19
|
-
await this.emitRegister();
|
20
|
-
}
|
21
|
-
static async afterEach() {
|
22
|
-
await super.afterEach();
|
23
|
-
await this.emitRegister();
|
24
|
-
}
|
25
|
-
static async afterAll() {
|
26
|
-
await super.afterAll();
|
27
|
-
await this.emitRegister();
|
28
|
-
}
|
29
|
-
static async canWhoAmI() {
|
30
|
-
this.auth = this.views.getAuthenticator();
|
31
|
-
await __1.fake.getClient().emitAndFlattenResponses('whoami::v2020_12_25');
|
32
|
-
this.views
|
33
|
-
.getAuthenticator()
|
34
|
-
.addEventListener('did-login', async () => {
|
35
|
-
this.didLoginCount++;
|
36
|
-
});
|
37
|
-
}
|
38
|
-
static async authIsResetBeforeEachSoListenersAreReset() {
|
39
|
-
test_utils_1.assert.isNotEqual(this.views.getAuthenticator(), this.auth);
|
40
|
-
await __1.fake.getClient().emitAndFlattenResponses('whoami::v2020_12_25');
|
41
|
-
test_utils_1.assert.isEqual(this.didLoginCount, 0);
|
42
|
-
}
|
43
|
-
static async canRegisterProxyToken() {
|
44
|
-
const proxy = await this.registerOwnerProxy();
|
45
|
-
test_utils_1.assert.isTruthy(proxy);
|
46
|
-
const proxy2 = await this.registerOwnerProxy();
|
47
|
-
test_utils_1.assert.isNotEqual(proxy, proxy2);
|
48
|
-
}
|
49
|
-
static async canUseProxyToEmitAsOtherPerson() {
|
50
|
-
const { client } = await this.loginAsOutsider();
|
51
|
-
const proxy = await this.registerOwnerProxy();
|
52
|
-
client.setProxyToken(proxy);
|
53
|
-
const auth = await this.emitWhoAmI(client);
|
54
|
-
test_utils_1.assert.isEqualDeep(auth.person, this.fakedPerson);
|
55
|
-
}
|
56
|
-
static async canUseProxyAsSecondPerson() {
|
57
|
-
const { client, person } = await this.loginAsOutsider();
|
58
|
-
const proxy = await client.registerProxyToken();
|
59
|
-
this.client.setProxyToken(proxy);
|
60
|
-
const auth = await this.emitWhoAmI();
|
61
|
-
test_utils_1.assert.isEqualDeep(auth.person, person);
|
62
|
-
}
|
63
|
-
static async loginAsOutsider() {
|
64
|
-
const { client, person } = await this.people.loginAsDemoPerson('555-555-1234');
|
65
|
-
return { client, person };
|
66
|
-
}
|
67
|
-
static async emitWhoAmI(client) {
|
68
|
-
const [{ auth }] = await (client !== null && client !== void 0 ? client : this.client).emitAndFlattenResponses('whoami::v2020_12_25');
|
69
|
-
return auth;
|
70
|
-
}
|
71
|
-
static async registerOwnerProxy() {
|
72
|
-
return await this.client.registerProxyToken();
|
73
|
-
}
|
74
|
-
static get client() {
|
75
|
-
return __1.fake.getClient();
|
76
|
-
}
|
77
|
-
static resolveTestPath(...pathAfterTestDirsAndFiles) {
|
78
|
-
return this.resolvePath(__dirname, '..', '..', 'testDirsAndFiles', ...pathAfterTestDirsAndFiles);
|
79
|
-
}
|
80
|
-
static async emitRegister() {
|
81
|
-
await __1.fake
|
82
|
-
.getClient()
|
83
|
-
.emitAndFlattenResponses('register-proxy-token::v2020_12_25');
|
84
|
-
}
|
85
|
-
};
|
86
|
-
WhoAmITest.didLoginCount = 0;
|
87
|
-
__decorate([
|
88
|
-
(0, test_utils_1.test)()
|
89
|
-
], WhoAmITest, "canWhoAmI", null);
|
90
|
-
__decorate([
|
91
|
-
(0, test_utils_1.test)()
|
92
|
-
], WhoAmITest, "authIsResetBeforeEachSoListenersAreReset", null);
|
93
|
-
__decorate([
|
94
|
-
(0, test_utils_1.test)()
|
95
|
-
], WhoAmITest, "canRegisterProxyToken", null);
|
96
|
-
__decorate([
|
97
|
-
(0, test_utils_1.test)()
|
98
|
-
], WhoAmITest, "canUseProxyToEmitAsOtherPerson", null);
|
99
|
-
__decorate([
|
100
|
-
(0, test_utils_1.test)()
|
101
|
-
], WhoAmITest, "canUseProxyAsSecondPerson", null);
|
102
|
-
WhoAmITest = __decorate([
|
103
|
-
__1.fake.login()
|
104
|
-
], WhoAmITest);
|
105
|
-
exports.default = WhoAmITest;
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
|
2
|
-
export default class SpyingMapUtilTest extends AbstractSpruceFixtureTest {
|
3
|
-
protected static beforeEach(): Promise<void>;
|
4
|
-
protected static canCreateSpyingMapUtil(): Promise<void>;
|
5
|
-
protected static dropsIntoViewFixture(): Promise<void>;
|
6
|
-
protected static dropsSpyIntoVc(): Promise<void>;
|
7
|
-
protected static redirectingIsTracked(): Promise<void>;
|
8
|
-
protected static resetsLastOpenNavBetweenTests(): Promise<void>;
|
9
|
-
private static get maps();
|
10
|
-
}
|
@@ -1,76 +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 heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
|
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 SpyMapUtil_1 = __importDefault(require("../../../utilities/SpyMapUtil"));
|
17
|
-
class SpyCard extends heartwood_view_controllers_1.CardViewControllerImpl {
|
18
|
-
getMaps() {
|
19
|
-
return this.maps;
|
20
|
-
}
|
21
|
-
}
|
22
|
-
class SpyingMapUtilTest extends AbstractSpruceFixtureTest_1.default {
|
23
|
-
static async beforeEach() {
|
24
|
-
await super.beforeEach();
|
25
|
-
this.views = this.Fixture('view', {
|
26
|
-
controllerMap: {
|
27
|
-
spy: SpyCard,
|
28
|
-
},
|
29
|
-
});
|
30
|
-
}
|
31
|
-
static async canCreateSpyingMapUtil() {
|
32
|
-
test_utils_1.assert.isTruthy(SpyMapUtil_1.default);
|
33
|
-
}
|
34
|
-
static async dropsIntoViewFixture() {
|
35
|
-
test_utils_1.assert.isEqual(this.maps, SpyMapUtil_1.default);
|
36
|
-
}
|
37
|
-
static async dropsSpyIntoVc() {
|
38
|
-
const vc = this.views.Controller('spy', {});
|
39
|
-
test_utils_1.assert.isEqual(vc.getMaps(), this.maps);
|
40
|
-
}
|
41
|
-
static async redirectingIsTracked() {
|
42
|
-
var _a;
|
43
|
-
const address = {
|
44
|
-
city: (0, test_utils_2.generateId)(),
|
45
|
-
country: (0, test_utils_2.generateId)(),
|
46
|
-
province: (0, test_utils_2.generateId)(),
|
47
|
-
street1: (0, test_utils_2.generateId)(),
|
48
|
-
street2: (0, test_utils_2.generateId)(),
|
49
|
-
zip: (0, test_utils_2.generateId)(),
|
50
|
-
};
|
51
|
-
this.maps.openNavigation({ to: address });
|
52
|
-
test_utils_1.assert.isEqualDeep((_a = this.maps.lastOpenNavigationOptions) === null || _a === void 0 ? void 0 : _a.to, address);
|
53
|
-
}
|
54
|
-
static async resetsLastOpenNavBetweenTests() {
|
55
|
-
test_utils_1.assert.isFalsy(this.maps.lastOpenNavigationOptions);
|
56
|
-
}
|
57
|
-
static get maps() {
|
58
|
-
return this.views.getMaps();
|
59
|
-
}
|
60
|
-
}
|
61
|
-
exports.default = SpyingMapUtilTest;
|
62
|
-
__decorate([
|
63
|
-
(0, test_utils_1.test)()
|
64
|
-
], SpyingMapUtilTest, "canCreateSpyingMapUtil", null);
|
65
|
-
__decorate([
|
66
|
-
(0, test_utils_1.test)()
|
67
|
-
], SpyingMapUtilTest, "dropsIntoViewFixture", null);
|
68
|
-
__decorate([
|
69
|
-
(0, test_utils_1.test)()
|
70
|
-
], SpyingMapUtilTest, "dropsSpyIntoVc", null);
|
71
|
-
__decorate([
|
72
|
-
(0, test_utils_1.test)()
|
73
|
-
], SpyingMapUtilTest, "redirectingIsTracked", null);
|
74
|
-
__decorate([
|
75
|
-
(0, test_utils_1.test)()
|
76
|
-
], SpyingMapUtilTest, "resetsLastOpenNavBetweenTests", null);
|