@sprucelabs/spruce-test-fixtures 62.2.24 → 62.2.26
Sign up to get free protection for your applications and to get access to all the features.
- package/build/esm/index.d.ts +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/tests/fixtures/ViewFixture.d.ts +1 -1
- package/build/esm/tests/routers/TestRouter.d.ts +1 -1
- package/build/esm/tests/routers/TestRouter.js +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.js +1 -1
- package/build/tests/fixtures/ViewFixture.d.ts +1 -1
- package/build/tests/routers/TestRouter.d.ts +1 -1
- package/build/tests/routers/TestRouter.js +1 -1
- package/package.json +19 -19
- package/build/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.d.ts +0 -15
- package/build/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +0 -112
- package/build/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.d.ts +0 -4
- package/build/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +0 -34
- package/build/__tests__/behavioral/DisablingSchemaValidationOnTest.test.d.ts +0 -5
- package/build/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +0 -26
- package/build/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.d.ts +0 -8
- package/build/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +0 -69
- package/build/__tests__/behavioral/FakingEventResponses.test.d.ts +0 -12
- package/build/__tests__/behavioral/FakingEventResponses.test.js +0 -126
- package/build/__tests__/behavioral/FixtureFactory.test.d.ts +0 -7
- package/build/__tests__/behavioral/FixtureFactory.test.js +0 -79
- package/build/__tests__/behavioral/LocationFixture.test.d.ts +0 -17
- package/build/__tests__/behavioral/LocationFixture.test.js +0 -144
- package/build/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.d.ts +0 -12
- package/build/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +0 -95
- package/build/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.d.ts +0 -4
- package/build/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +0 -35
- package/build/__tests__/behavioral/MercuryFixture.test.d.ts +0 -20
- package/build/__tests__/behavioral/MercuryFixture.test.js +0 -187
- package/build/__tests__/behavioral/OrganizationFixture.test.d.ts +0 -31
- package/build/__tests__/behavioral/OrganizationFixture.test.js +0 -333
- package/build/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.d.ts +0 -4
- package/build/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +0 -21
- package/build/__tests__/behavioral/PersonFixture.test.d.ts +0 -22
- package/build/__tests__/behavioral/PersonFixture.test.js +0 -225
- package/build/__tests__/behavioral/PhoneNumberIncrementor.test.d.ts +0 -11
- package/build/__tests__/behavioral/PhoneNumberIncrementor.test.js +0 -95
- package/build/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.d.ts +0 -8
- package/build/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +0 -67
- package/build/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.d.ts +0 -5
- package/build/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +0 -44
- package/build/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.d.ts +0 -8
- package/build/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +0 -55
- package/build/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.d.ts +0 -10
- package/build/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +0 -137
- package/build/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.d.ts +0 -7
- package/build/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +0 -54
- package/build/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.d.ts +0 -6
- package/build/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +0 -40
- package/build/__tests__/behavioral/RoleFixture.test.d.ts +0 -15
- package/build/__tests__/behavioral/RoleFixture.test.js +0 -118
- package/build/__tests__/behavioral/SkillFixture.test.d.ts +0 -13
- package/build/__tests__/behavioral/SkillFixture.test.js +0 -118
- package/build/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.d.ts +0 -7
- package/build/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.js +0 -41
- package/build/__tests__/behavioral/databases/DatabaseFixture.test.d.ts +0 -7
- package/build/__tests__/behavioral/databases/DatabaseFixture.test.js +0 -59
- package/build/__tests__/behavioral/databases/DbResetsAsExpected.test.d.ts +0 -5
- package/build/__tests__/behavioral/databases/DbResetsAsExpected.test.js +0 -34
- package/build/__tests__/behavioral/databases/DummyStore.d.ts +0 -55
- package/build/__tests__/behavioral/databases/DummyStore.js +0 -36
- package/build/__tests__/behavioral/databases/StoreFixture.test.d.ts +0 -23
- package/build/__tests__/behavioral/databases/StoreFixture.test.js +0 -156
- package/build/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.d.ts +0 -9
- package/build/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +0 -73
- package/build/__tests__/behavioral/faking/FakeDecorator.test.d.ts +0 -45
- package/build/__tests__/behavioral/faking/FakeDecorator.test.js +0 -421
- package/build/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.d.ts +0 -4
- package/build/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +0 -23
- package/build/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.d.ts +0 -4
- package/build/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +0 -27
- package/build/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +0 -8
- package/build/__tests__/behavioral/faking/FakeThemeManager.test.js +0 -93
- package/build/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.d.ts +0 -8
- package/build/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +0 -56
- package/build/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.d.ts +0 -14
- package/build/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +0 -141
- package/build/__tests__/behavioral/faking/FakingAuthenticator.test.d.ts +0 -5
- package/build/__tests__/behavioral/faking/FakingAuthenticator.test.js +0 -35
- package/build/__tests__/behavioral/faking/FakingInBeforeEach.test.d.ts +0 -6
- package/build/__tests__/behavioral/faking/FakingInBeforeEach.test.js +0 -42
- package/build/__tests__/behavioral/faking/FakingLocations.test.d.ts +0 -6
- package/build/__tests__/behavioral/faking/FakingLocations.test.js +0 -45
- package/build/__tests__/behavioral/faking/FakingRoleEvents.test.d.ts +0 -19
- package/build/__tests__/behavioral/faking/FakingRoleEvents.test.js +0 -140
- package/build/__tests__/behavioral/faking/FakingSkillEvents.test.d.ts +0 -24
- package/build/__tests__/behavioral/faking/FakingSkillEvents.test.js +0 -174
- package/build/__tests__/behavioral/faking/UpdatePerson.test.d.ts +0 -4
- package/build/__tests__/behavioral/faking/UpdatePerson.test.js +0 -32
- package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.d.ts +0 -35
- package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.js +0 -321
- package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +0 -4
- package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +0 -48
- package/build/__tests__/behavioral/faking/WhoAmI.test.d.ts +0 -19
- package/build/__tests__/behavioral/faking/WhoAmI.test.js +0 -105
- package/build/__tests__/behavioral/maps/SpyingMapUtil.test.d.ts +0 -10
- package/build/__tests__/behavioral/maps/SpyingMapUtil.test.js +0 -76
- package/build/__tests__/behavioral/permissions/FakeAuthorizer.test.d.ts +0 -34
- package/build/__tests__/behavioral/permissions/FakeAuthorizer.test.js +0 -272
- package/build/__tests__/behavioral/permissions/PermissionFixture.test.d.ts +0 -5
- package/build/__tests__/behavioral/permissions/PermissionFixture.test.js +0 -35
- package/build/__tests__/behavioral/seeding/SeedingData.test.d.ts +0 -24
- package/build/__tests__/behavioral/seeding/SeedingData.test.js +0 -271
- package/build/__tests__/behavioral/seeding/UsingDecorators.test.d.ts +0 -37
- package/build/__tests__/behavioral/seeding/UsingDecorators.test.js +0 -266
- package/build/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.d.ts +0 -14
- package/build/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +0 -117
- package/build/__tests__/behavioral/views/FakingSkillViewControllers.test.d.ts +0 -12
- package/build/__tests__/behavioral/views/FakingSkillViewControllers.test.js +0 -55
- package/build/__tests__/behavioral/views/Routing.test.d.ts +0 -36
- package/build/__tests__/behavioral/views/Routing.test.js +0 -177
- package/build/__tests__/behavioral/views/TestingScope.test.d.ts +0 -24
- package/build/__tests__/behavioral/views/TestingScope.test.js +0 -197
- package/build/__tests__/behavioral/views/ViewPlugins.test.d.ts +0 -12
- package/build/__tests__/behavioral/views/ViewPlugins.test.js +0 -83
- package/build/__tests__/behavioral/views/WorkingWithTimezones.test.d.ts +0 -11
- package/build/__tests__/behavioral/views/WorkingWithTimezones.test.js +0 -55
- package/build/__tests__/behavioral/views/viewFixture/ViewFixture.test.d.ts +0 -118
- package/build/__tests__/behavioral/views/viewFixture/ViewFixture.test.js +0 -761
- package/build/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.d.ts +0 -5
- package/build/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.js +0 -29
- package/build/__tests__/support/AbstractFakeDecoratorTest.d.ts +0 -5
- package/build/__tests__/support/AbstractFakeDecoratorTest.js +0 -27
- package/build/__tests__/support/EventFaker.d.ts +0 -5
- package/build/__tests__/support/EventFaker.js +0 -36
- package/build/__tests__/support/RandomViewPlugin.d.ts +0 -2
- package/build/__tests__/support/RandomViewPlugin.js +0 -5
- package/build/__tests__/support/RandomViewPlugin2.d.ts +0 -2
- package/build/__tests__/support/RandomViewPlugin2.js +0 -5
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/.spruce/stores/stores.d.ts +0 -5
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/.spruce/stores/stores.js +0 -9
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.d.ts +0 -51
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js +0 -33
- package/build/__tests__/testDirsAndFiles/one-good-store-skill/src/.spruce/settings.json +0 -6
- package/build/__tests__/testDirsAndFiles/plugins1/build/.spruce/views/views.d.ts +0 -6
- package/build/__tests__/testDirsAndFiles/plugins1/build/.spruce/views/views.js +0 -11
- package/build/__tests__/testDirsAndFiles/plugins2/build/.spruce/views/views.d.ts +0 -6
- package/build/__tests__/testDirsAndFiles/plugins2/build/.spruce/views/views.js +0 -11
- package/build/__tests__/testDirsAndFiles/skill/build/.spruce/views/views.js +0 -18
- package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.d.ts +0 -5
- package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.js +0 -11
- package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.d.ts +0 -7
- package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.js +0 -19
- package/build/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.d.ts +0 -8
- package/build/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.js +0 -31
- package/build/__tests__/testDirsAndFiles/skill/package.json +0 -5
- package/build/__tests__/testDirsAndFiles/skill/src/.spruce/settings.json +0 -6
- package/build/__tests__/testDirsAndFiles/skill/src/.spruce/views/views.d.ts +0 -7
- package/build/__tests__/testDirsAndFiles/skill/src/.spruce/views/views.js +0 -17
- package/build/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.d.ts +0 -5
- package/build/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.js +0 -11
- package/build/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.d.ts +0 -8
- package/build/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.js +0 -31
- package/build/esm/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.d.ts +0 -15
- package/build/esm/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +0 -128
- package/build/esm/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +0 -40
- package/build/esm/__tests__/behavioral/DisablingSchemaValidationOnTest.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +0 -23
- package/build/esm/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +0 -80
- package/build/esm/__tests__/behavioral/FakingEventResponses.test.d.ts +0 -12
- package/build/esm/__tests__/behavioral/FakingEventResponses.test.js +0 -148
- package/build/esm/__tests__/behavioral/FixtureFactory.test.d.ts +0 -7
- package/build/esm/__tests__/behavioral/FixtureFactory.test.js +0 -61
- package/build/esm/__tests__/behavioral/LocationFixture.test.d.ts +0 -17
- package/build/esm/__tests__/behavioral/LocationFixture.test.js +0 -173
- package/build/esm/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.d.ts +0 -12
- package/build/esm/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +0 -113
- package/build/esm/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +0 -41
- package/build/esm/__tests__/behavioral/MercuryFixture.test.d.ts +0 -20
- package/build/esm/__tests__/behavioral/MercuryFixture.test.js +0 -223
- package/build/esm/__tests__/behavioral/OrganizationFixture.test.d.ts +0 -31
- package/build/esm/__tests__/behavioral/OrganizationFixture.test.js +0 -389
- package/build/esm/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +0 -18
- package/build/esm/__tests__/behavioral/PersonFixture.test.d.ts +0 -22
- package/build/esm/__tests__/behavioral/PersonFixture.test.js +0 -232
- package/build/esm/__tests__/behavioral/PhoneNumberIncrementor.test.d.ts +0 -11
- package/build/esm/__tests__/behavioral/PhoneNumberIncrementor.test.js +0 -112
- package/build/esm/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +0 -84
- package/build/esm/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +0 -55
- package/build/esm/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +0 -72
- package/build/esm/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.d.ts +0 -10
- package/build/esm/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +0 -146
- package/build/esm/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.d.ts +0 -7
- package/build/esm/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +0 -66
- package/build/esm/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.d.ts +0 -6
- package/build/esm/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +0 -51
- package/build/esm/__tests__/behavioral/RoleFixture.test.d.ts +0 -15
- package/build/esm/__tests__/behavioral/RoleFixture.test.js +0 -143
- package/build/esm/__tests__/behavioral/SkillFixture.test.d.ts +0 -13
- package/build/esm/__tests__/behavioral/SkillFixture.test.js +0 -141
- package/build/esm/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.d.ts +0 -7
- package/build/esm/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.js +0 -53
- package/build/esm/__tests__/behavioral/databases/DatabaseFixture.test.d.ts +0 -7
- package/build/esm/__tests__/behavioral/databases/DatabaseFixture.test.js +0 -48
- package/build/esm/__tests__/behavioral/databases/DbResetsAsExpected.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/databases/DbResetsAsExpected.test.js +0 -28
- package/build/esm/__tests__/behavioral/databases/DummyStore.d.ts +0 -55
- package/build/esm/__tests__/behavioral/databases/DummyStore.js +0 -43
- package/build/esm/__tests__/behavioral/databases/StoreFixture.test.d.ts +0 -23
- package/build/esm/__tests__/behavioral/databases/StoreFixture.test.js +0 -164
- package/build/esm/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.d.ts +0 -9
- package/build/esm/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +0 -89
- package/build/esm/__tests__/behavioral/faking/FakeDecorator.test.d.ts +0 -45
- package/build/esm/__tests__/behavioral/faking/FakeDecorator.test.js +0 -482
- package/build/esm/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +0 -28
- package/build/esm/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +0 -32
- package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.js +0 -82
- package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.d.ts +0 -8
- package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +0 -70
- package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.d.ts +0 -14
- package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +0 -165
- package/build/esm/__tests__/behavioral/faking/FakingAuthenticator.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/faking/FakingAuthenticator.test.js +0 -43
- package/build/esm/__tests__/behavioral/faking/FakingInBeforeEach.test.d.ts +0 -6
- package/build/esm/__tests__/behavioral/faking/FakingInBeforeEach.test.js +0 -55
- package/build/esm/__tests__/behavioral/faking/FakingLocations.test.d.ts +0 -6
- package/build/esm/__tests__/behavioral/faking/FakingLocations.test.js +0 -55
- package/build/esm/__tests__/behavioral/faking/FakingRoleEvents.test.d.ts +0 -19
- package/build/esm/__tests__/behavioral/faking/FakingRoleEvents.test.js +0 -175
- package/build/esm/__tests__/behavioral/faking/FakingSkillEvents.test.d.ts +0 -24
- package/build/esm/__tests__/behavioral/faking/FakingSkillEvents.test.js +0 -214
- package/build/esm/__tests__/behavioral/faking/UpdatePerson.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/faking/UpdatePerson.test.js +0 -38
- package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.d.ts +0 -35
- package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.js +0 -360
- package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +0 -4
- package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +0 -31
- package/build/esm/__tests__/behavioral/faking/WhoAmI.test.d.ts +0 -19
- package/build/esm/__tests__/behavioral/faking/WhoAmI.test.js +0 -142
- package/build/esm/__tests__/behavioral/maps/SpyingMapUtil.test.d.ts +0 -10
- package/build/esm/__tests__/behavioral/maps/SpyingMapUtil.test.js +0 -94
- package/build/esm/__tests__/behavioral/permissions/FakeAuthorizer.test.d.ts +0 -34
- package/build/esm/__tests__/behavioral/permissions/FakeAuthorizer.test.js +0 -324
- package/build/esm/__tests__/behavioral/permissions/PermissionFixture.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/permissions/PermissionFixture.test.js +0 -43
- package/build/esm/__tests__/behavioral/seeding/SeedingData.test.d.ts +0 -24
- package/build/esm/__tests__/behavioral/seeding/SeedingData.test.js +0 -314
- package/build/esm/__tests__/behavioral/seeding/UsingDecorators.test.d.ts +0 -37
- package/build/esm/__tests__/behavioral/seeding/UsingDecorators.test.js +0 -322
- package/build/esm/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.d.ts +0 -14
- package/build/esm/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +0 -138
- package/build/esm/__tests__/behavioral/views/FakingSkillViewControllers.test.d.ts +0 -12
- package/build/esm/__tests__/behavioral/views/FakingSkillViewControllers.test.js +0 -70
- package/build/esm/__tests__/behavioral/views/Routing.test.d.ts +0 -36
- package/build/esm/__tests__/behavioral/views/Routing.test.js +0 -212
- package/build/esm/__tests__/behavioral/views/TestingScope.test.d.ts +0 -24
- package/build/esm/__tests__/behavioral/views/TestingScope.test.js +0 -238
- package/build/esm/__tests__/behavioral/views/ViewPlugins.test.d.ts +0 -12
- package/build/esm/__tests__/behavioral/views/ViewPlugins.test.js +0 -103
- package/build/esm/__tests__/behavioral/views/WorkingWithTimezones.test.d.ts +0 -11
- package/build/esm/__tests__/behavioral/views/WorkingWithTimezones.test.js +0 -64
- package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixture.test.d.ts +0 -118
- package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixture.test.js +0 -856
- package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.d.ts +0 -5
- package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.js +0 -39
- package/build/esm/__tests__/support/AbstractFakeDecoratorTest.d.ts +0 -5
- package/build/esm/__tests__/support/AbstractFakeDecoratorTest.js +0 -34
- package/build/esm/__tests__/support/EventFaker.d.ts +0 -5
- package/build/esm/__tests__/support/EventFaker.js +0 -45
- package/build/esm/__tests__/support/RandomViewPlugin.d.ts +0 -2
- package/build/esm/__tests__/support/RandomViewPlugin.js +0 -2
- package/build/esm/__tests__/support/RandomViewPlugin2.d.ts +0 -2
- package/build/esm/__tests__/support/RandomViewPlugin2.js +0 -2
- package/build/esm/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.d.ts +0 -51
- package/build/esm/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js +0 -41
- package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.d.ts +0 -5
- package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.js +0 -9
- package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.d.ts +0 -7
- package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.js +0 -28
- package/build/esm/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.d.ts +0 -8
- package/build/esm/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.js +0 -26
- package/build/esm/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.d.ts +0 -5
- package/build/esm/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.js +0 -9
- package/build/esm/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.d.ts +0 -8
- package/build/esm/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.js +0 -26
- /package/build/{__tests__/support → esm/tests}/FakeThemeManager.d.ts +0 -0
- /package/build/esm/{__tests__/support → tests}/FakeThemeManager.js +0 -0
- /package/build/{esm/__tests__/support → tests}/FakeThemeManager.d.ts +0 -0
- /package/build/{__tests__/support → tests}/FakeThemeManager.js +0 -0
@@ -1,212 +0,0 @@
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
-
};
|
7
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
14
|
-
});
|
15
|
-
};
|
16
|
-
/* eslint-disable spruce/prohibit-import-from-build-folder */
|
17
|
-
import { LocaleImpl } from '@sprucelabs/calendar-utils';
|
18
|
-
import { vcAssert, } from '@sprucelabs/heartwood-view-controllers';
|
19
|
-
import { diskUtil } from '@sprucelabs/spruce-skill-utils';
|
20
|
-
import { test, assert } from '@sprucelabs/test-utils';
|
21
|
-
import { errorAssert } from '@sprucelabs/test-utils';
|
22
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest.js';
|
23
|
-
import FakeSkillViewController from '../../../tests/Fake.svc.js';
|
24
|
-
import FakeAuthorizer from '../../../tests/FakeAuthorizer.js';
|
25
|
-
import TestRouter from '../../../tests/routers/TestRouter.js';
|
26
|
-
import BookSkillViewController from '../../testDirsAndFiles/skill/build/skillViewControllers/Book.svc.js';
|
27
|
-
import SpySkillViewController from '../../testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.js';
|
28
|
-
class RoutingTest extends AbstractSpruceFixtureTest {
|
29
|
-
static beforeEach() {
|
30
|
-
const _super = Object.create(null, {
|
31
|
-
beforeEach: { get: () => super.beforeEach }
|
32
|
-
});
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
34
|
-
yield _super.beforeEach.call(this);
|
35
|
-
const fixture = this.Fixture('view', { vcDir: this.vcDir });
|
36
|
-
this.router = fixture.getRouter();
|
37
|
-
this.factory = fixture.getFactory();
|
38
|
-
});
|
39
|
-
}
|
40
|
-
static throwsWithBadDestination() {
|
41
|
-
return __awaiter(this, void 0, void 0, function* () {
|
42
|
-
const err = yield assert.doesThrowAsync(() =>
|
43
|
-
//@ts-ignore
|
44
|
-
this.assertRedirects(() => this.router.redirect('waka.waka')));
|
45
|
-
errorAssert.assertError(err, 'INVALID_VIEW_CONTROLLER_NAME', {
|
46
|
-
name: 'waka.waka',
|
47
|
-
});
|
48
|
-
});
|
49
|
-
}
|
50
|
-
static getPresentVcIsEmptyToStart() {
|
51
|
-
return __awaiter(this, void 0, void 0, function* () {
|
52
|
-
assert.isFalsy(this.router.getPresentVc());
|
53
|
-
});
|
54
|
-
}
|
55
|
-
static canRedirectToGoodSvcWithoutNamespace(id, Vc) {
|
56
|
-
return __awaiter(this, void 0, void 0, function* () {
|
57
|
-
yield this.assertRedirects(() => this.router.redirect(id, {}));
|
58
|
-
const vc = this.router.getPresentVc();
|
59
|
-
assert.isTrue(vc instanceof Vc);
|
60
|
-
});
|
61
|
-
}
|
62
|
-
static redirectTriggersLoadWithExpectedItems(args) {
|
63
|
-
return __awaiter(this, void 0, void 0, function* () {
|
64
|
-
TestRouter.setShouldLoadDestinationVc(false);
|
65
|
-
//@ts-ignore
|
66
|
-
const vc = yield this.assertRedirects(() => this.router.redirect('spruceTestFixtures.spy', args));
|
67
|
-
const lastLoad = vc.loads.pop();
|
68
|
-
assert.isFalsy(lastLoad);
|
69
|
-
});
|
70
|
-
}
|
71
|
-
static redirectByDefaultDoesNotLoadWithExpectedItems(args) {
|
72
|
-
return __awaiter(this, void 0, void 0, function* () {
|
73
|
-
//@ts-ignore
|
74
|
-
const vc = yield this.assertRedirects(() => this.router.redirect('spruceTestFixtures.spy', args));
|
75
|
-
const lastLoad = vc.loads.pop();
|
76
|
-
assert.isFalsy(lastLoad);
|
77
|
-
});
|
78
|
-
}
|
79
|
-
static canHookIntoRedirectEvents(expectedArgs) {
|
80
|
-
return __awaiter(this, void 0, void 0, function* () {
|
81
|
-
let wasHit = false;
|
82
|
-
let passedId = '';
|
83
|
-
let passedVc = null;
|
84
|
-
let passedArgs = null;
|
85
|
-
yield this.router.on('did-redirect', ({ id, vc, args }) => {
|
86
|
-
wasHit = true;
|
87
|
-
passedId = id;
|
88
|
-
passedVc = vc;
|
89
|
-
passedArgs = args;
|
90
|
-
});
|
91
|
-
yield this.assertRedirects(() => this.router.redirect('spruceTestFixtures.book', expectedArgs));
|
92
|
-
assert.isTrue(wasHit);
|
93
|
-
assert.isEqual(passedId, 'spruceTestFixtures.book');
|
94
|
-
assert.isTruthy(passedVc);
|
95
|
-
assert.isTrue(passedVc instanceof BookSkillViewController);
|
96
|
-
assert.isEqualDeep(passedArgs, expectedArgs);
|
97
|
-
});
|
98
|
-
}
|
99
|
-
static canFakeRedirectToHeartwoodRoot() {
|
100
|
-
return __awaiter(this, void 0, void 0, function* () {
|
101
|
-
const svc = yield this.assertRedirects(() => this.router.redirect('heartwood.root'));
|
102
|
-
assert.isTrue(svc instanceof FakeSkillViewController);
|
103
|
-
});
|
104
|
-
}
|
105
|
-
static canSuppressBadControllerIdOnRedirect() {
|
106
|
-
return __awaiter(this, void 0, void 0, function* () {
|
107
|
-
TestRouter.setShouldThrowWhenRedirectingToBadSvc(false);
|
108
|
-
const id = `${new Date().getTime()}.root`;
|
109
|
-
//@ts-ignore
|
110
|
-
this.factory.setController(id, null);
|
111
|
-
yield this.assertRedirects(() => this.router.redirect(id));
|
112
|
-
});
|
113
|
-
}
|
114
|
-
static shouldThrowWithBadSvcBecauseTestRouterIsReset() {
|
115
|
-
return __awaiter(this, void 0, void 0, function* () {
|
116
|
-
yield assert.doesThrowAsync(() =>
|
117
|
-
//@ts-ignore
|
118
|
-
this.router.redirect('waka.waka'));
|
119
|
-
});
|
120
|
-
}
|
121
|
-
static testRouterBuildsOptionsWithLocaleAndAuthorizer() {
|
122
|
-
const options = this.router.buildLoadOptions();
|
123
|
-
assert.isTrue(options.locale instanceof LocaleImpl);
|
124
|
-
assert.isTrue(options.authorizer instanceof FakeAuthorizer);
|
125
|
-
}
|
126
|
-
static canSetPresentVc() {
|
127
|
-
return __awaiter(this, void 0, void 0, function* () {
|
128
|
-
const vc = this.views.Controller('heartwood.root', {});
|
129
|
-
this.setPresentVc(vc);
|
130
|
-
const actual = this.router.getPresentVc();
|
131
|
-
assert.isEqual(actual, vc);
|
132
|
-
});
|
133
|
-
}
|
134
|
-
static canPullNamespaceFromPresentVc(id, namespace) {
|
135
|
-
return __awaiter(this, void 0, void 0, function* () {
|
136
|
-
this.views.setController(id, FakeSkillViewController);
|
137
|
-
const vc = this.views.Controller(id, {});
|
138
|
-
this.setPresentVc(vc);
|
139
|
-
this.assertCurrentNamespace(namespace);
|
140
|
-
});
|
141
|
-
}
|
142
|
-
static canSetNamespaceDirectly() {
|
143
|
-
return __awaiter(this, void 0, void 0, function* () {
|
144
|
-
this.router.setNamespace('forms');
|
145
|
-
this.assertCurrentNamespace('forms');
|
146
|
-
this.router.setNamespace('heartwood');
|
147
|
-
this.assertCurrentNamespace('heartwood');
|
148
|
-
});
|
149
|
-
}
|
150
|
-
static assertCurrentNamespace(namespace) {
|
151
|
-
const actual = this.router.getNamespace();
|
152
|
-
assert.isEqual(actual, namespace);
|
153
|
-
}
|
154
|
-
static setPresentVc(vc) {
|
155
|
-
this.router.setPresentVc(vc);
|
156
|
-
}
|
157
|
-
static assertRedirects(action) {
|
158
|
-
return __awaiter(this, void 0, void 0, function* () {
|
159
|
-
return vcAssert.assertActionRedirects({
|
160
|
-
action,
|
161
|
-
router: this.router,
|
162
|
-
});
|
163
|
-
});
|
164
|
-
}
|
165
|
-
}
|
166
|
-
RoutingTest.vcDir = diskUtil.resolvePath(__dirname, '..', '..', 'testDirsAndFiles', 'skill', 'build');
|
167
|
-
export default RoutingTest;
|
168
|
-
__decorate([
|
169
|
-
test()
|
170
|
-
], RoutingTest, "throwsWithBadDestination", null);
|
171
|
-
__decorate([
|
172
|
-
test()
|
173
|
-
], RoutingTest, "getPresentVcIsEmptyToStart", null);
|
174
|
-
__decorate([
|
175
|
-
test('can get book svc', 'spruceTestFixtures.book', BookSkillViewController),
|
176
|
-
test('can get spy svc', 'spruceTestFixtures.spy', SpySkillViewController)
|
177
|
-
], RoutingTest, "canRedirectToGoodSvcWithoutNamespace", null);
|
178
|
-
__decorate([
|
179
|
-
test('redirect calls load on destination vc if set 1', { hey: 'there' }),
|
180
|
-
test('redirect calls load on destination vc if set 2', { what: 'the!?' })
|
181
|
-
], RoutingTest, "redirectTriggersLoadWithExpectedItems", null);
|
182
|
-
__decorate([
|
183
|
-
test('redirect does not call load on destination vc 1', { hey: 'there' }),
|
184
|
-
test('redirect does not call load on destination vc 2', { what: 'the!?' })
|
185
|
-
], RoutingTest, "redirectByDefaultDoesNotLoadWithExpectedItems", null);
|
186
|
-
__decorate([
|
187
|
-
test('can hook into redirect no args', undefined),
|
188
|
-
test('can hook into redirect args 1', { taco: 'bell' })
|
189
|
-
], RoutingTest, "canHookIntoRedirectEvents", null);
|
190
|
-
__decorate([
|
191
|
-
test()
|
192
|
-
], RoutingTest, "canFakeRedirectToHeartwoodRoot", null);
|
193
|
-
__decorate([
|
194
|
-
test()
|
195
|
-
], RoutingTest, "canSuppressBadControllerIdOnRedirect", null);
|
196
|
-
__decorate([
|
197
|
-
test()
|
198
|
-
], RoutingTest, "shouldThrowWithBadSvcBecauseTestRouterIsReset", null);
|
199
|
-
__decorate([
|
200
|
-
test()
|
201
|
-
], RoutingTest, "testRouterBuildsOptionsWithLocaleAndAuthorizer", null);
|
202
|
-
__decorate([
|
203
|
-
test()
|
204
|
-
], RoutingTest, "canSetPresentVc", null);
|
205
|
-
__decorate([
|
206
|
-
test('can set namespace to heartwood', 'heartwood.root', 'heartwood'),
|
207
|
-
test('can set namespace to forms', 'forms.root', 'forms'),
|
208
|
-
test('can set namespace to forms.go', 'forms.go', 'forms')
|
209
|
-
], RoutingTest, "canPullNamespaceFromPresentVc", null);
|
210
|
-
__decorate([
|
211
|
-
test()
|
212
|
-
], 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,238 +0,0 @@
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
-
};
|
7
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
14
|
-
});
|
15
|
-
};
|
16
|
-
import { AbstractSkillViewController, } from '@sprucelabs/heartwood-view-controllers';
|
17
|
-
import { assert, errorAssert, test } from '@sprucelabs/test-utils';
|
18
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest.js';
|
19
|
-
import { DEMO_NUMBER_SCOPE } from '../../../tests/constants.js';
|
20
|
-
import fake from '../../../tests/decorators/fake.js';
|
21
|
-
import seed from '../../../tests/decorators/seed.js';
|
22
|
-
let TestingScopeTest = class TestingScopeTest extends AbstractSpruceFixtureTest {
|
23
|
-
static beforeEach() {
|
24
|
-
const _super = Object.create(null, {
|
25
|
-
beforeEach: { get: () => super.beforeEach }
|
26
|
-
});
|
27
|
-
return __awaiter(this, void 0, void 0, function* () {
|
28
|
-
yield _super.beforeEach.call(this);
|
29
|
-
this.views = this.Fixture('view', {
|
30
|
-
controllerMap: {
|
31
|
-
scoped: ScopedSkillViewController,
|
32
|
-
},
|
33
|
-
});
|
34
|
-
this.scope = this.views.getScope();
|
35
|
-
});
|
36
|
-
}
|
37
|
-
static canResetScope() {
|
38
|
-
return __awaiter(this, void 0, void 0, function* () {
|
39
|
-
yield this.seeder.resetAccount();
|
40
|
-
this.scope.setCurrentLocation('aoeu');
|
41
|
-
this.scope.setCurrentOrganization('aoeu');
|
42
|
-
this.scope.clearSession();
|
43
|
-
const location = yield this.scope.getCurrentLocation();
|
44
|
-
assert.isFalsy(location);
|
45
|
-
});
|
46
|
-
}
|
47
|
-
static canSetCurrentOrgToNull() {
|
48
|
-
return __awaiter(this, void 0, void 0, function* () {
|
49
|
-
this.scope.setCurrentOrganization(null);
|
50
|
-
const org = yield this.scope.getCurrentOrganization();
|
51
|
-
assert.isNull(org);
|
52
|
-
});
|
53
|
-
}
|
54
|
-
static canSetCurrentLocationToNull() {
|
55
|
-
return __awaiter(this, void 0, void 0, function* () {
|
56
|
-
this.scope.setCurrentLocation(null);
|
57
|
-
const org = yield this.organizations.getNewestOrganization();
|
58
|
-
assert.isTruthy(org);
|
59
|
-
const location = yield this.scope.getCurrentLocation();
|
60
|
-
assert.isNull(location);
|
61
|
-
});
|
62
|
-
}
|
63
|
-
static clearsLocationIdWhenSettingOrgId() {
|
64
|
-
return __awaiter(this, void 0, void 0, function* () {
|
65
|
-
this.scope.setCurrentLocation('aoeu');
|
66
|
-
this.scope.setCurrentOrganization('aoeu');
|
67
|
-
//@ts-ignore
|
68
|
-
assert.isFalsy(this.scope.currentLocationId);
|
69
|
-
});
|
70
|
-
}
|
71
|
-
static scopeFlagsCanBeSet(flags) {
|
72
|
-
return __awaiter(this, void 0, void 0, function* () {
|
73
|
-
this.setFlags(flags);
|
74
|
-
assert.isEqualDeep(this.scope.getFlags(), flags);
|
75
|
-
});
|
76
|
-
}
|
77
|
-
static noneScopeFlagsByDefault() {
|
78
|
-
return __awaiter(this, void 0, void 0, function* () {
|
79
|
-
assert.isEqualDeep(this.scope.getFlags(), ['none']);
|
80
|
-
});
|
81
|
-
}
|
82
|
-
static getCurrentLocationThrowsWhenScopedToOrg(flags) {
|
83
|
-
return __awaiter(this, void 0, void 0, function* () {
|
84
|
-
this.setFlags(flags);
|
85
|
-
const err = yield assert.doesThrowAsync(() => this.scope.getCurrentLocation());
|
86
|
-
errorAssert.assertError(err, 'INVALID_SCOPE_REQUEST', {
|
87
|
-
flags,
|
88
|
-
attemptedToGet: 'location',
|
89
|
-
});
|
90
|
-
});
|
91
|
-
}
|
92
|
-
static getCurrentOrgThrowsWhenScopedToNone() {
|
93
|
-
return __awaiter(this, void 0, void 0, function* () {
|
94
|
-
this.setFlags(['none']);
|
95
|
-
yield this.asserthInvalidScopeOnGetOrganization();
|
96
|
-
});
|
97
|
-
}
|
98
|
-
static canGetCurrentLocationWhenScopedToLocation(flags) {
|
99
|
-
return __awaiter(this, void 0, void 0, function* () {
|
100
|
-
this.setFlags(flags);
|
101
|
-
yield this.assertCurrentLocationEqualsLatest();
|
102
|
-
});
|
103
|
-
}
|
104
|
-
static canGetCurrentOrganizationWhenScopedToOrg(flags) {
|
105
|
-
return __awaiter(this, void 0, void 0, function* () {
|
106
|
-
this.setFlags(flags);
|
107
|
-
yield this.assertCurrentOrgEqualsLatest();
|
108
|
-
});
|
109
|
-
}
|
110
|
-
static loadingAVcSetsFlags(flags) {
|
111
|
-
return __awaiter(this, void 0, void 0, function* () {
|
112
|
-
ScopedSkillViewController.scopeFlags = flags;
|
113
|
-
const vc = this.views.Controller('scoped', {});
|
114
|
-
yield this.views.load(vc);
|
115
|
-
assert.isEqualDeep(this.scope.getFlags(), ScopedSkillViewController.scopeFlags);
|
116
|
-
});
|
117
|
-
}
|
118
|
-
static canDisableThrowOnInvalidScopeRequest() {
|
119
|
-
return __awaiter(this, void 0, void 0, function* () {
|
120
|
-
this.disableThrowOnRequestOutOfScope();
|
121
|
-
this.setFlags(['organization']);
|
122
|
-
yield this.assertCurrentLocationEqualsLatest();
|
123
|
-
this.setFlags(['none']);
|
124
|
-
yield this.assertCurrentOrgEqualsLatest();
|
125
|
-
});
|
126
|
-
}
|
127
|
-
static canEnableThrowsOnInvalidScopeRequest() {
|
128
|
-
return __awaiter(this, void 0, void 0, function* () {
|
129
|
-
this.disableThrowOnRequestOutOfScope();
|
130
|
-
this.scope.enableThrowOnRequestOutOfScope();
|
131
|
-
this.setFlags(['none']);
|
132
|
-
yield this.asserthInvalidScopeOnGetOrganization();
|
133
|
-
});
|
134
|
-
}
|
135
|
-
static disableThrowOnRequestOutOfScope() {
|
136
|
-
this.scope.disableThrowOnRequestOutOfScope();
|
137
|
-
}
|
138
|
-
static asserthInvalidScopeOnGetOrganization() {
|
139
|
-
return __awaiter(this, void 0, void 0, function* () {
|
140
|
-
const err = yield assert.doesThrowAsync(() => this.scope.getCurrentOrganization());
|
141
|
-
errorAssert.assertError(err, 'INVALID_SCOPE_REQUEST', {
|
142
|
-
flags: ['none'],
|
143
|
-
attemptedToGet: 'organization',
|
144
|
-
});
|
145
|
-
});
|
146
|
-
}
|
147
|
-
static assertCurrentOrgEqualsLatest() {
|
148
|
-
return __awaiter(this, void 0, void 0, function* () {
|
149
|
-
const org = yield this.scope.getCurrentOrganization();
|
150
|
-
assert.isEqualDeep(org, this.fakedOrganizations[0]);
|
151
|
-
});
|
152
|
-
}
|
153
|
-
static assertCurrentLocationEqualsLatest() {
|
154
|
-
return __awaiter(this, void 0, void 0, function* () {
|
155
|
-
const location = yield this.scope.getCurrentLocation();
|
156
|
-
assert.isEqualDeep(location, this.fakedLocations[0]);
|
157
|
-
});
|
158
|
-
}
|
159
|
-
static setFlags(flags) {
|
160
|
-
this.scope.setFlags(flags);
|
161
|
-
}
|
162
|
-
};
|
163
|
-
__decorate([
|
164
|
-
test()
|
165
|
-
], TestingScopeTest, "canResetScope", null);
|
166
|
-
__decorate([
|
167
|
-
test(),
|
168
|
-
seed('organizations', 1)
|
169
|
-
], TestingScopeTest, "canSetCurrentOrgToNull", null);
|
170
|
-
__decorate([
|
171
|
-
test(),
|
172
|
-
seed('organizations', 1),
|
173
|
-
seed('locations', 1)
|
174
|
-
], TestingScopeTest, "canSetCurrentLocationToNull", null);
|
175
|
-
__decorate([
|
176
|
-
test()
|
177
|
-
], TestingScopeTest, "clearsLocationIdWhenSettingOrgId", null);
|
178
|
-
__decorate([
|
179
|
-
test('can set flags 1', ['organization']),
|
180
|
-
test('can set flags 2', ['location']),
|
181
|
-
test('can set flags 3', ['organization', 'employed'])
|
182
|
-
], TestingScopeTest, "scopeFlagsCanBeSet", null);
|
183
|
-
__decorate([
|
184
|
-
test()
|
185
|
-
], TestingScopeTest, "noneScopeFlagsByDefault", null);
|
186
|
-
__decorate([
|
187
|
-
test('get current location throws when scoped to organization', [
|
188
|
-
'organization',
|
189
|
-
]),
|
190
|
-
test('get current location throws when scoped to none', ['none'])
|
191
|
-
], TestingScopeTest, "getCurrentLocationThrowsWhenScopedToOrg", null);
|
192
|
-
__decorate([
|
193
|
-
test()
|
194
|
-
], TestingScopeTest, "getCurrentOrgThrowsWhenScopedToNone", null);
|
195
|
-
__decorate([
|
196
|
-
test('can get lecation when scoped to location', ['location']),
|
197
|
-
test('can get lecation when scoped to location and employed', [
|
198
|
-
'employed',
|
199
|
-
'location',
|
200
|
-
]),
|
201
|
-
seed('locations', 1)
|
202
|
-
], TestingScopeTest, "canGetCurrentLocationWhenScopedToLocation", null);
|
203
|
-
__decorate([
|
204
|
-
test('can get current org when scoped to org', ['organization']),
|
205
|
-
test('can get current org when scoped to org and employed', [
|
206
|
-
'employed',
|
207
|
-
'organization',
|
208
|
-
]),
|
209
|
-
seed('organizations', 1)
|
210
|
-
], TestingScopeTest, "canGetCurrentOrganizationWhenScopedToOrg", null);
|
211
|
-
__decorate([
|
212
|
-
test('loading svc sets flags 1', ['location']),
|
213
|
-
test('loading svc sets flags 2', ['organization']),
|
214
|
-
seed('locations', 1)
|
215
|
-
], TestingScopeTest, "loadingAVcSetsFlags", null);
|
216
|
-
__decorate([
|
217
|
-
test(),
|
218
|
-
seed('locations', 1)
|
219
|
-
], TestingScopeTest, "canDisableThrowOnInvalidScopeRequest", null);
|
220
|
-
__decorate([
|
221
|
-
test(),
|
222
|
-
seed('locations', 1)
|
223
|
-
], TestingScopeTest, "canEnableThrowsOnInvalidScopeRequest", null);
|
224
|
-
TestingScopeTest = __decorate([
|
225
|
-
fake.login(DEMO_NUMBER_SCOPE)
|
226
|
-
], TestingScopeTest);
|
227
|
-
export default TestingScopeTest;
|
228
|
-
class ScopedSkillViewController extends AbstractSkillViewController {
|
229
|
-
getScope() {
|
230
|
-
return ScopedSkillViewController.scopeFlags;
|
231
|
-
}
|
232
|
-
render() {
|
233
|
-
return {
|
234
|
-
layouts: [],
|
235
|
-
};
|
236
|
-
}
|
237
|
-
}
|
238
|
-
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,103 +0,0 @@
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
-
};
|
7
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
14
|
-
});
|
15
|
-
};
|
16
|
-
import { vcPluginAssert } from '@sprucelabs/heartwood-view-controllers';
|
17
|
-
import { test, assert, generateId } from '@sprucelabs/test-utils';
|
18
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest.js';
|
19
|
-
import FixtureFactory from '../../../tests/fixtures/FixtureFactory.js';
|
20
|
-
import vcDiskUtil from '../../../utilities/vcDisk.utility.js';
|
21
|
-
import RandomViewPlugin from '../../support/RandomViewPlugin.js';
|
22
|
-
import RandomViewPlugin2 from '../../support/RandomViewPlugin2.js';
|
23
|
-
export default class ViewPluginsTest extends AbstractSpruceFixtureTest {
|
24
|
-
static beforeEach() {
|
25
|
-
const _super = Object.create(null, {
|
26
|
-
beforeEach: { get: () => super.beforeEach }
|
27
|
-
});
|
28
|
-
return __awaiter(this, void 0, void 0, function* () {
|
29
|
-
yield _super.beforeEach.call(this);
|
30
|
-
process.env.RANDOM_VALUE = generateId();
|
31
|
-
});
|
32
|
-
}
|
33
|
-
static vcAssertLoadsControllersAndMapWithPlugnsByName() {
|
34
|
-
return __awaiter(this, void 0, void 0, function* () {
|
35
|
-
const pluginsByName = yield this.loadControllersAndMap('plugins1');
|
36
|
-
assert.isTruthy(pluginsByName);
|
37
|
-
assert.isTruthy(pluginsByName.test1);
|
38
|
-
});
|
39
|
-
}
|
40
|
-
static getsPluginWithExpectedClassReference(dirName, key, Expected) {
|
41
|
-
return __awaiter(this, void 0, void 0, function* () {
|
42
|
-
const pluginsByName = yield this.loadControllersAndMap(dirName);
|
43
|
-
//@ts-ignore
|
44
|
-
assert.isEqual(pluginsByName[key], Expected);
|
45
|
-
});
|
46
|
-
}
|
47
|
-
static doesNotIncludePluginsNotExported() {
|
48
|
-
return __awaiter(this, void 0, void 0, function* () {
|
49
|
-
const pluginsByName = yield this.loadControllersAndMap('plugins1');
|
50
|
-
assert.isFalsy(pluginsByName.test2);
|
51
|
-
});
|
52
|
-
}
|
53
|
-
static passesPluginsToTheViewFactory() {
|
54
|
-
return __awaiter(this, void 0, void 0, function* () {
|
55
|
-
const vc = this.VcWithPlugins('plugins1');
|
56
|
-
vcPluginAssert.pluginIsInstalled(vc, 'test1', RandomViewPlugin);
|
57
|
-
assert.doesThrow(() => vcPluginAssert.pluginIsInstalled(vc, 'test2'));
|
58
|
-
});
|
59
|
-
}
|
60
|
-
static loadsPluginsFromDifferentDirectory() {
|
61
|
-
return __awaiter(this, void 0, void 0, function* () {
|
62
|
-
const vc = this.VcWithPlugins('plugins2');
|
63
|
-
vcPluginAssert.pluginIsInstalled(vc, 'test2', RandomViewPlugin2);
|
64
|
-
assert.doesThrow(() => vcPluginAssert.pluginIsInstalled(vc, 'test1'));
|
65
|
-
});
|
66
|
-
}
|
67
|
-
static VcWithPlugins(dirName) {
|
68
|
-
const fixture = new FixtureFactory({
|
69
|
-
cwd: this.resolvePath(this.resolvePathToTestSkill(dirName), '..'),
|
70
|
-
namespace: generateId(),
|
71
|
-
});
|
72
|
-
const views = fixture.Fixture('view');
|
73
|
-
const factory = views.getFactory();
|
74
|
-
const vc = factory.Controller('card', {});
|
75
|
-
return vc;
|
76
|
-
}
|
77
|
-
static loadControllersAndMap(dirName) {
|
78
|
-
return __awaiter(this, void 0, void 0, function* () {
|
79
|
-
const toLoad = this.resolvePathToTestSkill(dirName);
|
80
|
-
const { pluginsByName } = vcDiskUtil.loadViewControllersAndBuildMap('test', toLoad);
|
81
|
-
return pluginsByName;
|
82
|
-
});
|
83
|
-
}
|
84
|
-
static resolvePathToTestSkill(dirName) {
|
85
|
-
return this.resolvePath('build', '__tests__', 'testDirsAndFiles', dirName, 'build');
|
86
|
-
}
|
87
|
-
}
|
88
|
-
__decorate([
|
89
|
-
test()
|
90
|
-
], ViewPluginsTest, "vcAssertLoadsControllersAndMapWithPlugnsByName", null);
|
91
|
-
__decorate([
|
92
|
-
test('can load test1 plugin from plugins1', 'plugins1', 'test1', RandomViewPlugin),
|
93
|
-
test('can load test2 plugin from plugins2', 'plugins2', 'test2', RandomViewPlugin2)
|
94
|
-
], ViewPluginsTest, "getsPluginWithExpectedClassReference", null);
|
95
|
-
__decorate([
|
96
|
-
test()
|
97
|
-
], ViewPluginsTest, "doesNotIncludePluginsNotExported", null);
|
98
|
-
__decorate([
|
99
|
-
test()
|
100
|
-
], ViewPluginsTest, "passesPluginsToTheViewFactory", null);
|
101
|
-
__decorate([
|
102
|
-
test()
|
103
|
-
], 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,64 +0,0 @@
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
-
};
|
7
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
14
|
-
});
|
15
|
-
};
|
16
|
-
import { LocaleImpl } from '@sprucelabs/calendar-utils';
|
17
|
-
import { test, assert } from '@sprucelabs/test-utils';
|
18
|
-
import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest.js';
|
19
|
-
class WorkingWithTimezonesTest extends AbstractSpruceFixtureTest {
|
20
|
-
static beforeEach() {
|
21
|
-
const _super = Object.create(null, {
|
22
|
-
beforeEach: { get: () => super.beforeEach }
|
23
|
-
});
|
24
|
-
return __awaiter(this, void 0, void 0, function* () {
|
25
|
-
yield _super.beforeEach.call(this);
|
26
|
-
this.views = this.Fixture('view', { controllerMap: this.controllerMap });
|
27
|
-
});
|
28
|
-
}
|
29
|
-
static canGetInstance() {
|
30
|
-
const instance = this.getInstance();
|
31
|
-
assert.isTrue(instance instanceof LocaleImpl);
|
32
|
-
}
|
33
|
-
static instanceShared() {
|
34
|
-
assert.isEqual(this.getInstance(), this.getInstance());
|
35
|
-
}
|
36
|
-
static returnsInstanceFromRouter() {
|
37
|
-
assert.isEqual(this.views.getRouter().buildLoadOptions().locale, this.getInstance());
|
38
|
-
}
|
39
|
-
static canSetTimezoneOffset(offsetMinutes) {
|
40
|
-
this.getInstance().setTimezoneOffsetMinutes(offsetMinutes);
|
41
|
-
this.assertCurrentOffset(offsetMinutes);
|
42
|
-
}
|
43
|
-
static assertCurrentOffset(offsetMinutes) {
|
44
|
-
assert.isEqual(this.getInstance().getTimezoneOffsetMinutes(), offsetMinutes);
|
45
|
-
}
|
46
|
-
static getInstance() {
|
47
|
-
return this.views.getLocale();
|
48
|
-
}
|
49
|
-
}
|
50
|
-
WorkingWithTimezonesTest.controllerMap = {};
|
51
|
-
export default WorkingWithTimezonesTest;
|
52
|
-
__decorate([
|
53
|
-
test()
|
54
|
-
], WorkingWithTimezonesTest, "canGetInstance", null);
|
55
|
-
__decorate([
|
56
|
-
test()
|
57
|
-
], WorkingWithTimezonesTest, "instanceShared", null);
|
58
|
-
__decorate([
|
59
|
-
test()
|
60
|
-
], WorkingWithTimezonesTest, "returnsInstanceFromRouter", null);
|
61
|
-
__decorate([
|
62
|
-
test('can set offset 1', 10),
|
63
|
-
test('can set offset 2', 20)
|
64
|
-
], WorkingWithTimezonesTest, "canSetTimezoneOffset", null);
|