@sprucelabs/spruce-test-fixtures 45.2.9 → 46.0.2

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 (267) hide show
  1. package/build/__tests__/behavioral/CanUseStoresSetupInBeforeEach.test.d.ts +7 -0
  2. package/build/__tests__/behavioral/CanUseStoresSetupInBeforeEach.test.js +41 -0
  3. package/build/__tests__/behavioral/DatabaseFixture.test.d.ts +7 -0
  4. package/build/__tests__/behavioral/DatabaseFixture.test.js +59 -0
  5. package/build/__tests__/behavioral/DbResetsAsExpected.test.d.ts +5 -0
  6. package/build/__tests__/behavioral/DbResetsAsExpected.test.js +34 -0
  7. package/build/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.d.ts +15 -0
  8. package/build/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +109 -0
  9. package/build/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.d.ts +4 -0
  10. package/build/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +34 -0
  11. package/build/__tests__/behavioral/DisablingSchemaValidationOnTest.test.d.ts +5 -0
  12. package/build/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +26 -0
  13. package/build/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.d.ts +8 -0
  14. package/build/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +65 -0
  15. package/build/__tests__/behavioral/DummyStore.d.ts +55 -0
  16. package/build/__tests__/behavioral/DummyStore.js +36 -0
  17. package/build/__tests__/behavioral/FakingEventResponses.test.d.ts +12 -0
  18. package/build/__tests__/behavioral/FakingEventResponses.test.js +125 -0
  19. package/build/__tests__/behavioral/FixtureFactory.test.d.ts +7 -0
  20. package/build/__tests__/behavioral/FixtureFactory.test.js +79 -0
  21. package/build/__tests__/behavioral/LocationFixture.test.d.ts +15 -0
  22. package/build/__tests__/behavioral/LocationFixture.test.js +128 -0
  23. package/build/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.d.ts +12 -0
  24. package/build/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +92 -0
  25. package/build/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.d.ts +4 -0
  26. package/build/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +29 -0
  27. package/build/__tests__/behavioral/MercuryFixture.test.d.ts +19 -0
  28. package/build/__tests__/behavioral/MercuryFixture.test.js +175 -0
  29. package/build/__tests__/behavioral/OrganizationFixture.test.d.ts +31 -0
  30. package/build/__tests__/behavioral/OrganizationFixture.test.js +331 -0
  31. package/build/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.d.ts +4 -0
  32. package/build/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +21 -0
  33. package/build/__tests__/behavioral/PersonFixture.test.d.ts +22 -0
  34. package/build/__tests__/behavioral/PersonFixture.test.js +224 -0
  35. package/build/__tests__/behavioral/PhoneNumberIncrementor.test.d.ts +11 -0
  36. package/build/__tests__/behavioral/PhoneNumberIncrementor.test.js +95 -0
  37. package/build/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.d.ts +8 -0
  38. package/build/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +60 -0
  39. package/build/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.d.ts +5 -0
  40. package/build/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +37 -0
  41. package/build/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.d.ts +7 -0
  42. package/build/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +44 -0
  43. package/build/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.d.ts +10 -0
  44. package/build/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +130 -0
  45. package/build/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.d.ts +7 -0
  46. package/build/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +42 -0
  47. package/build/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.d.ts +6 -0
  48. package/build/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +37 -0
  49. package/build/__tests__/behavioral/RoleFixture.test.d.ts +15 -0
  50. package/build/__tests__/behavioral/RoleFixture.test.js +118 -0
  51. package/build/__tests__/behavioral/SeedingData.test.d.ts +24 -0
  52. package/build/__tests__/behavioral/SeedingData.test.js +271 -0
  53. package/build/__tests__/behavioral/SkillFixture.test.d.ts +13 -0
  54. package/build/__tests__/behavioral/SkillFixture.test.js +116 -0
  55. package/build/__tests__/behavioral/StoreFixture.test.d.ts +23 -0
  56. package/build/__tests__/behavioral/StoreFixture.test.js +156 -0
  57. package/build/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.d.ts +9 -0
  58. package/build/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +71 -0
  59. package/build/__tests__/behavioral/faking/FakeDecorator.test.d.ts +45 -0
  60. package/build/__tests__/behavioral/faking/FakeDecorator.test.js +418 -0
  61. package/build/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.d.ts +4 -0
  62. package/build/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +23 -0
  63. package/build/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.d.ts +4 -0
  64. package/build/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +27 -0
  65. package/build/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +8 -0
  66. package/build/__tests__/behavioral/faking/FakeThemeManager.test.js +93 -0
  67. package/build/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.d.ts +8 -0
  68. package/build/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +56 -0
  69. package/build/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.d.ts +14 -0
  70. package/build/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +141 -0
  71. package/build/__tests__/behavioral/faking/FakingInBeforeEach.test.d.ts +6 -0
  72. package/build/__tests__/behavioral/faking/FakingInBeforeEach.test.js +42 -0
  73. package/build/__tests__/behavioral/faking/FakingRoleEvents.test.d.ts +19 -0
  74. package/build/__tests__/behavioral/faking/FakingRoleEvents.test.js +140 -0
  75. package/build/__tests__/behavioral/faking/FakingSkillEvents.test.d.ts +24 -0
  76. package/build/__tests__/behavioral/faking/FakingSkillEvents.test.js +174 -0
  77. package/build/__tests__/behavioral/faking/UpdatePerson.test.d.ts +4 -0
  78. package/build/__tests__/behavioral/faking/UpdatePerson.test.js +32 -0
  79. package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.d.ts +35 -0
  80. package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.js +321 -0
  81. package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +4 -0
  82. package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +48 -0
  83. package/build/__tests__/behavioral/faking/WhoAmI.test.d.ts +19 -0
  84. package/build/__tests__/behavioral/faking/WhoAmI.test.js +103 -0
  85. package/build/__tests__/behavioral/maps/SpyingMapUtil.test.d.ts +10 -0
  86. package/build/__tests__/behavioral/maps/SpyingMapUtil.test.js +76 -0
  87. package/build/__tests__/behavioral/seeding/UsingDecorators.test.d.ts +37 -0
  88. package/build/__tests__/behavioral/seeding/UsingDecorators.test.js +266 -0
  89. package/build/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.d.ts +14 -0
  90. package/build/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +113 -0
  91. package/build/__tests__/behavioral/views/CheckingPermissions.test.d.ts +24 -0
  92. package/build/__tests__/behavioral/views/CheckingPermissions.test.js +162 -0
  93. package/build/__tests__/behavioral/views/FakingSkillViewControllers.test.d.ts +12 -0
  94. package/build/__tests__/behavioral/views/FakingSkillViewControllers.test.js +55 -0
  95. package/build/__tests__/behavioral/views/Routing.test.d.ts +31 -0
  96. package/build/__tests__/behavioral/views/Routing.test.js +141 -0
  97. package/build/__tests__/behavioral/views/TestingScope.test.d.ts +9 -0
  98. package/build/__tests__/behavioral/views/TestingScope.test.js +67 -0
  99. package/build/__tests__/behavioral/views/ViewFixture.test.d.ts +102 -0
  100. package/build/__tests__/behavioral/views/ViewFixture.test.js +652 -0
  101. package/build/__tests__/behavioral/views/WorkingWithTimezones.test.d.ts +11 -0
  102. package/build/__tests__/behavioral/views/WorkingWithTimezones.test.js +55 -0
  103. package/build/__tests__/support/AbstractFakeDecoratorTest.d.ts +5 -0
  104. package/build/__tests__/support/AbstractFakeDecoratorTest.js +27 -0
  105. package/build/__tests__/support/EventFaker.d.ts +5 -0
  106. package/build/__tests__/support/EventFaker.js +36 -0
  107. package/build/__tests__/support/FakeThemeManager.d.ts +8 -0
  108. package/build/__tests__/support/FakeThemeManager.js +40 -0
  109. package/build/__tests__/test.types.d.ts +2 -0
  110. package/build/__tests__/test.types.js +2 -0
  111. package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/.spruce/stores/stores.d.ts +5 -0
  112. package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/.spruce/stores/stores.js +9 -0
  113. package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.d.ts +51 -0
  114. package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js +33 -0
  115. package/build/__tests__/testDirsAndFiles/one-good-store-skill/src/.spruce/settings.json +6 -0
  116. package/build/__tests__/testDirsAndFiles/skill/build/.spruce/views/views.js +18 -0
  117. package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.d.ts +5 -0
  118. package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.js +11 -0
  119. package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.d.ts +7 -0
  120. package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.js +19 -0
  121. package/build/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.d.ts +8 -0
  122. package/build/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.js +31 -0
  123. package/build/__tests__/testDirsAndFiles/skill/package.json +5 -0
  124. package/build/__tests__/testDirsAndFiles/skill/src/.spruce/settings.json +6 -0
  125. package/build/__tests__/testDirsAndFiles/skill/src/.spruce/views/views.d.ts +7 -0
  126. package/build/__tests__/testDirsAndFiles/skill/src/.spruce/views/views.js +16 -0
  127. package/build/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.d.ts +5 -0
  128. package/build/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.js +11 -0
  129. package/build/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.d.ts +8 -0
  130. package/build/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.js +31 -0
  131. package/build/esm/__tests__/behavioral/CanUseStoresSetupInBeforeEach.test.d.ts +7 -0
  132. package/build/esm/__tests__/behavioral/CanUseStoresSetupInBeforeEach.test.js +53 -0
  133. package/build/esm/__tests__/behavioral/DatabaseFixture.test.d.ts +7 -0
  134. package/build/esm/__tests__/behavioral/DatabaseFixture.test.js +48 -0
  135. package/build/esm/__tests__/behavioral/DbResetsAsExpected.test.d.ts +5 -0
  136. package/build/esm/__tests__/behavioral/DbResetsAsExpected.test.js +28 -0
  137. package/build/esm/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.d.ts +15 -0
  138. package/build/esm/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +125 -0
  139. package/build/esm/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.d.ts +4 -0
  140. package/build/esm/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +40 -0
  141. package/build/esm/__tests__/behavioral/DisablingSchemaValidationOnTest.test.d.ts +5 -0
  142. package/build/esm/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +23 -0
  143. package/build/esm/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.d.ts +8 -0
  144. package/build/esm/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +76 -0
  145. package/build/esm/__tests__/behavioral/DummyStore.d.ts +55 -0
  146. package/build/esm/__tests__/behavioral/DummyStore.js +43 -0
  147. package/build/esm/__tests__/behavioral/FakingEventResponses.test.d.ts +12 -0
  148. package/build/esm/__tests__/behavioral/FakingEventResponses.test.js +147 -0
  149. package/build/esm/__tests__/behavioral/FixtureFactory.test.d.ts +7 -0
  150. package/build/esm/__tests__/behavioral/FixtureFactory.test.js +61 -0
  151. package/build/esm/__tests__/behavioral/LocationFixture.test.d.ts +15 -0
  152. package/build/esm/__tests__/behavioral/LocationFixture.test.js +153 -0
  153. package/build/esm/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.d.ts +12 -0
  154. package/build/esm/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +110 -0
  155. package/build/esm/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.d.ts +4 -0
  156. package/build/esm/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +38 -0
  157. package/build/esm/__tests__/behavioral/MercuryFixture.test.d.ts +19 -0
  158. package/build/esm/__tests__/behavioral/MercuryFixture.test.js +209 -0
  159. package/build/esm/__tests__/behavioral/OrganizationFixture.test.d.ts +31 -0
  160. package/build/esm/__tests__/behavioral/OrganizationFixture.test.js +387 -0
  161. package/build/esm/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.d.ts +4 -0
  162. package/build/esm/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +18 -0
  163. package/build/esm/__tests__/behavioral/PersonFixture.test.d.ts +22 -0
  164. package/build/esm/__tests__/behavioral/PersonFixture.test.js +231 -0
  165. package/build/esm/__tests__/behavioral/PhoneNumberIncrementor.test.d.ts +11 -0
  166. package/build/esm/__tests__/behavioral/PhoneNumberIncrementor.test.js +112 -0
  167. package/build/esm/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.d.ts +8 -0
  168. package/build/esm/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +80 -0
  169. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.d.ts +5 -0
  170. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +51 -0
  171. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.d.ts +7 -0
  172. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +59 -0
  173. package/build/esm/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.d.ts +10 -0
  174. package/build/esm/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +139 -0
  175. package/build/esm/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.d.ts +7 -0
  176. package/build/esm/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +57 -0
  177. package/build/esm/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.d.ts +6 -0
  178. package/build/esm/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +48 -0
  179. package/build/esm/__tests__/behavioral/RoleFixture.test.d.ts +15 -0
  180. package/build/esm/__tests__/behavioral/RoleFixture.test.js +143 -0
  181. package/build/esm/__tests__/behavioral/SeedingData.test.d.ts +24 -0
  182. package/build/esm/__tests__/behavioral/SeedingData.test.js +314 -0
  183. package/build/esm/__tests__/behavioral/SkillFixture.test.d.ts +13 -0
  184. package/build/esm/__tests__/behavioral/SkillFixture.test.js +139 -0
  185. package/build/esm/__tests__/behavioral/StoreFixture.test.d.ts +23 -0
  186. package/build/esm/__tests__/behavioral/StoreFixture.test.js +164 -0
  187. package/build/esm/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.d.ts +9 -0
  188. package/build/esm/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +87 -0
  189. package/build/esm/__tests__/behavioral/faking/FakeDecorator.test.d.ts +45 -0
  190. package/build/esm/__tests__/behavioral/faking/FakeDecorator.test.js +479 -0
  191. package/build/esm/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.d.ts +4 -0
  192. package/build/esm/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +28 -0
  193. package/build/esm/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.d.ts +4 -0
  194. package/build/esm/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +32 -0
  195. package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +8 -0
  196. package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.js +82 -0
  197. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.d.ts +8 -0
  198. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +70 -0
  199. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.d.ts +14 -0
  200. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +165 -0
  201. package/build/esm/__tests__/behavioral/faking/FakingInBeforeEach.test.d.ts +6 -0
  202. package/build/esm/__tests__/behavioral/faking/FakingInBeforeEach.test.js +55 -0
  203. package/build/esm/__tests__/behavioral/faking/FakingRoleEvents.test.d.ts +19 -0
  204. package/build/esm/__tests__/behavioral/faking/FakingRoleEvents.test.js +175 -0
  205. package/build/esm/__tests__/behavioral/faking/FakingSkillEvents.test.d.ts +24 -0
  206. package/build/esm/__tests__/behavioral/faking/FakingSkillEvents.test.js +214 -0
  207. package/build/esm/__tests__/behavioral/faking/UpdatePerson.test.d.ts +4 -0
  208. package/build/esm/__tests__/behavioral/faking/UpdatePerson.test.js +38 -0
  209. package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.d.ts +35 -0
  210. package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.js +360 -0
  211. package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +4 -0
  212. package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +31 -0
  213. package/build/esm/__tests__/behavioral/faking/WhoAmI.test.d.ts +19 -0
  214. package/build/esm/__tests__/behavioral/faking/WhoAmI.test.js +140 -0
  215. package/build/esm/__tests__/behavioral/maps/SpyingMapUtil.test.d.ts +10 -0
  216. package/build/esm/__tests__/behavioral/maps/SpyingMapUtil.test.js +94 -0
  217. package/build/esm/__tests__/behavioral/seeding/UsingDecorators.test.d.ts +37 -0
  218. package/build/esm/__tests__/behavioral/seeding/UsingDecorators.test.js +322 -0
  219. package/build/esm/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.d.ts +14 -0
  220. package/build/esm/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +134 -0
  221. package/build/esm/__tests__/behavioral/views/CheckingPermissions.test.d.ts +24 -0
  222. package/build/esm/__tests__/behavioral/views/CheckingPermissions.test.js +200 -0
  223. package/build/esm/__tests__/behavioral/views/FakingSkillViewControllers.test.d.ts +12 -0
  224. package/build/esm/__tests__/behavioral/views/FakingSkillViewControllers.test.js +69 -0
  225. package/build/esm/__tests__/behavioral/views/Routing.test.d.ts +31 -0
  226. package/build/esm/__tests__/behavioral/views/Routing.test.js +169 -0
  227. package/build/esm/__tests__/behavioral/views/TestingScope.test.d.ts +9 -0
  228. package/build/esm/__tests__/behavioral/views/TestingScope.test.js +84 -0
  229. package/build/esm/__tests__/behavioral/views/ViewFixture.test.d.ts +102 -0
  230. package/build/esm/__tests__/behavioral/views/ViewFixture.test.js +731 -0
  231. package/build/esm/__tests__/behavioral/views/WorkingWithTimezones.test.d.ts +11 -0
  232. package/build/esm/__tests__/behavioral/views/WorkingWithTimezones.test.js +63 -0
  233. package/build/esm/__tests__/support/AbstractFakeDecoratorTest.d.ts +5 -0
  234. package/build/esm/__tests__/support/AbstractFakeDecoratorTest.js +34 -0
  235. package/build/esm/__tests__/support/EventFaker.d.ts +5 -0
  236. package/build/esm/__tests__/support/EventFaker.js +45 -0
  237. package/build/esm/__tests__/support/FakeThemeManager.d.ts +8 -0
  238. package/build/esm/__tests__/support/FakeThemeManager.js +37 -0
  239. package/build/esm/__tests__/test.types.d.ts +2 -0
  240. package/build/esm/__tests__/test.types.js +1 -0
  241. package/build/esm/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.d.ts +51 -0
  242. package/build/esm/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js +41 -0
  243. package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.d.ts +5 -0
  244. package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.js +8 -0
  245. package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.d.ts +7 -0
  246. package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.js +27 -0
  247. package/build/esm/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.d.ts +8 -0
  248. package/build/esm/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.js +25 -0
  249. package/build/esm/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.d.ts +5 -0
  250. package/build/esm/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.js +8 -0
  251. package/build/esm/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.d.ts +8 -0
  252. package/build/esm/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.js +25 -0
  253. package/build/esm/index.d.ts +1 -0
  254. package/build/esm/index.js +1 -0
  255. package/build/esm/tests/fixtures/ViewFixture.d.ts +1 -0
  256. package/build/esm/tests/fixtures/ViewFixture.js +4 -1
  257. package/build/esm/tests/routers/TestRouter.d.ts +3 -0
  258. package/build/esm/tests/routers/TestRouter.js +6 -0
  259. package/build/esm/utilities/vcDisk.utility.js +1 -0
  260. package/build/index.d.ts +1 -0
  261. package/build/index.js +3 -1
  262. package/build/tests/fixtures/ViewFixture.d.ts +1 -0
  263. package/build/tests/fixtures/ViewFixture.js +4 -1
  264. package/build/tests/routers/TestRouter.d.ts +3 -0
  265. package/build/tests/routers/TestRouter.js +6 -0
  266. package/build/utilities/vcDisk.utility.js +1 -0
  267. package/package.json +19 -19
@@ -0,0 +1,31 @@
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
+ private static assertRedirects;
31
+ }
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ /* eslint-disable spruce/prohibit-import-from-build-folder */
13
+ const calendar_utils_1 = require("@sprucelabs/calendar-utils");
14
+ const heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
15
+ const spruce_skill_utils_1 = require("@sprucelabs/spruce-skill-utils");
16
+ const test_1 = require("@sprucelabs/test");
17
+ const test_utils_1 = require("@sprucelabs/test-utils");
18
+ const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
19
+ const Fake_svc_1 = __importDefault(require("../../../tests/Fake.svc"));
20
+ const TestRouter_1 = __importDefault(require("../../../tests/routers/TestRouter"));
21
+ const SpyAuthorizer_1 = __importDefault(require("../../../tests/SpyAuthorizer"));
22
+ const Book_svc_1 = __importDefault(require("../../testDirsAndFiles/skill/build/skillViewControllers/Book.svc"));
23
+ const Spy_svc_1 = __importDefault(require("../../testDirsAndFiles/skill/build/skillViewControllers/Spy.svc"));
24
+ class RoutingTest extends AbstractSpruceFixtureTest_1.default {
25
+ static async beforeEach() {
26
+ await super.beforeEach();
27
+ const fixture = this.Fixture('view', { vcDir: this.vcDir });
28
+ this.router = fixture.getRouter();
29
+ this.factory = fixture.getFactory();
30
+ }
31
+ static async throwsWithBadDestination() {
32
+ const err = await test_1.assert.doesThrowAsync(() =>
33
+ //@ts-ignore
34
+ this.assertRedirects(() => this.router.redirect('waka.waka')));
35
+ test_utils_1.errorAssert.assertError(err, 'INVALID_VIEW_CONTROLLER_NAME', {
36
+ name: 'waka.waka',
37
+ });
38
+ }
39
+ static async getPresentVcIsEmptyToStart() {
40
+ test_1.assert.isFalsy(this.router.getPresentVc());
41
+ }
42
+ static async canRedirectToGoodSvcWithoutNamespace(id, Vc) {
43
+ await this.assertRedirects(() => this.router.redirect(id, {}));
44
+ const vc = this.router.getPresentVc();
45
+ test_1.assert.isTrue(vc instanceof Vc);
46
+ }
47
+ static async redirectTriggersLoadWithExpectedItems(args) {
48
+ TestRouter_1.default.setShouldLoadDestinationVc(false);
49
+ //@ts-ignore
50
+ const vc = await this.assertRedirects(() => this.router.redirect('spruceTestFixtures.spy', args));
51
+ const lastLoad = vc.loads.pop();
52
+ test_1.assert.isFalsy(lastLoad);
53
+ }
54
+ static async redirectByDefaultDoesNotLoadWithExpectedItems(args) {
55
+ //@ts-ignore
56
+ const vc = await this.assertRedirects(() => this.router.redirect('spruceTestFixtures.spy', args));
57
+ const lastLoad = vc.loads.pop();
58
+ test_1.assert.isFalsy(lastLoad);
59
+ }
60
+ static async canHookIntoRedirectEvents(expectedArgs) {
61
+ let wasHit = false;
62
+ let passedId = '';
63
+ let passedVc = null;
64
+ let passedArgs = null;
65
+ await this.router.on('did-redirect', ({ id, vc, args }) => {
66
+ wasHit = true;
67
+ passedId = id;
68
+ passedVc = vc;
69
+ passedArgs = args;
70
+ });
71
+ await this.assertRedirects(() => this.router.redirect('spruceTestFixtures.book', expectedArgs));
72
+ test_1.assert.isTrue(wasHit);
73
+ test_1.assert.isEqual(passedId, 'spruceTestFixtures.book');
74
+ test_1.assert.isTruthy(passedVc);
75
+ test_1.assert.isTrue(passedVc instanceof Book_svc_1.default);
76
+ test_1.assert.isEqualDeep(passedArgs, expectedArgs);
77
+ }
78
+ static async canFakeRedirectToHeartwoodRoot() {
79
+ const svc = await this.assertRedirects(() => this.router.redirect('heartwood.root'));
80
+ test_1.assert.isTrue(svc instanceof Fake_svc_1.default);
81
+ }
82
+ static async canSuppressBadControllerIdOnRedirect() {
83
+ TestRouter_1.default.setShouldThrowWhenRedirectingToBadSvc(false);
84
+ const id = `${new Date().getTime()}.root`;
85
+ //@ts-ignore
86
+ this.factory.setController(id, null);
87
+ await this.assertRedirects(() => this.router.redirect(id));
88
+ }
89
+ static async shouldThrowWithBadSvcBecauseTestRouterIsReset() {
90
+ await test_1.assert.doesThrowAsync(() =>
91
+ //@ts-ignore
92
+ this.router.redirect('waka.waka'));
93
+ }
94
+ static testRouterBuildsOptionsWithLocaleAndAuthorizer() {
95
+ const options = this.router.buildLoadOptions();
96
+ test_1.assert.isTrue(options.locale instanceof calendar_utils_1.LocaleImpl);
97
+ test_1.assert.isTrue(options.authorizer instanceof SpyAuthorizer_1.default);
98
+ }
99
+ static async assertRedirects(action) {
100
+ return heartwood_view_controllers_1.vcAssert.assertActionRedirects({
101
+ action,
102
+ router: this.router,
103
+ });
104
+ }
105
+ }
106
+ RoutingTest.vcDir = spruce_skill_utils_1.diskUtil.resolvePath(__dirname, '..', '..', 'testDirsAndFiles', 'skill', 'build');
107
+ __decorate([
108
+ (0, test_1.test)()
109
+ ], RoutingTest, "throwsWithBadDestination", null);
110
+ __decorate([
111
+ (0, test_1.test)()
112
+ ], RoutingTest, "getPresentVcIsEmptyToStart", null);
113
+ __decorate([
114
+ (0, test_1.test)('can get book svc', 'spruceTestFixtures.book', Book_svc_1.default),
115
+ (0, test_1.test)('can get spy svc', 'spruceTestFixtures.spy', Spy_svc_1.default)
116
+ ], RoutingTest, "canRedirectToGoodSvcWithoutNamespace", null);
117
+ __decorate([
118
+ (0, test_1.test)('redirect calls load on destination vc if set 1', { hey: 'there' }),
119
+ (0, test_1.test)('redirect calls load on destination vc if set 2', { what: 'the!?' })
120
+ ], RoutingTest, "redirectTriggersLoadWithExpectedItems", null);
121
+ __decorate([
122
+ (0, test_1.test)('redirect does not call load on destination vc 1', { hey: 'there' }),
123
+ (0, test_1.test)('redirect does not call load on destination vc 2', { what: 'the!?' })
124
+ ], RoutingTest, "redirectByDefaultDoesNotLoadWithExpectedItems", null);
125
+ __decorate([
126
+ (0, test_1.test)('can hook into redirect no args', undefined),
127
+ (0, test_1.test)('can hook into redirect args 1', { taco: 'bell' })
128
+ ], RoutingTest, "canHookIntoRedirectEvents", null);
129
+ __decorate([
130
+ (0, test_1.test)()
131
+ ], RoutingTest, "canFakeRedirectToHeartwoodRoot", null);
132
+ __decorate([
133
+ (0, test_1.test)()
134
+ ], RoutingTest, "canSuppressBadControllerIdOnRedirect", null);
135
+ __decorate([
136
+ (0, test_1.test)()
137
+ ], RoutingTest, "shouldThrowWithBadSvcBecauseTestRouterIsReset", null);
138
+ __decorate([
139
+ (0, test_1.test)()
140
+ ], RoutingTest, "testRouterBuildsOptionsWithLocaleAndAuthorizer", null);
141
+ exports.default = RoutingTest;
@@ -0,0 +1,9 @@
1
+ import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
2
+ export default class TestingScopeTest extends AbstractSpruceFixtureTest {
3
+ private static scope;
4
+ protected static beforeEach(): Promise<void>;
5
+ protected static canResetScope(): Promise<void>;
6
+ protected static canSetCurrentOrgToNull(): Promise<void>;
7
+ protected static canSetCurrentLocationToNull(): Promise<void>;
8
+ protected static clearsLocationIdWhenSettingOrgId(): Promise<void>;
9
+ }
@@ -0,0 +1,67 @@
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_1 = require("@sprucelabs/test");
13
+ const AbstractSpruceFixtureTest_1 = __importDefault(require("../../../tests/AbstractSpruceFixtureTest"));
14
+ const constants_1 = require("../../../tests/constants");
15
+ const login_1 = __importDefault(require("../../../tests/decorators/login"));
16
+ const seed_1 = __importDefault(require("../../../tests/decorators/seed"));
17
+ let TestingScopeTest = class TestingScopeTest extends AbstractSpruceFixtureTest_1.default {
18
+ static async beforeEach() {
19
+ await super.beforeEach();
20
+ this.scope = this.views.getScope();
21
+ }
22
+ static async canResetScope() {
23
+ await this.seeder.resetAccount();
24
+ this.scope.setCurrentLocation('aoeu');
25
+ this.scope.setCurrentOrganization('aoeu');
26
+ this.scope.clearSession();
27
+ const location = await this.scope.getCurrentLocation();
28
+ test_1.assert.isFalsy(location);
29
+ }
30
+ static async canSetCurrentOrgToNull() {
31
+ this.scope.setCurrentOrganization(null);
32
+ const org = await this.scope.getCurrentOrganization();
33
+ test_1.assert.isNull(org);
34
+ }
35
+ static async canSetCurrentLocationToNull() {
36
+ this.scope.setCurrentLocation(null);
37
+ const org = await this.organizations.getNewestOrganization();
38
+ test_1.assert.isTruthy(org);
39
+ const location = await this.scope.getCurrentLocation();
40
+ test_1.assert.isNull(location);
41
+ }
42
+ static async clearsLocationIdWhenSettingOrgId() {
43
+ this.scope.setCurrentLocation('aoeu');
44
+ this.scope.setCurrentOrganization('aoeu');
45
+ //@ts-ignore
46
+ test_1.assert.isFalsy(this.scope.currentLocationId);
47
+ }
48
+ };
49
+ __decorate([
50
+ (0, test_1.test)()
51
+ ], TestingScopeTest, "canResetScope", null);
52
+ __decorate([
53
+ (0, test_1.test)(),
54
+ (0, seed_1.default)('organizations', 1)
55
+ ], TestingScopeTest, "canSetCurrentOrgToNull", null);
56
+ __decorate([
57
+ (0, test_1.test)(),
58
+ (0, seed_1.default)('organizations', 1),
59
+ (0, seed_1.default)('locations', 1)
60
+ ], TestingScopeTest, "canSetCurrentLocationToNull", null);
61
+ __decorate([
62
+ (0, test_1.test)()
63
+ ], TestingScopeTest, "clearsLocationIdWhenSettingOrgId", null);
64
+ TestingScopeTest = __decorate([
65
+ (0, login_1.default)(constants_1.DEMO_NUMBER_SCOPE)
66
+ ], TestingScopeTest);
67
+ exports.default = TestingScopeTest;
@@ -0,0 +1,102 @@
1
+ import { AbstractSkillViewController, SkillViewControllerLoadOptions, SpruceSchemas } from '@sprucelabs/heartwood-view-controllers';
2
+ import AbstractSpruceFixtureTest from '../../../tests/AbstractSpruceFixtureTest';
3
+ export default class ViewFixtureTest extends AbstractSpruceFixtureTest {
4
+ private static fixture;
5
+ private static fixtureNoOptions;
6
+ private static eventFaker;
7
+ protected static beforeEach(): Promise<void>;
8
+ protected static canLogin(): Promise<void>;
9
+ protected static loginFallsBackToDemoNumber(): Promise<void>;
10
+ protected static canSetHeartwoodRoot(): Promise<void>;
11
+ protected static fixturesShouldShareConnectToApiReferences(): void;
12
+ protected static canPassThroughPersonFixture(): void;
13
+ protected static feedsInScope(): Promise<void>;
14
+ protected static scopeCanGetAndSetOrganization(): Promise<void>;
15
+ protected static scopeGetsLastOrgByDefault(): Promise<void>;
16
+ protected static scopeGetsLastLocationByDefault(): Promise<void>;
17
+ protected static scopeCanGetAndSetLocation(): Promise<void>;
18
+ protected static sharesPersonFixture(): Promise<void>;
19
+ protected static canSetScopeForCurrentOrganizationAcrossViewFixtures(): Promise<void>;
20
+ protected static scopeShouldBeResetEachRun(): Promise<void>;
21
+ protected static fixturesShareVcFactory(): void;
22
+ protected static mixesInControllerMapWithLocalViews(): Promise<void>;
23
+ protected static fixturesContinueToMixinViewControllers(): void;
24
+ protected static fixtureAttachesRenderCount(): void;
25
+ protected static fixturePatchesAlertToThrow(): Promise<void>;
26
+ protected static fixturePatchesRenderInDialogToThrow(): void;
27
+ protected static testRouterThrowsOnRedirect(): Promise<void>;
28
+ protected static canGetAuthenticatorInstance(): void;
29
+ protected static activeRecordThrowsByDefault(): void;
30
+ protected static activeRecordThrowReset(): void;
31
+ protected static patchesFormsToThrow(): Promise<void>;
32
+ protected static loggingInWithViewFixtureSetsProxyTokenForSkill(): Promise<void>;
33
+ protected static proxyGeneratorIsResetWhenDifferentPersonLogsIn(): Promise<void>;
34
+ protected static sameProxyAcrossFixturesWithSameNumber(): Promise<void>;
35
+ protected static generatorResetEachTest(): Promise<void>;
36
+ protected static loggingInAsViewSetsClientForViewControllers(): Promise<void>;
37
+ protected static viewClientIsResetAfterEachTest(): void;
38
+ protected static generatorIsNotVulnerableToRaceConditions(): Promise<void>;
39
+ protected static patchesConfirmToThrow(): Promise<void>;
40
+ protected static setsSwipeVcJumpToSlideDuration(): Promise<void>;
41
+ protected static canSetScope(): void;
42
+ protected static loadingAScopedToOrgVcWithoutASeededOrgThrows(): Promise<void>;
43
+ protected static loadingAScopedToLocationVcWithoutASeededLocationThrows(): Promise<void>;
44
+ protected static loadingWithOrgScopeAndSeededOrg(): Promise<void>;
45
+ protected static loadingWithLocationScopeAndSeededLocation(): Promise<void>;
46
+ protected static setsFactoryToFormAssert(): Promise<void>;
47
+ protected static canSetMercuryClient(): Promise<void>;
48
+ protected static loadOptionsComeWithFakeThemeManager(): Promise<void>;
49
+ protected static sameFakeThemeEachTime(): Promise<void>;
50
+ protected static sameThemesOnFixture(): Promise<void>;
51
+ private static buildLoadOptions;
52
+ private static ScopedByOrgVc;
53
+ private static ScopedByLocationVc;
54
+ protected static loginAsDemoPerson(): Promise<import("@sprucelabs/mercury-types").MercuryEventEmitter<import("@sprucelabs/mercury-types").SkillEventContract> & {
55
+ disconnect: () => Promise<void>;
56
+ isConnected: () => boolean;
57
+ getProxyToken: () => string | null;
58
+ setProxyToken: (token: string) => void;
59
+ registerProxyToken: () => Promise<string>;
60
+ setShouldAutoRegisterListeners: (should: boolean) => void;
61
+ isAuthenticated(): boolean;
62
+ getIsTestClient(): boolean;
63
+ authenticate(options: {
64
+ skillId?: string | undefined;
65
+ apiKey?: string | undefined;
66
+ token?: string | undefined;
67
+ }): Promise<{
68
+ skill?: SpruceSchemas.Spruce.v2020_07_22.Skill | undefined;
69
+ person?: SpruceSchemas.Spruce.v2020_07_22.Person | undefined;
70
+ }>;
71
+ }>;
72
+ private static loginAndGetProxy;
73
+ private static getProxyGenerator;
74
+ private static Scope;
75
+ private static MockVc;
76
+ private static get router();
77
+ }
78
+ declare module '@sprucelabs/heartwood-view-controllers/build/types/heartwood.types' {
79
+ interface ViewControllerMap {
80
+ scope: ScopeSvc;
81
+ client: ClientSvc;
82
+ }
83
+ }
84
+ interface Args {
85
+ hello?: string;
86
+ world?: number;
87
+ }
88
+ declare class ScopeSvc extends AbstractSkillViewController<Args> {
89
+ loadOptions: SkillViewControllerLoadOptions | null;
90
+ load(options: SkillViewControllerLoadOptions<Args>): Promise<void>;
91
+ render(): {
92
+ layouts: never[];
93
+ };
94
+ }
95
+ declare class ClientSvc extends AbstractSkillViewController {
96
+ loadOptions: SkillViewControllerLoadOptions | null;
97
+ connect(): Promise<import("@sprucelabs/heartwood-view-controllers").Client>;
98
+ render(): {
99
+ layouts: never[];
100
+ };
101
+ }
102
+ export {};