@sprucelabs/spruce-test-fixtures 62.2.24 → 62.2.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. package/build/esm/index.d.ts +1 -1
  2. package/build/esm/index.js +1 -1
  3. package/build/esm/tests/fixtures/ViewFixture.d.ts +1 -1
  4. package/build/esm/tests/routers/TestRouter.d.ts +1 -1
  5. package/build/esm/tests/routers/TestRouter.js +1 -1
  6. package/build/index.d.ts +1 -1
  7. package/build/index.js +1 -1
  8. package/build/tests/fixtures/ViewFixture.d.ts +1 -1
  9. package/build/tests/routers/TestRouter.d.ts +1 -1
  10. package/build/tests/routers/TestRouter.js +1 -1
  11. package/package.json +19 -19
  12. package/build/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.d.ts +0 -15
  13. package/build/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +0 -112
  14. package/build/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.d.ts +0 -4
  15. package/build/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +0 -34
  16. package/build/__tests__/behavioral/DisablingSchemaValidationOnTest.test.d.ts +0 -5
  17. package/build/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +0 -26
  18. package/build/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.d.ts +0 -8
  19. package/build/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +0 -69
  20. package/build/__tests__/behavioral/FakingEventResponses.test.d.ts +0 -12
  21. package/build/__tests__/behavioral/FakingEventResponses.test.js +0 -126
  22. package/build/__tests__/behavioral/FixtureFactory.test.d.ts +0 -7
  23. package/build/__tests__/behavioral/FixtureFactory.test.js +0 -79
  24. package/build/__tests__/behavioral/LocationFixture.test.d.ts +0 -17
  25. package/build/__tests__/behavioral/LocationFixture.test.js +0 -144
  26. package/build/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.d.ts +0 -12
  27. package/build/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +0 -95
  28. package/build/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.d.ts +0 -4
  29. package/build/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +0 -35
  30. package/build/__tests__/behavioral/MercuryFixture.test.d.ts +0 -20
  31. package/build/__tests__/behavioral/MercuryFixture.test.js +0 -187
  32. package/build/__tests__/behavioral/OrganizationFixture.test.d.ts +0 -31
  33. package/build/__tests__/behavioral/OrganizationFixture.test.js +0 -333
  34. package/build/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.d.ts +0 -4
  35. package/build/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +0 -21
  36. package/build/__tests__/behavioral/PersonFixture.test.d.ts +0 -22
  37. package/build/__tests__/behavioral/PersonFixture.test.js +0 -225
  38. package/build/__tests__/behavioral/PhoneNumberIncrementor.test.d.ts +0 -11
  39. package/build/__tests__/behavioral/PhoneNumberIncrementor.test.js +0 -95
  40. package/build/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.d.ts +0 -8
  41. package/build/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +0 -67
  42. package/build/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.d.ts +0 -5
  43. package/build/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +0 -44
  44. package/build/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.d.ts +0 -8
  45. package/build/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +0 -55
  46. package/build/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.d.ts +0 -10
  47. package/build/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +0 -137
  48. package/build/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.d.ts +0 -7
  49. package/build/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +0 -54
  50. package/build/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.d.ts +0 -6
  51. package/build/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +0 -40
  52. package/build/__tests__/behavioral/RoleFixture.test.d.ts +0 -15
  53. package/build/__tests__/behavioral/RoleFixture.test.js +0 -118
  54. package/build/__tests__/behavioral/SkillFixture.test.d.ts +0 -13
  55. package/build/__tests__/behavioral/SkillFixture.test.js +0 -118
  56. package/build/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.d.ts +0 -7
  57. package/build/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.js +0 -41
  58. package/build/__tests__/behavioral/databases/DatabaseFixture.test.d.ts +0 -7
  59. package/build/__tests__/behavioral/databases/DatabaseFixture.test.js +0 -59
  60. package/build/__tests__/behavioral/databases/DbResetsAsExpected.test.d.ts +0 -5
  61. package/build/__tests__/behavioral/databases/DbResetsAsExpected.test.js +0 -34
  62. package/build/__tests__/behavioral/databases/DummyStore.d.ts +0 -55
  63. package/build/__tests__/behavioral/databases/DummyStore.js +0 -36
  64. package/build/__tests__/behavioral/databases/StoreFixture.test.d.ts +0 -23
  65. package/build/__tests__/behavioral/databases/StoreFixture.test.js +0 -156
  66. package/build/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.d.ts +0 -9
  67. package/build/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +0 -73
  68. package/build/__tests__/behavioral/faking/FakeDecorator.test.d.ts +0 -45
  69. package/build/__tests__/behavioral/faking/FakeDecorator.test.js +0 -421
  70. package/build/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.d.ts +0 -4
  71. package/build/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +0 -23
  72. package/build/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.d.ts +0 -4
  73. package/build/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +0 -27
  74. package/build/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +0 -8
  75. package/build/__tests__/behavioral/faking/FakeThemeManager.test.js +0 -93
  76. package/build/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.d.ts +0 -8
  77. package/build/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +0 -56
  78. package/build/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.d.ts +0 -14
  79. package/build/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +0 -141
  80. package/build/__tests__/behavioral/faking/FakingAuthenticator.test.d.ts +0 -5
  81. package/build/__tests__/behavioral/faking/FakingAuthenticator.test.js +0 -35
  82. package/build/__tests__/behavioral/faking/FakingInBeforeEach.test.d.ts +0 -6
  83. package/build/__tests__/behavioral/faking/FakingInBeforeEach.test.js +0 -42
  84. package/build/__tests__/behavioral/faking/FakingLocations.test.d.ts +0 -6
  85. package/build/__tests__/behavioral/faking/FakingLocations.test.js +0 -45
  86. package/build/__tests__/behavioral/faking/FakingRoleEvents.test.d.ts +0 -19
  87. package/build/__tests__/behavioral/faking/FakingRoleEvents.test.js +0 -140
  88. package/build/__tests__/behavioral/faking/FakingSkillEvents.test.d.ts +0 -24
  89. package/build/__tests__/behavioral/faking/FakingSkillEvents.test.js +0 -174
  90. package/build/__tests__/behavioral/faking/UpdatePerson.test.d.ts +0 -4
  91. package/build/__tests__/behavioral/faking/UpdatePerson.test.js +0 -32
  92. package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.d.ts +0 -35
  93. package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.js +0 -321
  94. package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +0 -4
  95. package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +0 -48
  96. package/build/__tests__/behavioral/faking/WhoAmI.test.d.ts +0 -19
  97. package/build/__tests__/behavioral/faking/WhoAmI.test.js +0 -105
  98. package/build/__tests__/behavioral/maps/SpyingMapUtil.test.d.ts +0 -10
  99. package/build/__tests__/behavioral/maps/SpyingMapUtil.test.js +0 -76
  100. package/build/__tests__/behavioral/permissions/FakeAuthorizer.test.d.ts +0 -34
  101. package/build/__tests__/behavioral/permissions/FakeAuthorizer.test.js +0 -272
  102. package/build/__tests__/behavioral/permissions/PermissionFixture.test.d.ts +0 -5
  103. package/build/__tests__/behavioral/permissions/PermissionFixture.test.js +0 -35
  104. package/build/__tests__/behavioral/seeding/SeedingData.test.d.ts +0 -24
  105. package/build/__tests__/behavioral/seeding/SeedingData.test.js +0 -271
  106. package/build/__tests__/behavioral/seeding/UsingDecorators.test.d.ts +0 -37
  107. package/build/__tests__/behavioral/seeding/UsingDecorators.test.js +0 -266
  108. package/build/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.d.ts +0 -14
  109. package/build/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +0 -117
  110. package/build/__tests__/behavioral/views/FakingSkillViewControllers.test.d.ts +0 -12
  111. package/build/__tests__/behavioral/views/FakingSkillViewControllers.test.js +0 -55
  112. package/build/__tests__/behavioral/views/Routing.test.d.ts +0 -36
  113. package/build/__tests__/behavioral/views/Routing.test.js +0 -177
  114. package/build/__tests__/behavioral/views/TestingScope.test.d.ts +0 -24
  115. package/build/__tests__/behavioral/views/TestingScope.test.js +0 -197
  116. package/build/__tests__/behavioral/views/ViewPlugins.test.d.ts +0 -12
  117. package/build/__tests__/behavioral/views/ViewPlugins.test.js +0 -83
  118. package/build/__tests__/behavioral/views/WorkingWithTimezones.test.d.ts +0 -11
  119. package/build/__tests__/behavioral/views/WorkingWithTimezones.test.js +0 -55
  120. package/build/__tests__/behavioral/views/viewFixture/ViewFixture.test.d.ts +0 -118
  121. package/build/__tests__/behavioral/views/viewFixture/ViewFixture.test.js +0 -761
  122. package/build/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.d.ts +0 -5
  123. package/build/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.js +0 -29
  124. package/build/__tests__/support/AbstractFakeDecoratorTest.d.ts +0 -5
  125. package/build/__tests__/support/AbstractFakeDecoratorTest.js +0 -27
  126. package/build/__tests__/support/EventFaker.d.ts +0 -5
  127. package/build/__tests__/support/EventFaker.js +0 -36
  128. package/build/__tests__/support/RandomViewPlugin.d.ts +0 -2
  129. package/build/__tests__/support/RandomViewPlugin.js +0 -5
  130. package/build/__tests__/support/RandomViewPlugin2.d.ts +0 -2
  131. package/build/__tests__/support/RandomViewPlugin2.js +0 -5
  132. package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/.spruce/stores/stores.d.ts +0 -5
  133. package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/.spruce/stores/stores.js +0 -9
  134. package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.d.ts +0 -51
  135. package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js +0 -33
  136. package/build/__tests__/testDirsAndFiles/one-good-store-skill/src/.spruce/settings.json +0 -6
  137. package/build/__tests__/testDirsAndFiles/plugins1/build/.spruce/views/views.d.ts +0 -6
  138. package/build/__tests__/testDirsAndFiles/plugins1/build/.spruce/views/views.js +0 -11
  139. package/build/__tests__/testDirsAndFiles/plugins2/build/.spruce/views/views.d.ts +0 -6
  140. package/build/__tests__/testDirsAndFiles/plugins2/build/.spruce/views/views.js +0 -11
  141. package/build/__tests__/testDirsAndFiles/skill/build/.spruce/views/views.js +0 -18
  142. package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.d.ts +0 -5
  143. package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.js +0 -11
  144. package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.d.ts +0 -7
  145. package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.js +0 -19
  146. package/build/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.d.ts +0 -8
  147. package/build/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.js +0 -31
  148. package/build/__tests__/testDirsAndFiles/skill/package.json +0 -5
  149. package/build/__tests__/testDirsAndFiles/skill/src/.spruce/settings.json +0 -6
  150. package/build/__tests__/testDirsAndFiles/skill/src/.spruce/views/views.d.ts +0 -7
  151. package/build/__tests__/testDirsAndFiles/skill/src/.spruce/views/views.js +0 -17
  152. package/build/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.d.ts +0 -5
  153. package/build/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.js +0 -11
  154. package/build/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.d.ts +0 -8
  155. package/build/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.js +0 -31
  156. package/build/esm/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.d.ts +0 -15
  157. package/build/esm/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +0 -128
  158. package/build/esm/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.d.ts +0 -4
  159. package/build/esm/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +0 -40
  160. package/build/esm/__tests__/behavioral/DisablingSchemaValidationOnTest.test.d.ts +0 -5
  161. package/build/esm/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +0 -23
  162. package/build/esm/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.d.ts +0 -8
  163. package/build/esm/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +0 -80
  164. package/build/esm/__tests__/behavioral/FakingEventResponses.test.d.ts +0 -12
  165. package/build/esm/__tests__/behavioral/FakingEventResponses.test.js +0 -148
  166. package/build/esm/__tests__/behavioral/FixtureFactory.test.d.ts +0 -7
  167. package/build/esm/__tests__/behavioral/FixtureFactory.test.js +0 -61
  168. package/build/esm/__tests__/behavioral/LocationFixture.test.d.ts +0 -17
  169. package/build/esm/__tests__/behavioral/LocationFixture.test.js +0 -173
  170. package/build/esm/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.d.ts +0 -12
  171. package/build/esm/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +0 -113
  172. package/build/esm/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.d.ts +0 -4
  173. package/build/esm/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +0 -41
  174. package/build/esm/__tests__/behavioral/MercuryFixture.test.d.ts +0 -20
  175. package/build/esm/__tests__/behavioral/MercuryFixture.test.js +0 -223
  176. package/build/esm/__tests__/behavioral/OrganizationFixture.test.d.ts +0 -31
  177. package/build/esm/__tests__/behavioral/OrganizationFixture.test.js +0 -389
  178. package/build/esm/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.d.ts +0 -4
  179. package/build/esm/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +0 -18
  180. package/build/esm/__tests__/behavioral/PersonFixture.test.d.ts +0 -22
  181. package/build/esm/__tests__/behavioral/PersonFixture.test.js +0 -232
  182. package/build/esm/__tests__/behavioral/PhoneNumberIncrementor.test.d.ts +0 -11
  183. package/build/esm/__tests__/behavioral/PhoneNumberIncrementor.test.js +0 -112
  184. package/build/esm/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.d.ts +0 -8
  185. package/build/esm/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +0 -84
  186. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.d.ts +0 -5
  187. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +0 -55
  188. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.d.ts +0 -8
  189. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +0 -72
  190. package/build/esm/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.d.ts +0 -10
  191. package/build/esm/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +0 -146
  192. package/build/esm/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.d.ts +0 -7
  193. package/build/esm/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +0 -66
  194. package/build/esm/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.d.ts +0 -6
  195. package/build/esm/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +0 -51
  196. package/build/esm/__tests__/behavioral/RoleFixture.test.d.ts +0 -15
  197. package/build/esm/__tests__/behavioral/RoleFixture.test.js +0 -143
  198. package/build/esm/__tests__/behavioral/SkillFixture.test.d.ts +0 -13
  199. package/build/esm/__tests__/behavioral/SkillFixture.test.js +0 -141
  200. package/build/esm/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.d.ts +0 -7
  201. package/build/esm/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.js +0 -53
  202. package/build/esm/__tests__/behavioral/databases/DatabaseFixture.test.d.ts +0 -7
  203. package/build/esm/__tests__/behavioral/databases/DatabaseFixture.test.js +0 -48
  204. package/build/esm/__tests__/behavioral/databases/DbResetsAsExpected.test.d.ts +0 -5
  205. package/build/esm/__tests__/behavioral/databases/DbResetsAsExpected.test.js +0 -28
  206. package/build/esm/__tests__/behavioral/databases/DummyStore.d.ts +0 -55
  207. package/build/esm/__tests__/behavioral/databases/DummyStore.js +0 -43
  208. package/build/esm/__tests__/behavioral/databases/StoreFixture.test.d.ts +0 -23
  209. package/build/esm/__tests__/behavioral/databases/StoreFixture.test.js +0 -164
  210. package/build/esm/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.d.ts +0 -9
  211. package/build/esm/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +0 -89
  212. package/build/esm/__tests__/behavioral/faking/FakeDecorator.test.d.ts +0 -45
  213. package/build/esm/__tests__/behavioral/faking/FakeDecorator.test.js +0 -482
  214. package/build/esm/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.d.ts +0 -4
  215. package/build/esm/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +0 -28
  216. package/build/esm/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.d.ts +0 -4
  217. package/build/esm/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +0 -32
  218. package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +0 -8
  219. package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.js +0 -82
  220. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.d.ts +0 -8
  221. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +0 -70
  222. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.d.ts +0 -14
  223. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +0 -165
  224. package/build/esm/__tests__/behavioral/faking/FakingAuthenticator.test.d.ts +0 -5
  225. package/build/esm/__tests__/behavioral/faking/FakingAuthenticator.test.js +0 -43
  226. package/build/esm/__tests__/behavioral/faking/FakingInBeforeEach.test.d.ts +0 -6
  227. package/build/esm/__tests__/behavioral/faking/FakingInBeforeEach.test.js +0 -55
  228. package/build/esm/__tests__/behavioral/faking/FakingLocations.test.d.ts +0 -6
  229. package/build/esm/__tests__/behavioral/faking/FakingLocations.test.js +0 -55
  230. package/build/esm/__tests__/behavioral/faking/FakingRoleEvents.test.d.ts +0 -19
  231. package/build/esm/__tests__/behavioral/faking/FakingRoleEvents.test.js +0 -175
  232. package/build/esm/__tests__/behavioral/faking/FakingSkillEvents.test.d.ts +0 -24
  233. package/build/esm/__tests__/behavioral/faking/FakingSkillEvents.test.js +0 -214
  234. package/build/esm/__tests__/behavioral/faking/UpdatePerson.test.d.ts +0 -4
  235. package/build/esm/__tests__/behavioral/faking/UpdatePerson.test.js +0 -38
  236. package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.d.ts +0 -35
  237. package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.js +0 -360
  238. package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +0 -4
  239. package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +0 -31
  240. package/build/esm/__tests__/behavioral/faking/WhoAmI.test.d.ts +0 -19
  241. package/build/esm/__tests__/behavioral/faking/WhoAmI.test.js +0 -142
  242. package/build/esm/__tests__/behavioral/maps/SpyingMapUtil.test.d.ts +0 -10
  243. package/build/esm/__tests__/behavioral/maps/SpyingMapUtil.test.js +0 -94
  244. package/build/esm/__tests__/behavioral/permissions/FakeAuthorizer.test.d.ts +0 -34
  245. package/build/esm/__tests__/behavioral/permissions/FakeAuthorizer.test.js +0 -324
  246. package/build/esm/__tests__/behavioral/permissions/PermissionFixture.test.d.ts +0 -5
  247. package/build/esm/__tests__/behavioral/permissions/PermissionFixture.test.js +0 -43
  248. package/build/esm/__tests__/behavioral/seeding/SeedingData.test.d.ts +0 -24
  249. package/build/esm/__tests__/behavioral/seeding/SeedingData.test.js +0 -314
  250. package/build/esm/__tests__/behavioral/seeding/UsingDecorators.test.d.ts +0 -37
  251. package/build/esm/__tests__/behavioral/seeding/UsingDecorators.test.js +0 -322
  252. package/build/esm/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.d.ts +0 -14
  253. package/build/esm/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +0 -138
  254. package/build/esm/__tests__/behavioral/views/FakingSkillViewControllers.test.d.ts +0 -12
  255. package/build/esm/__tests__/behavioral/views/FakingSkillViewControllers.test.js +0 -70
  256. package/build/esm/__tests__/behavioral/views/Routing.test.d.ts +0 -36
  257. package/build/esm/__tests__/behavioral/views/Routing.test.js +0 -212
  258. package/build/esm/__tests__/behavioral/views/TestingScope.test.d.ts +0 -24
  259. package/build/esm/__tests__/behavioral/views/TestingScope.test.js +0 -238
  260. package/build/esm/__tests__/behavioral/views/ViewPlugins.test.d.ts +0 -12
  261. package/build/esm/__tests__/behavioral/views/ViewPlugins.test.js +0 -103
  262. package/build/esm/__tests__/behavioral/views/WorkingWithTimezones.test.d.ts +0 -11
  263. package/build/esm/__tests__/behavioral/views/WorkingWithTimezones.test.js +0 -64
  264. package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixture.test.d.ts +0 -118
  265. package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixture.test.js +0 -856
  266. package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.d.ts +0 -5
  267. package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.js +0 -39
  268. package/build/esm/__tests__/support/AbstractFakeDecoratorTest.d.ts +0 -5
  269. package/build/esm/__tests__/support/AbstractFakeDecoratorTest.js +0 -34
  270. package/build/esm/__tests__/support/EventFaker.d.ts +0 -5
  271. package/build/esm/__tests__/support/EventFaker.js +0 -45
  272. package/build/esm/__tests__/support/RandomViewPlugin.d.ts +0 -2
  273. package/build/esm/__tests__/support/RandomViewPlugin.js +0 -2
  274. package/build/esm/__tests__/support/RandomViewPlugin2.d.ts +0 -2
  275. package/build/esm/__tests__/support/RandomViewPlugin2.js +0 -2
  276. package/build/esm/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.d.ts +0 -51
  277. package/build/esm/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js +0 -41
  278. package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.d.ts +0 -5
  279. package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.js +0 -9
  280. package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.d.ts +0 -7
  281. package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.js +0 -28
  282. package/build/esm/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.d.ts +0 -8
  283. package/build/esm/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.js +0 -26
  284. package/build/esm/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.d.ts +0 -5
  285. package/build/esm/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.js +0 -9
  286. package/build/esm/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.d.ts +0 -8
  287. package/build/esm/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.js +0 -26
  288. /package/build/{__tests__/support → esm/tests}/FakeThemeManager.d.ts +0 -0
  289. /package/build/esm/{__tests__/support → tests}/FakeThemeManager.js +0 -0
  290. /package/build/{esm/__tests__/support → tests}/FakeThemeManager.d.ts +0 -0
  291. /package/build/{__tests__/support → tests}/FakeThemeManager.js +0 -0
@@ -1,37 +0,0 @@
1
- import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
2
- import { DummyStore } from '../databases/DummyStore';
3
- export default class UsingDecoratorsTest extends AbstractSpruceFixtureTest {
4
- private static lastClient;
5
- private static goodStore;
6
- protected static beforeEach(): Promise<void>;
7
- protected static afterAll(): Promise<void>;
8
- protected static loginSetsDefaultClient(): Promise<void>;
9
- protected static retainsClientBetweenTests(): Promise<void>;
10
- protected static canSeedThreeOrgs(): Promise<void>;
11
- protected static canSeedFiveOrgs(): Promise<void>;
12
- protected static canSeedTwoLocations(): Promise<void>;
13
- protected static seededLocationsArePublic(): Promise<void>;
14
- protected static canSeedTenLocations(): Promise<void>;
15
- protected static locationUsesLatestOrg(): Promise<void>;
16
- protected static canSeedStores(): Promise<void>;
17
- protected static logsInViewAuthenticator(): void;
18
- protected static passesThroughArgs(one: number, two: number, three: number): void;
19
- protected static passesThroughArgs2(one: any): void;
20
- protected static seedsAddToBeforeEach(): Promise<void>;
21
- protected static seedsAddToBeforeEachButNotLastRun(): Promise<void>;
22
- protected static canGetClientOffLogin(): Promise<void>;
23
- protected static storeGetsVariablesPassed(): Promise<void>;
24
- protected static storeGetsVariablesPassed2(): Promise<void>;
25
- protected static canSeedPeople(baseCounts: Record<string, number>): Promise<void>;
26
- protected static canSeedMorePeople(baseCounts: Record<string, number>): Promise<void>;
27
- private static assertExpectedSeededPeople;
28
- private static assertCountOrgs;
29
- private static assertCountLocations;
30
- private static assertCountGoods;
31
- private static assertTotalPeopleByRole;
32
- }
33
- declare module '@sprucelabs/data-stores/build/types/stores.types' {
34
- interface StoreMap {
35
- dummies: DummyStore;
36
- }
37
- }
@@ -1,266 +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 mercury_client_1 = require("@sprucelabs/mercury-client");
14
- const test_utils_1 = require("@sprucelabs/test-utils");
15
- const __1 = require("../../..");
16
- const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
17
- const constants_1 = require("../../../tests/constants");
18
- const login_1 = __importDefault(require("../../../tests/decorators/login"));
19
- const seed_1 = __importDefault(require("../../../tests/decorators/seed"));
20
- // eslint-disable-next-line spruce/prohibit-import-from-build-folder
21
- const Good_store_1 = __importDefault(require("../../testDirsAndFiles/one-good-store-skill/build/stores/Good.store"));
22
- const DummyStore_1 = require("../databases/DummyStore");
23
- __1.MercuryFixture.setShouldRequireLocalListeners(false);
24
- let UsingDecoratorsTest = class UsingDecoratorsTest extends AbstractSpruceFixtureTest_1.default {
25
- static async beforeEach() {
26
- test_utils_1.assert.isTrue(mercury_client_1.MercuryClientFactory.isInTestMode());
27
- this.goodStore = await this.Fixture('store').Store('good');
28
- await this.assertCountGoods(5);
29
- await super.beforeEach();
30
- const auth = heartwood_view_controllers_1.AuthenticatorImpl.getInstance();
31
- test_utils_1.assert.isTruthy(auth.getSessionToken());
32
- const client = login_1.default.getClient();
33
- const person = login_1.default.getPerson();
34
- //@ts-ignore
35
- test_utils_1.assert.isEqualDeep(person, client.auth.person);
36
- test_utils_1.assert.isTruthy(client);
37
- test_utils_1.assert.isTrue(client.isConnected());
38
- test_utils_1.assert.isTrue(client.getIsTestClient());
39
- this.lastClient = client;
40
- //@ts-ignore
41
- test_utils_1.assert.isEqualDeep(auth.getPerson(), client.auth.person);
42
- //@ts-ignore
43
- test_utils_1.assert.isEqualDeep(auth.getSessionToken(), client.auth.token);
44
- this.goodStore = await this.Fixture('store').Store('good');
45
- await this.assertCountGoods(5);
46
- }
47
- static async afterAll() {
48
- await super.afterAll();
49
- const client = __1.MercuryFixture.getDefaultClient();
50
- test_utils_1.assert.isFalsy(client);
51
- }
52
- static async loginSetsDefaultClient() {
53
- const client = __1.MercuryFixture.getDefaultClient();
54
- test_utils_1.assert.isTruthy(client);
55
- test_utils_1.assert.isTrue(client.isConnected());
56
- }
57
- static async retainsClientBetweenTests() {
58
- const client = __1.MercuryFixture.getDefaultClient();
59
- test_utils_1.assert.isTruthy(client);
60
- test_utils_1.assert.isEqual(this.lastClient, client);
61
- test_utils_1.assert.isTrue(client.isConnected());
62
- }
63
- static async canSeedThreeOrgs() {
64
- await this.assertCountOrgs(3);
65
- }
66
- static async canSeedFiveOrgs() {
67
- await this.assertCountOrgs(5);
68
- }
69
- static async canSeedTwoLocations() {
70
- await this.assertCountLocations(3);
71
- }
72
- static async seededLocationsArePublic() {
73
- const locations = await this.locations.listLocations();
74
- for (const location of locations) {
75
- test_utils_1.assert.isTrue(location.isPublic);
76
- }
77
- }
78
- static async canSeedTenLocations() {
79
- await this.assertCountLocations(10);
80
- }
81
- static async locationUsesLatestOrg() {
82
- await this.assertCountLocations(10);
83
- await this.assertCountOrgs(10);
84
- }
85
- static async canSeedStores() {
86
- test_utils_1.assert.isTrue(DummyStore_1.DummyStore.wasSeedInvoked);
87
- test_utils_1.assert.isEqualDeep(DummyStore_1.DummyStore.seedOptions, {
88
- totalToSeed: 10,
89
- TestClass: this,
90
- });
91
- }
92
- static logsInViewAuthenticator() {
93
- test_utils_1.assert.isTruthy(heartwood_view_controllers_1.AuthenticatorImpl.getInstance().getSessionToken());
94
- }
95
- static passesThroughArgs(one, two, three) {
96
- test_utils_1.assert.isEqual(one, 1);
97
- test_utils_1.assert.isEqual(two, 1);
98
- test_utils_1.assert.isEqual(three, 1);
99
- }
100
- static passesThroughArgs2(one) {
101
- test_utils_1.assert.isEqualDeep(one, { hello: 'world' });
102
- }
103
- static async seedsAddToBeforeEach() {
104
- await this.assertCountGoods(10);
105
- }
106
- static async seedsAddToBeforeEachButNotLastRun() {
107
- await this.assertCountGoods(6);
108
- }
109
- static async canGetClientOffLogin() {
110
- test_utils_1.assert.isFunction(login_1.default.getClient);
111
- test_utils_1.assert.isEqual(login_1.default.getClient(), __1.MercuryFixture.getDefaultClient());
112
- }
113
- static async storeGetsVariablesPassed() {
114
- test_utils_1.assert.isEqualDeep(Good_store_1.default.seedParams, ['hello', 'world']);
115
- }
116
- static async storeGetsVariablesPassed2() {
117
- test_utils_1.assert.isEqualDeep(Good_store_1.default.seedParams, ['goodbye', 'people']);
118
- }
119
- static async canSeedPeople(baseCounts) {
120
- await this.assertExpectedSeededPeople(baseCounts);
121
- }
122
- static async canSeedMorePeople(baseCounts) {
123
- await this.assertExpectedSeededPeople(baseCounts);
124
- }
125
- static async assertExpectedSeededPeople(baseCounts) {
126
- const bases = Object.keys(baseCounts);
127
- for (const base of bases) {
128
- const count = baseCounts[base];
129
- await this.assertTotalPeopleByRole(base, count);
130
- }
131
- }
132
- static async assertCountOrgs(expected) {
133
- const organizations = await this.organizations.listOrganizations();
134
- test_utils_1.assert.isLength(organizations, expected);
135
- }
136
- static async assertCountLocations(expected) {
137
- const org = await this.views.getScope().getCurrentOrganization();
138
- test_utils_1.assert.isTruthy(org);
139
- const organizationId = org.id;
140
- const locations = await this.locations.listLocations(organizationId);
141
- test_utils_1.assert.isLength(locations, expected);
142
- }
143
- static async assertCountGoods(expected) {
144
- const goodStore = await this.stores.Store('good');
145
- const count = await goodStore.count({});
146
- test_utils_1.assert.isEqual(count, expected);
147
- const localCount = await this.goodStore.count({});
148
- test_utils_1.assert.isEqual(localCount, expected, 'The store built in beforeEach is pointing at stale database.');
149
- }
150
- static async assertTotalPeopleByRole(roleBase, total) {
151
- const org = await this.organizations.getNewestOrganization();
152
- test_utils_1.assert.isTruthy(org);
153
- const teammates = await this.people.listPeople({
154
- organizationId: org.id,
155
- roleBases: [roleBase],
156
- });
157
- test_utils_1.assert.isLength(teammates, total);
158
- }
159
- };
160
- __decorate([
161
- (0, seed_1.default)('good', 5),
162
- (0, seed_1.default)('dummies', 10)
163
- ], UsingDecoratorsTest, "beforeEach", null);
164
- __decorate([
165
- (0, test_utils_1.test)()
166
- ], UsingDecoratorsTest, "loginSetsDefaultClient", null);
167
- __decorate([
168
- (0, test_utils_1.test)()
169
- ], UsingDecoratorsTest, "retainsClientBetweenTests", null);
170
- __decorate([
171
- (0, test_utils_1.test)(),
172
- (0, seed_1.default)('organizations', 3)
173
- ], UsingDecoratorsTest, "canSeedThreeOrgs", null);
174
- __decorate([
175
- (0, test_utils_1.test)(),
176
- (0, seed_1.default)('organizations', 5)
177
- ], UsingDecoratorsTest, "canSeedFiveOrgs", null);
178
- __decorate([
179
- (0, test_utils_1.test)(),
180
- (0, seed_1.default)('locations', 3)
181
- ], UsingDecoratorsTest, "canSeedTwoLocations", null);
182
- __decorate([
183
- (0, test_utils_1.test)(),
184
- (0, seed_1.default)('locations', 3)
185
- ], UsingDecoratorsTest, "seededLocationsArePublic", null);
186
- __decorate([
187
- (0, test_utils_1.test)(),
188
- (0, seed_1.default)('locations', 10)
189
- ], UsingDecoratorsTest, "canSeedTenLocations", null);
190
- __decorate([
191
- (0, test_utils_1.test)(),
192
- (0, seed_1.default)('organizations', 10),
193
- (0, seed_1.default)('locations', 10)
194
- ], UsingDecoratorsTest, "locationUsesLatestOrg", null);
195
- __decorate([
196
- (0, test_utils_1.test)(),
197
- (0, seed_1.default)('dummies', 10)
198
- ], UsingDecoratorsTest, "canSeedStores", null);
199
- __decorate([
200
- (0, test_utils_1.test)()
201
- ], UsingDecoratorsTest, "logsInViewAuthenticator", null);
202
- __decorate([
203
- (0, test_utils_1.test)('passes through args 1', 1, 1, 1),
204
- (0, seed_1.default)('dummies', 3)
205
- ], UsingDecoratorsTest, "passesThroughArgs", null);
206
- __decorate([
207
- (0, test_utils_1.test)('passes through args 2', { hello: 'world' }),
208
- (0, seed_1.default)('dummies', 3)
209
- ], UsingDecoratorsTest, "passesThroughArgs2", null);
210
- __decorate([
211
- (0, test_utils_1.test)(),
212
- (0, seed_1.default)('good', 5)
213
- ], UsingDecoratorsTest, "seedsAddToBeforeEach", null);
214
- __decorate([
215
- (0, test_utils_1.test)(),
216
- (0, seed_1.default)('good', 1)
217
- ], UsingDecoratorsTest, "seedsAddToBeforeEachButNotLastRun", null);
218
- __decorate([
219
- (0, test_utils_1.test)()
220
- ], UsingDecoratorsTest, "canGetClientOffLogin", null);
221
- __decorate([
222
- (0, test_utils_1.test)(),
223
- (0, seed_1.default)('good', 1, 'hello', 'world')
224
- ], UsingDecoratorsTest, "storeGetsVariablesPassed", null);
225
- __decorate([
226
- (0, test_utils_1.test)(),
227
- (0, seed_1.default)('good', 1, 'goodbye', 'people')
228
- ], UsingDecoratorsTest, "storeGetsVariablesPassed2", null);
229
- __decorate([
230
- (0, test_utils_1.test)('can seed people', {
231
- guest: 2,
232
- teammate: 2,
233
- groupManager: 2,
234
- manager: 2,
235
- owner: 3,
236
- }),
237
- (0, seed_1.default)('organizations', 1),
238
- (0, seed_1.default)('locations', 1),
239
- (0, seed_1.default)('teammates', 2),
240
- (0, seed_1.default)('guests', 2),
241
- (0, seed_1.default)('groupManagers', 2),
242
- (0, seed_1.default)('managers', 2),
243
- (0, seed_1.default)('owners', 2)
244
- ], UsingDecoratorsTest, "canSeedPeople", null);
245
- __decorate([
246
- (0, test_utils_1.test)('can seed more people', {
247
- guest: 5,
248
- teammate: 5,
249
- groupManager: 3,
250
- manager: 4,
251
- owner: 6,
252
- }),
253
- (0, seed_1.default)('organizations', 1),
254
- (0, seed_1.default)('locations', 1),
255
- (0, seed_1.default)('teammates', 5),
256
- (0, seed_1.default)('guests', 5),
257
- (0, seed_1.default)('groupManagers', 3),
258
- (0, seed_1.default)('managers', 4),
259
- (0, seed_1.default)('owners', 5)
260
- ], UsingDecoratorsTest, "canSeedMorePeople", null);
261
- UsingDecoratorsTest = __decorate([
262
- (0, login_1.default)(constants_1.DEMO_NUMBER_DECORATORS)
263
- ], UsingDecoratorsTest);
264
- exports.default = UsingDecoratorsTest;
265
- __1.StoreFixture.setStore('dummies', DummyStore_1.DummyStore);
266
- __1.StoreFixture.setStore('good', Good_store_1.default);
@@ -1,14 +0,0 @@
1
- import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
2
- export default class UsingDecoratorsToInstallSkills extends AbstractSpruceFixtureTest {
3
- private static skill;
4
- protected static beforeEach(): Promise<void>;
5
- protected static throwsWhenMissingNamespaces(): void;
6
- protected static returnsDecorator(): void;
7
- protected static callsOriginalTestMethod(): Promise<void>;
8
- protected static passesThroughOriginalArgs(args: any): Promise<void>;
9
- protected static throwsWithoutSeedingOrg(): Promise<void>;
10
- protected static throwsWhenInstallingBadSkill(): Promise<void>;
11
- protected static doesNotEmitDidInstall(): Promise<void>;
12
- private static executeDecorator;
13
- private static getDecorator;
14
- }
@@ -1,117 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __importDefault = (this && this.__importDefault) || function (mod) {
9
- return (mod && mod.__esModule) ? mod : { "default": mod };
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const test_utils_1 = require("@sprucelabs/test-utils");
13
- const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
14
- const constants_1 = require("../../../tests/constants");
15
- const install_1 = __importDefault(require("../../../tests/decorators/install"));
16
- const login_1 = __importDefault(require("../../../tests/decorators/login"));
17
- const seed_1 = __importDefault(require("../../../tests/decorators/seed"));
18
- const MercuryFixture_1 = __importDefault(require("../../../tests/fixtures/MercuryFixture"));
19
- MercuryFixture_1.default.setShouldRequireLocalListeners(false);
20
- let UsingDecoratorsToInstallSkills = class UsingDecoratorsToInstallSkills extends AbstractSpruceFixtureTest_1.default {
21
- static async beforeEach() {
22
- await super.beforeEach();
23
- this.skill = await this.skills.seedDemoSkill();
24
- }
25
- static throwsWhenMissingNamespaces() {
26
- test_utils_1.assert.doesThrow(() => install_1.default.skills());
27
- }
28
- static returnsDecorator() {
29
- const decorator = this.getDecorator();
30
- test_utils_1.assert.isFunction(decorator);
31
- }
32
- static async callsOriginalTestMethod() {
33
- let wasHit = false;
34
- await this.executeDecorator({
35
- testFunction: async () => {
36
- wasHit = true;
37
- },
38
- });
39
- test_utils_1.assert.isTrue(wasHit);
40
- }
41
- static async passesThroughOriginalArgs(args) {
42
- let passedArgs;
43
- await this.executeDecorator({
44
- testFunction: async (...args) => {
45
- passedArgs = args;
46
- },
47
- args,
48
- });
49
- test_utils_1.assert.isEqualDeep(passedArgs, args);
50
- }
51
- static async throwsWithoutSeedingOrg() {
52
- await test_utils_1.assert.doesThrowAsync(() => this.executeDecorator({ testFunction: async () => { } }));
53
- }
54
- static async throwsWhenInstallingBadSkill() {
55
- await test_utils_1.assert.doesThrowAsync(() => this.executeDecorator({
56
- testFunction: async () => { },
57
- namespaces: ['not-found'],
58
- }));
59
- }
60
- static async doesNotEmitDidInstall() {
61
- let passedPayload;
62
- await login_1.default
63
- .getClient()
64
- .on('install-skill::v2020_12_25', ({ payload }) => {
65
- passedPayload = payload;
66
- return {};
67
- });
68
- await this.executeDecorator({
69
- testFunction: async () => { },
70
- });
71
- test_utils_1.assert.isFalse(passedPayload.shouldNotifySkillOfInstall);
72
- }
73
- static async executeDecorator(options) {
74
- const { testFunction, args, namespaces } = options;
75
- const mockDescriptor = {
76
- value: testFunction,
77
- };
78
- const decorator = this.getDecorator(namespaces);
79
- decorator(this, 'myTest', mockDescriptor);
80
- //@ts-ignore
81
- await mockDescriptor.value(...(args ? args : []));
82
- }
83
- static getDecorator(namespaces) {
84
- const slugs = namespaces !== null && namespaces !== void 0 ? namespaces : [this.skill.slug];
85
- return install_1.default.skills(...slugs);
86
- }
87
- };
88
- __decorate([
89
- (0, test_utils_1.test)()
90
- ], UsingDecoratorsToInstallSkills, "throwsWhenMissingNamespaces", null);
91
- __decorate([
92
- (0, test_utils_1.test)()
93
- ], UsingDecoratorsToInstallSkills, "returnsDecorator", null);
94
- __decorate([
95
- (0, test_utils_1.test)(),
96
- (0, seed_1.default)('organizations', 1)
97
- ], UsingDecoratorsToInstallSkills, "callsOriginalTestMethod", null);
98
- __decorate([
99
- (0, test_utils_1.test)('passes args 1', [1]),
100
- (0, test_utils_1.test)('passes args 1', ['hello', 'world']),
101
- (0, seed_1.default)('organizations', 1)
102
- ], UsingDecoratorsToInstallSkills, "passesThroughOriginalArgs", null);
103
- __decorate([
104
- (0, test_utils_1.test)()
105
- ], UsingDecoratorsToInstallSkills, "throwsWithoutSeedingOrg", null);
106
- __decorate([
107
- (0, test_utils_1.test)(),
108
- (0, seed_1.default)('organizations', 1)
109
- ], UsingDecoratorsToInstallSkills, "throwsWhenInstallingBadSkill", null);
110
- __decorate([
111
- (0, test_utils_1.test)(),
112
- (0, seed_1.default)('organizations', 1)
113
- ], UsingDecoratorsToInstallSkills, "doesNotEmitDidInstall", null);
114
- UsingDecoratorsToInstallSkills = __decorate([
115
- (0, login_1.default)(constants_1.DEMO_NUMBER_SKILL_DECORATORS)
116
- ], UsingDecoratorsToInstallSkills);
117
- exports.default = UsingDecoratorsToInstallSkills;
@@ -1,12 +0,0 @@
1
- import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
2
- import FakeSkillViewController from '../../../tests/Fake.svc';
3
- export default class FakingSkillViewControllersTest extends AbstractSpruceFixtureTest {
4
- protected static controllerMap: {
5
- fake: typeof FakeSkillViewController;
6
- };
7
- private static viewFixture;
8
- protected static beforeEach(): Promise<void>;
9
- protected static canRenderkFakeSkillViewController(): Promise<void>;
10
- protected static passesThroughConstructorAptions(options: any): Promise<void>;
11
- protected static passesThroughLoadArgs(args: any): Promise<void>;
12
- }
@@ -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 heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
13
- const schema_1 = require("@sprucelabs/schema");
14
- const test_utils_1 = require("@sprucelabs/test-utils");
15
- const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
16
- const Fake_svc_1 = __importDefault(require("../../../tests/Fake.svc"));
17
- class FakingSkillViewControllersTest extends AbstractSpruceFixtureTest_1.default {
18
- static async beforeEach() {
19
- await super.beforeEach();
20
- this.viewFixture = this.Fixture('view', {
21
- controllerMap: {
22
- fake: Fake_svc_1.default,
23
- },
24
- });
25
- }
26
- static async canRenderkFakeSkillViewController() {
27
- const vc = this.viewFixture.Controller('fake', {});
28
- const model = this.viewFixture.render(vc);
29
- (0, schema_1.validateSchemaValues)(heartwood_view_controllers_1.skillViewSchema, model);
30
- }
31
- static async passesThroughConstructorAptions(options) {
32
- const vc = this.viewFixture.Controller('fake', options);
33
- test_utils_1.assert.doesInclude(vc.constructorOptions, options);
34
- }
35
- static async passesThroughLoadArgs(args) {
36
- const vc = this.viewFixture.Controller('fake', {});
37
- await this.viewFixture.load(vc, args);
38
- test_utils_1.assert.isEqualDeep(vc.args, args);
39
- }
40
- }
41
- FakingSkillViewControllersTest.controllerMap = {
42
- fake: Fake_svc_1.default,
43
- };
44
- exports.default = FakingSkillViewControllersTest;
45
- __decorate([
46
- (0, test_utils_1.test)()
47
- ], FakingSkillViewControllersTest, "canRenderkFakeSkillViewController", null);
48
- __decorate([
49
- (0, test_utils_1.test)('passed constructor options 1', { hello: 'world' }),
50
- (0, test_utils_1.test)('passed constructor options 2', { taco: 'bell' })
51
- ], FakingSkillViewControllersTest, "passesThroughConstructorAptions", null);
52
- __decorate([
53
- (0, test_utils_1.test)('passes args 1', { hello: 'world' }),
54
- (0, test_utils_1.test)('passes args 2', { cheesey: 'burrito' })
55
- ], FakingSkillViewControllersTest, "passesThroughLoadArgs", null);
@@ -1,36 +0,0 @@
1
- import { SkillViewControllerId } from '@sprucelabs/heartwood-view-controllers';
2
- import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
3
- import BookSkillViewController from '../../testDirsAndFiles/skill/build/skillViewControllers/Book.svc';
4
- import SpySkillViewController from '../../testDirsAndFiles/skill/build/skillViewControllers/Spy.svc';
5
- declare module '@sprucelabs/heartwood-view-controllers/build/types/heartwood.types' {
6
- interface ViewControllerMap {
7
- 'spruceTestFixtures.book': BookSkillViewController;
8
- 'spruceTestFixtures.spy': SpySkillViewController;
9
- }
10
- interface SkillViewControllerMap {
11
- 'spruceTestFixtures.book': BookSkillViewController;
12
- 'spruceTestFixtures.spy': SpySkillViewController;
13
- }
14
- }
15
- export default class RoutingTest extends AbstractSpruceFixtureTest {
16
- private static router;
17
- private static factory;
18
- protected static vcDir: string;
19
- protected static beforeEach(): Promise<void>;
20
- protected static throwsWithBadDestination(): Promise<void>;
21
- protected static getPresentVcIsEmptyToStart(): Promise<void>;
22
- protected static canRedirectToGoodSvcWithoutNamespace(id: SkillViewControllerId, Vc: any): Promise<void>;
23
- protected static redirectTriggersLoadWithExpectedItems(args: any): Promise<void>;
24
- protected static redirectByDefaultDoesNotLoadWithExpectedItems(args: any): Promise<void>;
25
- protected static canHookIntoRedirectEvents(expectedArgs: any): Promise<void>;
26
- protected static canFakeRedirectToHeartwoodRoot(): Promise<void>;
27
- protected static canSuppressBadControllerIdOnRedirect(): Promise<void>;
28
- protected static shouldThrowWithBadSvcBecauseTestRouterIsReset(): Promise<void>;
29
- protected static testRouterBuildsOptionsWithLocaleAndAuthorizer(): void;
30
- protected static canSetPresentVc(): Promise<void>;
31
- protected static canPullNamespaceFromPresentVc(id: any, namespace: string): Promise<void>;
32
- protected static canSetNamespaceDirectly(): Promise<void>;
33
- private static assertCurrentNamespace;
34
- private static setPresentVc;
35
- private static assertRedirects;
36
- }