@sprucelabs/spruce-test-fixtures 62.2.24 → 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,177 +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
|
-
/* eslint-disable spruce/prohibit-import-from-build-folder */
|
13
|
-
const calendar_utils_1 = require("@sprucelabs/calendar-utils");
|
14
|
-
const heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
|
15
|
-
const spruce_skill_utils_1 = require("@sprucelabs/spruce-skill-utils");
|
16
|
-
const test_utils_1 = require("@sprucelabs/test-utils");
|
17
|
-
const test_utils_2 = require("@sprucelabs/test-utils");
|
18
|
-
const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
|
19
|
-
const Fake_svc_1 = __importDefault(require("../../../tests/Fake.svc"));
|
20
|
-
const FakeAuthorizer_1 = __importDefault(require("../../../tests/FakeAuthorizer"));
|
21
|
-
const TestRouter_1 = __importDefault(require("../../../tests/routers/TestRouter"));
|
22
|
-
const Book_svc_1 = __importDefault(require("../../testDirsAndFiles/skill/build/skillViewControllers/Book.svc"));
|
23
|
-
const Spy_svc_1 = __importDefault(require("../../testDirsAndFiles/skill/build/skillViewControllers/Spy.svc"));
|
24
|
-
class RoutingTest extends AbstractSpruceFixtureTest_1.default {
|
25
|
-
static async beforeEach() {
|
26
|
-
await super.beforeEach();
|
27
|
-
const fixture = this.Fixture('view', { vcDir: this.vcDir });
|
28
|
-
this.router = fixture.getRouter();
|
29
|
-
this.factory = fixture.getFactory();
|
30
|
-
}
|
31
|
-
static async throwsWithBadDestination() {
|
32
|
-
const err = await test_utils_1.assert.doesThrowAsync(() =>
|
33
|
-
//@ts-ignore
|
34
|
-
this.assertRedirects(() => this.router.redirect('waka.waka')));
|
35
|
-
test_utils_2.errorAssert.assertError(err, 'INVALID_VIEW_CONTROLLER_NAME', {
|
36
|
-
name: 'waka.waka',
|
37
|
-
});
|
38
|
-
}
|
39
|
-
static async getPresentVcIsEmptyToStart() {
|
40
|
-
test_utils_1.assert.isFalsy(this.router.getPresentVc());
|
41
|
-
}
|
42
|
-
static async canRedirectToGoodSvcWithoutNamespace(id, Vc) {
|
43
|
-
await this.assertRedirects(() => this.router.redirect(id, {}));
|
44
|
-
const vc = this.router.getPresentVc();
|
45
|
-
test_utils_1.assert.isTrue(vc instanceof Vc);
|
46
|
-
}
|
47
|
-
static async redirectTriggersLoadWithExpectedItems(args) {
|
48
|
-
TestRouter_1.default.setShouldLoadDestinationVc(false);
|
49
|
-
//@ts-ignore
|
50
|
-
const vc = await this.assertRedirects(() => this.router.redirect('spruceTestFixtures.spy', args));
|
51
|
-
const lastLoad = vc.loads.pop();
|
52
|
-
test_utils_1.assert.isFalsy(lastLoad);
|
53
|
-
}
|
54
|
-
static async redirectByDefaultDoesNotLoadWithExpectedItems(args) {
|
55
|
-
//@ts-ignore
|
56
|
-
const vc = await this.assertRedirects(() => this.router.redirect('spruceTestFixtures.spy', args));
|
57
|
-
const lastLoad = vc.loads.pop();
|
58
|
-
test_utils_1.assert.isFalsy(lastLoad);
|
59
|
-
}
|
60
|
-
static async canHookIntoRedirectEvents(expectedArgs) {
|
61
|
-
let wasHit = false;
|
62
|
-
let passedId = '';
|
63
|
-
let passedVc = null;
|
64
|
-
let passedArgs = null;
|
65
|
-
await this.router.on('did-redirect', ({ id, vc, args }) => {
|
66
|
-
wasHit = true;
|
67
|
-
passedId = id;
|
68
|
-
passedVc = vc;
|
69
|
-
passedArgs = args;
|
70
|
-
});
|
71
|
-
await this.assertRedirects(() => this.router.redirect('spruceTestFixtures.book', expectedArgs));
|
72
|
-
test_utils_1.assert.isTrue(wasHit);
|
73
|
-
test_utils_1.assert.isEqual(passedId, 'spruceTestFixtures.book');
|
74
|
-
test_utils_1.assert.isTruthy(passedVc);
|
75
|
-
test_utils_1.assert.isTrue(passedVc instanceof Book_svc_1.default);
|
76
|
-
test_utils_1.assert.isEqualDeep(passedArgs, expectedArgs);
|
77
|
-
}
|
78
|
-
static async canFakeRedirectToHeartwoodRoot() {
|
79
|
-
const svc = await this.assertRedirects(() => this.router.redirect('heartwood.root'));
|
80
|
-
test_utils_1.assert.isTrue(svc instanceof Fake_svc_1.default);
|
81
|
-
}
|
82
|
-
static async canSuppressBadControllerIdOnRedirect() {
|
83
|
-
TestRouter_1.default.setShouldThrowWhenRedirectingToBadSvc(false);
|
84
|
-
const id = `${new Date().getTime()}.root`;
|
85
|
-
//@ts-ignore
|
86
|
-
this.factory.setController(id, null);
|
87
|
-
await this.assertRedirects(() => this.router.redirect(id));
|
88
|
-
}
|
89
|
-
static async shouldThrowWithBadSvcBecauseTestRouterIsReset() {
|
90
|
-
await test_utils_1.assert.doesThrowAsync(() =>
|
91
|
-
//@ts-ignore
|
92
|
-
this.router.redirect('waka.waka'));
|
93
|
-
}
|
94
|
-
static testRouterBuildsOptionsWithLocaleAndAuthorizer() {
|
95
|
-
const options = this.router.buildLoadOptions();
|
96
|
-
test_utils_1.assert.isTrue(options.locale instanceof calendar_utils_1.LocaleImpl);
|
97
|
-
test_utils_1.assert.isTrue(options.authorizer instanceof FakeAuthorizer_1.default);
|
98
|
-
}
|
99
|
-
static async canSetPresentVc() {
|
100
|
-
const vc = this.views.Controller('heartwood.root', {});
|
101
|
-
this.setPresentVc(vc);
|
102
|
-
const actual = this.router.getPresentVc();
|
103
|
-
test_utils_1.assert.isEqual(actual, vc);
|
104
|
-
}
|
105
|
-
static async canPullNamespaceFromPresentVc(id, namespace) {
|
106
|
-
this.views.setController(id, Fake_svc_1.default);
|
107
|
-
const vc = this.views.Controller(id, {});
|
108
|
-
this.setPresentVc(vc);
|
109
|
-
this.assertCurrentNamespace(namespace);
|
110
|
-
}
|
111
|
-
static async canSetNamespaceDirectly() {
|
112
|
-
this.router.setNamespace('forms');
|
113
|
-
this.assertCurrentNamespace('forms');
|
114
|
-
this.router.setNamespace('heartwood');
|
115
|
-
this.assertCurrentNamespace('heartwood');
|
116
|
-
}
|
117
|
-
static assertCurrentNamespace(namespace) {
|
118
|
-
const actual = this.router.getNamespace();
|
119
|
-
test_utils_1.assert.isEqual(actual, namespace);
|
120
|
-
}
|
121
|
-
static setPresentVc(vc) {
|
122
|
-
this.router.setPresentVc(vc);
|
123
|
-
}
|
124
|
-
static async assertRedirects(action) {
|
125
|
-
return heartwood_view_controllers_1.vcAssert.assertActionRedirects({
|
126
|
-
action,
|
127
|
-
router: this.router,
|
128
|
-
});
|
129
|
-
}
|
130
|
-
}
|
131
|
-
RoutingTest.vcDir = spruce_skill_utils_1.diskUtil.resolvePath(__dirname, '..', '..', 'testDirsAndFiles', 'skill', 'build');
|
132
|
-
exports.default = RoutingTest;
|
133
|
-
__decorate([
|
134
|
-
(0, test_utils_1.test)()
|
135
|
-
], RoutingTest, "throwsWithBadDestination", null);
|
136
|
-
__decorate([
|
137
|
-
(0, test_utils_1.test)()
|
138
|
-
], RoutingTest, "getPresentVcIsEmptyToStart", null);
|
139
|
-
__decorate([
|
140
|
-
(0, test_utils_1.test)('can get book svc', 'spruceTestFixtures.book', Book_svc_1.default),
|
141
|
-
(0, test_utils_1.test)('can get spy svc', 'spruceTestFixtures.spy', Spy_svc_1.default)
|
142
|
-
], RoutingTest, "canRedirectToGoodSvcWithoutNamespace", null);
|
143
|
-
__decorate([
|
144
|
-
(0, test_utils_1.test)('redirect calls load on destination vc if set 1', { hey: 'there' }),
|
145
|
-
(0, test_utils_1.test)('redirect calls load on destination vc if set 2', { what: 'the!?' })
|
146
|
-
], RoutingTest, "redirectTriggersLoadWithExpectedItems", null);
|
147
|
-
__decorate([
|
148
|
-
(0, test_utils_1.test)('redirect does not call load on destination vc 1', { hey: 'there' }),
|
149
|
-
(0, test_utils_1.test)('redirect does not call load on destination vc 2', { what: 'the!?' })
|
150
|
-
], RoutingTest, "redirectByDefaultDoesNotLoadWithExpectedItems", null);
|
151
|
-
__decorate([
|
152
|
-
(0, test_utils_1.test)('can hook into redirect no args', undefined),
|
153
|
-
(0, test_utils_1.test)('can hook into redirect args 1', { taco: 'bell' })
|
154
|
-
], RoutingTest, "canHookIntoRedirectEvents", null);
|
155
|
-
__decorate([
|
156
|
-
(0, test_utils_1.test)()
|
157
|
-
], RoutingTest, "canFakeRedirectToHeartwoodRoot", null);
|
158
|
-
__decorate([
|
159
|
-
(0, test_utils_1.test)()
|
160
|
-
], RoutingTest, "canSuppressBadControllerIdOnRedirect", null);
|
161
|
-
__decorate([
|
162
|
-
(0, test_utils_1.test)()
|
163
|
-
], RoutingTest, "shouldThrowWithBadSvcBecauseTestRouterIsReset", null);
|
164
|
-
__decorate([
|
165
|
-
(0, test_utils_1.test)()
|
166
|
-
], RoutingTest, "testRouterBuildsOptionsWithLocaleAndAuthorizer", null);
|
167
|
-
__decorate([
|
168
|
-
(0, test_utils_1.test)()
|
169
|
-
], RoutingTest, "canSetPresentVc", null);
|
170
|
-
__decorate([
|
171
|
-
(0, test_utils_1.test)('can set namespace to heartwood', 'heartwood.root', 'heartwood'),
|
172
|
-
(0, test_utils_1.test)('can set namespace to forms', 'forms.root', 'forms'),
|
173
|
-
(0, test_utils_1.test)('can set namespace to forms.go', 'forms.go', 'forms')
|
174
|
-
], RoutingTest, "canPullNamespaceFromPresentVc", null);
|
175
|
-
__decorate([
|
176
|
-
(0, test_utils_1.test)()
|
177
|
-
], RoutingTest, "canSetNamespaceDirectly", null);
|
@@ -1,24 +0,0 @@
|
|
1
|
-
import { ScopeFlag } from '@sprucelabs/heartwood-view-controllers';
|
2
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
|
3
|
-
export default class TestingScopeTest extends AbstractSpruceFixtureTest {
|
4
|
-
private static scope;
|
5
|
-
protected static beforeEach(): Promise<void>;
|
6
|
-
protected static canResetScope(): Promise<void>;
|
7
|
-
protected static canSetCurrentOrgToNull(): Promise<void>;
|
8
|
-
protected static canSetCurrentLocationToNull(): Promise<void>;
|
9
|
-
protected static clearsLocationIdWhenSettingOrgId(): Promise<void>;
|
10
|
-
protected static scopeFlagsCanBeSet(flags: ScopeFlag[]): Promise<void>;
|
11
|
-
protected static noneScopeFlagsByDefault(): Promise<void>;
|
12
|
-
protected static getCurrentLocationThrowsWhenScopedToOrg(flags: ScopeFlag[]): Promise<void>;
|
13
|
-
protected static getCurrentOrgThrowsWhenScopedToNone(): Promise<void>;
|
14
|
-
protected static canGetCurrentLocationWhenScopedToLocation(flags: ScopeFlag[]): Promise<void>;
|
15
|
-
protected static canGetCurrentOrganizationWhenScopedToOrg(flags: ScopeFlag[]): Promise<void>;
|
16
|
-
protected static loadingAVcSetsFlags(flags: ScopeFlag[]): Promise<void>;
|
17
|
-
protected static canDisableThrowOnInvalidScopeRequest(): Promise<void>;
|
18
|
-
protected static canEnableThrowsOnInvalidScopeRequest(): Promise<void>;
|
19
|
-
private static disableThrowOnRequestOutOfScope;
|
20
|
-
private static asserthInvalidScopeOnGetOrganization;
|
21
|
-
private static assertCurrentOrgEqualsLatest;
|
22
|
-
private static assertCurrentLocationEqualsLatest;
|
23
|
-
private static setFlags;
|
24
|
-
}
|
@@ -1,197 +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 AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
|
15
|
-
const constants_1 = require("../../../tests/constants");
|
16
|
-
const fake_1 = __importDefault(require("../../../tests/decorators/fake"));
|
17
|
-
const seed_1 = __importDefault(require("../../../tests/decorators/seed"));
|
18
|
-
let TestingScopeTest = class TestingScopeTest extends AbstractSpruceFixtureTest_1.default {
|
19
|
-
static async beforeEach() {
|
20
|
-
await super.beforeEach();
|
21
|
-
this.views = this.Fixture('view', {
|
22
|
-
controllerMap: {
|
23
|
-
scoped: ScopedSkillViewController,
|
24
|
-
},
|
25
|
-
});
|
26
|
-
this.scope = this.views.getScope();
|
27
|
-
}
|
28
|
-
static async canResetScope() {
|
29
|
-
await this.seeder.resetAccount();
|
30
|
-
this.scope.setCurrentLocation('aoeu');
|
31
|
-
this.scope.setCurrentOrganization('aoeu');
|
32
|
-
this.scope.clearSession();
|
33
|
-
const location = await this.scope.getCurrentLocation();
|
34
|
-
test_utils_1.assert.isFalsy(location);
|
35
|
-
}
|
36
|
-
static async canSetCurrentOrgToNull() {
|
37
|
-
this.scope.setCurrentOrganization(null);
|
38
|
-
const org = await this.scope.getCurrentOrganization();
|
39
|
-
test_utils_1.assert.isNull(org);
|
40
|
-
}
|
41
|
-
static async canSetCurrentLocationToNull() {
|
42
|
-
this.scope.setCurrentLocation(null);
|
43
|
-
const org = await this.organizations.getNewestOrganization();
|
44
|
-
test_utils_1.assert.isTruthy(org);
|
45
|
-
const location = await this.scope.getCurrentLocation();
|
46
|
-
test_utils_1.assert.isNull(location);
|
47
|
-
}
|
48
|
-
static async clearsLocationIdWhenSettingOrgId() {
|
49
|
-
this.scope.setCurrentLocation('aoeu');
|
50
|
-
this.scope.setCurrentOrganization('aoeu');
|
51
|
-
//@ts-ignore
|
52
|
-
test_utils_1.assert.isFalsy(this.scope.currentLocationId);
|
53
|
-
}
|
54
|
-
static async scopeFlagsCanBeSet(flags) {
|
55
|
-
this.setFlags(flags);
|
56
|
-
test_utils_1.assert.isEqualDeep(this.scope.getFlags(), flags);
|
57
|
-
}
|
58
|
-
static async noneScopeFlagsByDefault() {
|
59
|
-
test_utils_1.assert.isEqualDeep(this.scope.getFlags(), ['none']);
|
60
|
-
}
|
61
|
-
static async getCurrentLocationThrowsWhenScopedToOrg(flags) {
|
62
|
-
this.setFlags(flags);
|
63
|
-
const err = await test_utils_1.assert.doesThrowAsync(() => this.scope.getCurrentLocation());
|
64
|
-
test_utils_1.errorAssert.assertError(err, 'INVALID_SCOPE_REQUEST', {
|
65
|
-
flags,
|
66
|
-
attemptedToGet: 'location',
|
67
|
-
});
|
68
|
-
}
|
69
|
-
static async getCurrentOrgThrowsWhenScopedToNone() {
|
70
|
-
this.setFlags(['none']);
|
71
|
-
await this.asserthInvalidScopeOnGetOrganization();
|
72
|
-
}
|
73
|
-
static async canGetCurrentLocationWhenScopedToLocation(flags) {
|
74
|
-
this.setFlags(flags);
|
75
|
-
await this.assertCurrentLocationEqualsLatest();
|
76
|
-
}
|
77
|
-
static async canGetCurrentOrganizationWhenScopedToOrg(flags) {
|
78
|
-
this.setFlags(flags);
|
79
|
-
await this.assertCurrentOrgEqualsLatest();
|
80
|
-
}
|
81
|
-
static async loadingAVcSetsFlags(flags) {
|
82
|
-
ScopedSkillViewController.scopeFlags = flags;
|
83
|
-
const vc = this.views.Controller('scoped', {});
|
84
|
-
await this.views.load(vc);
|
85
|
-
test_utils_1.assert.isEqualDeep(this.scope.getFlags(), ScopedSkillViewController.scopeFlags);
|
86
|
-
}
|
87
|
-
static async canDisableThrowOnInvalidScopeRequest() {
|
88
|
-
this.disableThrowOnRequestOutOfScope();
|
89
|
-
this.setFlags(['organization']);
|
90
|
-
await this.assertCurrentLocationEqualsLatest();
|
91
|
-
this.setFlags(['none']);
|
92
|
-
await this.assertCurrentOrgEqualsLatest();
|
93
|
-
}
|
94
|
-
static async canEnableThrowsOnInvalidScopeRequest() {
|
95
|
-
this.disableThrowOnRequestOutOfScope();
|
96
|
-
this.scope.enableThrowOnRequestOutOfScope();
|
97
|
-
this.setFlags(['none']);
|
98
|
-
await this.asserthInvalidScopeOnGetOrganization();
|
99
|
-
}
|
100
|
-
static disableThrowOnRequestOutOfScope() {
|
101
|
-
this.scope.disableThrowOnRequestOutOfScope();
|
102
|
-
}
|
103
|
-
static async asserthInvalidScopeOnGetOrganization() {
|
104
|
-
const err = await test_utils_1.assert.doesThrowAsync(() => this.scope.getCurrentOrganization());
|
105
|
-
test_utils_1.errorAssert.assertError(err, 'INVALID_SCOPE_REQUEST', {
|
106
|
-
flags: ['none'],
|
107
|
-
attemptedToGet: 'organization',
|
108
|
-
});
|
109
|
-
}
|
110
|
-
static async assertCurrentOrgEqualsLatest() {
|
111
|
-
const org = await this.scope.getCurrentOrganization();
|
112
|
-
test_utils_1.assert.isEqualDeep(org, this.fakedOrganizations[0]);
|
113
|
-
}
|
114
|
-
static async assertCurrentLocationEqualsLatest() {
|
115
|
-
const location = await this.scope.getCurrentLocation();
|
116
|
-
test_utils_1.assert.isEqualDeep(location, this.fakedLocations[0]);
|
117
|
-
}
|
118
|
-
static setFlags(flags) {
|
119
|
-
this.scope.setFlags(flags);
|
120
|
-
}
|
121
|
-
};
|
122
|
-
__decorate([
|
123
|
-
(0, test_utils_1.test)()
|
124
|
-
], TestingScopeTest, "canResetScope", null);
|
125
|
-
__decorate([
|
126
|
-
(0, test_utils_1.test)(),
|
127
|
-
(0, seed_1.default)('organizations', 1)
|
128
|
-
], TestingScopeTest, "canSetCurrentOrgToNull", null);
|
129
|
-
__decorate([
|
130
|
-
(0, test_utils_1.test)(),
|
131
|
-
(0, seed_1.default)('organizations', 1),
|
132
|
-
(0, seed_1.default)('locations', 1)
|
133
|
-
], TestingScopeTest, "canSetCurrentLocationToNull", null);
|
134
|
-
__decorate([
|
135
|
-
(0, test_utils_1.test)()
|
136
|
-
], TestingScopeTest, "clearsLocationIdWhenSettingOrgId", null);
|
137
|
-
__decorate([
|
138
|
-
(0, test_utils_1.test)('can set flags 1', ['organization']),
|
139
|
-
(0, test_utils_1.test)('can set flags 2', ['location']),
|
140
|
-
(0, test_utils_1.test)('can set flags 3', ['organization', 'employed'])
|
141
|
-
], TestingScopeTest, "scopeFlagsCanBeSet", null);
|
142
|
-
__decorate([
|
143
|
-
(0, test_utils_1.test)()
|
144
|
-
], TestingScopeTest, "noneScopeFlagsByDefault", null);
|
145
|
-
__decorate([
|
146
|
-
(0, test_utils_1.test)('get current location throws when scoped to organization', [
|
147
|
-
'organization',
|
148
|
-
]),
|
149
|
-
(0, test_utils_1.test)('get current location throws when scoped to none', ['none'])
|
150
|
-
], TestingScopeTest, "getCurrentLocationThrowsWhenScopedToOrg", null);
|
151
|
-
__decorate([
|
152
|
-
(0, test_utils_1.test)()
|
153
|
-
], TestingScopeTest, "getCurrentOrgThrowsWhenScopedToNone", null);
|
154
|
-
__decorate([
|
155
|
-
(0, test_utils_1.test)('can get lecation when scoped to location', ['location']),
|
156
|
-
(0, test_utils_1.test)('can get lecation when scoped to location and employed', [
|
157
|
-
'employed',
|
158
|
-
'location',
|
159
|
-
]),
|
160
|
-
(0, seed_1.default)('locations', 1)
|
161
|
-
], TestingScopeTest, "canGetCurrentLocationWhenScopedToLocation", null);
|
162
|
-
__decorate([
|
163
|
-
(0, test_utils_1.test)('can get current org when scoped to org', ['organization']),
|
164
|
-
(0, test_utils_1.test)('can get current org when scoped to org and employed', [
|
165
|
-
'employed',
|
166
|
-
'organization',
|
167
|
-
]),
|
168
|
-
(0, seed_1.default)('organizations', 1)
|
169
|
-
], TestingScopeTest, "canGetCurrentOrganizationWhenScopedToOrg", null);
|
170
|
-
__decorate([
|
171
|
-
(0, test_utils_1.test)('loading svc sets flags 1', ['location']),
|
172
|
-
(0, test_utils_1.test)('loading svc sets flags 2', ['organization']),
|
173
|
-
(0, seed_1.default)('locations', 1)
|
174
|
-
], TestingScopeTest, "loadingAVcSetsFlags", null);
|
175
|
-
__decorate([
|
176
|
-
(0, test_utils_1.test)(),
|
177
|
-
(0, seed_1.default)('locations', 1)
|
178
|
-
], TestingScopeTest, "canDisableThrowOnInvalidScopeRequest", null);
|
179
|
-
__decorate([
|
180
|
-
(0, test_utils_1.test)(),
|
181
|
-
(0, seed_1.default)('locations', 1)
|
182
|
-
], TestingScopeTest, "canEnableThrowsOnInvalidScopeRequest", null);
|
183
|
-
TestingScopeTest = __decorate([
|
184
|
-
fake_1.default.login(constants_1.DEMO_NUMBER_SCOPE)
|
185
|
-
], TestingScopeTest);
|
186
|
-
exports.default = TestingScopeTest;
|
187
|
-
class ScopedSkillViewController extends heartwood_view_controllers_1.AbstractSkillViewController {
|
188
|
-
getScope() {
|
189
|
-
return ScopedSkillViewController.scopeFlags;
|
190
|
-
}
|
191
|
-
render() {
|
192
|
-
return {
|
193
|
-
layouts: [],
|
194
|
-
};
|
195
|
-
}
|
196
|
-
}
|
197
|
-
ScopedSkillViewController.scopeFlags = [];
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
|
2
|
-
export default class ViewPluginsTest extends AbstractSpruceFixtureTest {
|
3
|
-
protected static beforeEach(): Promise<void>;
|
4
|
-
protected static vcAssertLoadsControllersAndMapWithPlugnsByName(): Promise<void>;
|
5
|
-
protected static getsPluginWithExpectedClassReference(dirName: string, key: string, Expected: any): Promise<void>;
|
6
|
-
protected static doesNotIncludePluginsNotExported(): Promise<void>;
|
7
|
-
protected static passesPluginsToTheViewFactory(): Promise<void>;
|
8
|
-
protected static loadsPluginsFromDifferentDirectory(): Promise<void>;
|
9
|
-
private static VcWithPlugins;
|
10
|
-
private static loadControllersAndMap;
|
11
|
-
private static resolvePathToTestSkill;
|
12
|
-
}
|
@@ -1,83 +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 AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
|
15
|
-
const FixtureFactory_1 = __importDefault(require("../../../tests/fixtures/FixtureFactory"));
|
16
|
-
const vcDisk_utility_1 = __importDefault(require("../../../utilities/vcDisk.utility"));
|
17
|
-
const RandomViewPlugin_1 = __importDefault(require("../../support/RandomViewPlugin"));
|
18
|
-
const RandomViewPlugin2_1 = __importDefault(require("../../support/RandomViewPlugin2"));
|
19
|
-
class ViewPluginsTest extends AbstractSpruceFixtureTest_1.default {
|
20
|
-
static async beforeEach() {
|
21
|
-
await super.beforeEach();
|
22
|
-
process.env.RANDOM_VALUE = (0, test_utils_1.generateId)();
|
23
|
-
}
|
24
|
-
static async vcAssertLoadsControllersAndMapWithPlugnsByName() {
|
25
|
-
const pluginsByName = await this.loadControllersAndMap('plugins1');
|
26
|
-
test_utils_1.assert.isTruthy(pluginsByName);
|
27
|
-
test_utils_1.assert.isTruthy(pluginsByName.test1);
|
28
|
-
}
|
29
|
-
static async getsPluginWithExpectedClassReference(dirName, key, Expected) {
|
30
|
-
const pluginsByName = await this.loadControllersAndMap(dirName);
|
31
|
-
//@ts-ignore
|
32
|
-
test_utils_1.assert.isEqual(pluginsByName[key], Expected);
|
33
|
-
}
|
34
|
-
static async doesNotIncludePluginsNotExported() {
|
35
|
-
const pluginsByName = await this.loadControllersAndMap('plugins1');
|
36
|
-
test_utils_1.assert.isFalsy(pluginsByName.test2);
|
37
|
-
}
|
38
|
-
static async passesPluginsToTheViewFactory() {
|
39
|
-
const vc = this.VcWithPlugins('plugins1');
|
40
|
-
heartwood_view_controllers_1.vcPluginAssert.pluginIsInstalled(vc, 'test1', RandomViewPlugin_1.default);
|
41
|
-
test_utils_1.assert.doesThrow(() => heartwood_view_controllers_1.vcPluginAssert.pluginIsInstalled(vc, 'test2'));
|
42
|
-
}
|
43
|
-
static async loadsPluginsFromDifferentDirectory() {
|
44
|
-
const vc = this.VcWithPlugins('plugins2');
|
45
|
-
heartwood_view_controllers_1.vcPluginAssert.pluginIsInstalled(vc, 'test2', RandomViewPlugin2_1.default);
|
46
|
-
test_utils_1.assert.doesThrow(() => heartwood_view_controllers_1.vcPluginAssert.pluginIsInstalled(vc, 'test1'));
|
47
|
-
}
|
48
|
-
static VcWithPlugins(dirName) {
|
49
|
-
const fixture = new FixtureFactory_1.default({
|
50
|
-
cwd: this.resolvePath(this.resolvePathToTestSkill(dirName), '..'),
|
51
|
-
namespace: (0, test_utils_1.generateId)(),
|
52
|
-
});
|
53
|
-
const views = fixture.Fixture('view');
|
54
|
-
const factory = views.getFactory();
|
55
|
-
const vc = factory.Controller('card', {});
|
56
|
-
return vc;
|
57
|
-
}
|
58
|
-
static async loadControllersAndMap(dirName) {
|
59
|
-
const toLoad = this.resolvePathToTestSkill(dirName);
|
60
|
-
const { pluginsByName } = vcDisk_utility_1.default.loadViewControllersAndBuildMap('test', toLoad);
|
61
|
-
return pluginsByName;
|
62
|
-
}
|
63
|
-
static resolvePathToTestSkill(dirName) {
|
64
|
-
return this.resolvePath('build', '__tests__', 'testDirsAndFiles', dirName, 'build');
|
65
|
-
}
|
66
|
-
}
|
67
|
-
exports.default = ViewPluginsTest;
|
68
|
-
__decorate([
|
69
|
-
(0, test_utils_1.test)()
|
70
|
-
], ViewPluginsTest, "vcAssertLoadsControllersAndMapWithPlugnsByName", null);
|
71
|
-
__decorate([
|
72
|
-
(0, test_utils_1.test)('can load test1 plugin from plugins1', 'plugins1', 'test1', RandomViewPlugin_1.default),
|
73
|
-
(0, test_utils_1.test)('can load test2 plugin from plugins2', 'plugins2', 'test2', RandomViewPlugin2_1.default)
|
74
|
-
], ViewPluginsTest, "getsPluginWithExpectedClassReference", null);
|
75
|
-
__decorate([
|
76
|
-
(0, test_utils_1.test)()
|
77
|
-
], ViewPluginsTest, "doesNotIncludePluginsNotExported", null);
|
78
|
-
__decorate([
|
79
|
-
(0, test_utils_1.test)()
|
80
|
-
], ViewPluginsTest, "passesPluginsToTheViewFactory", null);
|
81
|
-
__decorate([
|
82
|
-
(0, test_utils_1.test)()
|
83
|
-
], ViewPluginsTest, "loadsPluginsFromDifferentDirectory", null);
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
|
2
|
-
export default class WorkingWithTimezonesTest extends AbstractSpruceFixtureTest {
|
3
|
-
static controllerMap: {};
|
4
|
-
protected static beforeEach(): Promise<void>;
|
5
|
-
protected static canGetInstance(): void;
|
6
|
-
protected static instanceShared(): void;
|
7
|
-
protected static returnsInstanceFromRouter(): void;
|
8
|
-
protected static canSetTimezoneOffset(offsetMinutes: number): void;
|
9
|
-
private static assertCurrentOffset;
|
10
|
-
private static getInstance;
|
11
|
-
}
|
@@ -1,55 +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 calendar_utils_1 = require("@sprucelabs/calendar-utils");
|
13
|
-
const test_utils_1 = require("@sprucelabs/test-utils");
|
14
|
-
const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
|
15
|
-
class WorkingWithTimezonesTest extends AbstractSpruceFixtureTest_1.default {
|
16
|
-
static async beforeEach() {
|
17
|
-
await super.beforeEach();
|
18
|
-
this.views = this.Fixture('view', { controllerMap: this.controllerMap });
|
19
|
-
}
|
20
|
-
static canGetInstance() {
|
21
|
-
const instance = this.getInstance();
|
22
|
-
test_utils_1.assert.isTrue(instance instanceof calendar_utils_1.LocaleImpl);
|
23
|
-
}
|
24
|
-
static instanceShared() {
|
25
|
-
test_utils_1.assert.isEqual(this.getInstance(), this.getInstance());
|
26
|
-
}
|
27
|
-
static returnsInstanceFromRouter() {
|
28
|
-
test_utils_1.assert.isEqual(this.views.getRouter().buildLoadOptions().locale, this.getInstance());
|
29
|
-
}
|
30
|
-
static canSetTimezoneOffset(offsetMinutes) {
|
31
|
-
this.getInstance().setTimezoneOffsetMinutes(offsetMinutes);
|
32
|
-
this.assertCurrentOffset(offsetMinutes);
|
33
|
-
}
|
34
|
-
static assertCurrentOffset(offsetMinutes) {
|
35
|
-
test_utils_1.assert.isEqual(this.getInstance().getTimezoneOffsetMinutes(), offsetMinutes);
|
36
|
-
}
|
37
|
-
static getInstance() {
|
38
|
-
return this.views.getLocale();
|
39
|
-
}
|
40
|
-
}
|
41
|
-
WorkingWithTimezonesTest.controllerMap = {};
|
42
|
-
exports.default = WorkingWithTimezonesTest;
|
43
|
-
__decorate([
|
44
|
-
(0, test_utils_1.test)()
|
45
|
-
], WorkingWithTimezonesTest, "canGetInstance", null);
|
46
|
-
__decorate([
|
47
|
-
(0, test_utils_1.test)()
|
48
|
-
], WorkingWithTimezonesTest, "instanceShared", null);
|
49
|
-
__decorate([
|
50
|
-
(0, test_utils_1.test)()
|
51
|
-
], WorkingWithTimezonesTest, "returnsInstanceFromRouter", null);
|
52
|
-
__decorate([
|
53
|
-
(0, test_utils_1.test)('can set offset 1', 10),
|
54
|
-
(0, test_utils_1.test)('can set offset 2', 20)
|
55
|
-
], WorkingWithTimezonesTest, "canSetTimezoneOffset", null);
|