@sprucelabs/spruce-test-fixtures 62.2.23 → 62.2.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (281) hide show
  1. package/package.json +19 -19
  2. package/build/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.d.ts +0 -15
  3. package/build/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +0 -112
  4. package/build/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.d.ts +0 -4
  5. package/build/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +0 -34
  6. package/build/__tests__/behavioral/DisablingSchemaValidationOnTest.test.d.ts +0 -5
  7. package/build/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +0 -26
  8. package/build/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.d.ts +0 -8
  9. package/build/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +0 -69
  10. package/build/__tests__/behavioral/FakingEventResponses.test.d.ts +0 -12
  11. package/build/__tests__/behavioral/FakingEventResponses.test.js +0 -126
  12. package/build/__tests__/behavioral/FixtureFactory.test.d.ts +0 -7
  13. package/build/__tests__/behavioral/FixtureFactory.test.js +0 -79
  14. package/build/__tests__/behavioral/LocationFixture.test.d.ts +0 -17
  15. package/build/__tests__/behavioral/LocationFixture.test.js +0 -144
  16. package/build/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.d.ts +0 -12
  17. package/build/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +0 -95
  18. package/build/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.d.ts +0 -4
  19. package/build/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +0 -35
  20. package/build/__tests__/behavioral/MercuryFixture.test.d.ts +0 -20
  21. package/build/__tests__/behavioral/MercuryFixture.test.js +0 -187
  22. package/build/__tests__/behavioral/OrganizationFixture.test.d.ts +0 -31
  23. package/build/__tests__/behavioral/OrganizationFixture.test.js +0 -333
  24. package/build/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.d.ts +0 -4
  25. package/build/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +0 -21
  26. package/build/__tests__/behavioral/PersonFixture.test.d.ts +0 -22
  27. package/build/__tests__/behavioral/PersonFixture.test.js +0 -225
  28. package/build/__tests__/behavioral/PhoneNumberIncrementor.test.d.ts +0 -11
  29. package/build/__tests__/behavioral/PhoneNumberIncrementor.test.js +0 -95
  30. package/build/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.d.ts +0 -8
  31. package/build/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +0 -67
  32. package/build/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.d.ts +0 -5
  33. package/build/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +0 -44
  34. package/build/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.d.ts +0 -8
  35. package/build/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +0 -55
  36. package/build/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.d.ts +0 -10
  37. package/build/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +0 -137
  38. package/build/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.d.ts +0 -7
  39. package/build/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +0 -54
  40. package/build/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.d.ts +0 -6
  41. package/build/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +0 -40
  42. package/build/__tests__/behavioral/RoleFixture.test.d.ts +0 -15
  43. package/build/__tests__/behavioral/RoleFixture.test.js +0 -118
  44. package/build/__tests__/behavioral/SkillFixture.test.d.ts +0 -13
  45. package/build/__tests__/behavioral/SkillFixture.test.js +0 -118
  46. package/build/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.d.ts +0 -7
  47. package/build/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.js +0 -41
  48. package/build/__tests__/behavioral/databases/DatabaseFixture.test.d.ts +0 -7
  49. package/build/__tests__/behavioral/databases/DatabaseFixture.test.js +0 -59
  50. package/build/__tests__/behavioral/databases/DbResetsAsExpected.test.d.ts +0 -5
  51. package/build/__tests__/behavioral/databases/DbResetsAsExpected.test.js +0 -34
  52. package/build/__tests__/behavioral/databases/DummyStore.d.ts +0 -55
  53. package/build/__tests__/behavioral/databases/DummyStore.js +0 -36
  54. package/build/__tests__/behavioral/databases/StoreFixture.test.d.ts +0 -23
  55. package/build/__tests__/behavioral/databases/StoreFixture.test.js +0 -156
  56. package/build/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.d.ts +0 -9
  57. package/build/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +0 -73
  58. package/build/__tests__/behavioral/faking/FakeDecorator.test.d.ts +0 -45
  59. package/build/__tests__/behavioral/faking/FakeDecorator.test.js +0 -421
  60. package/build/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.d.ts +0 -4
  61. package/build/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +0 -23
  62. package/build/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.d.ts +0 -4
  63. package/build/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +0 -27
  64. package/build/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +0 -8
  65. package/build/__tests__/behavioral/faking/FakeThemeManager.test.js +0 -93
  66. package/build/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.d.ts +0 -8
  67. package/build/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +0 -56
  68. package/build/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.d.ts +0 -14
  69. package/build/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +0 -141
  70. package/build/__tests__/behavioral/faking/FakingAuthenticator.test.d.ts +0 -5
  71. package/build/__tests__/behavioral/faking/FakingAuthenticator.test.js +0 -35
  72. package/build/__tests__/behavioral/faking/FakingInBeforeEach.test.d.ts +0 -6
  73. package/build/__tests__/behavioral/faking/FakingInBeforeEach.test.js +0 -42
  74. package/build/__tests__/behavioral/faking/FakingLocations.test.d.ts +0 -6
  75. package/build/__tests__/behavioral/faking/FakingLocations.test.js +0 -45
  76. package/build/__tests__/behavioral/faking/FakingRoleEvents.test.d.ts +0 -19
  77. package/build/__tests__/behavioral/faking/FakingRoleEvents.test.js +0 -140
  78. package/build/__tests__/behavioral/faking/FakingSkillEvents.test.d.ts +0 -24
  79. package/build/__tests__/behavioral/faking/FakingSkillEvents.test.js +0 -174
  80. package/build/__tests__/behavioral/faking/UpdatePerson.test.d.ts +0 -4
  81. package/build/__tests__/behavioral/faking/UpdatePerson.test.js +0 -32
  82. package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.d.ts +0 -35
  83. package/build/__tests__/behavioral/faking/UsingFakeDecorators.test.js +0 -321
  84. package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +0 -4
  85. package/build/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +0 -48
  86. package/build/__tests__/behavioral/faking/WhoAmI.test.d.ts +0 -19
  87. package/build/__tests__/behavioral/faking/WhoAmI.test.js +0 -105
  88. package/build/__tests__/behavioral/maps/SpyingMapUtil.test.d.ts +0 -10
  89. package/build/__tests__/behavioral/maps/SpyingMapUtil.test.js +0 -76
  90. package/build/__tests__/behavioral/permissions/FakeAuthorizer.test.d.ts +0 -34
  91. package/build/__tests__/behavioral/permissions/FakeAuthorizer.test.js +0 -272
  92. package/build/__tests__/behavioral/permissions/PermissionFixture.test.d.ts +0 -5
  93. package/build/__tests__/behavioral/permissions/PermissionFixture.test.js +0 -35
  94. package/build/__tests__/behavioral/seeding/SeedingData.test.d.ts +0 -24
  95. package/build/__tests__/behavioral/seeding/SeedingData.test.js +0 -271
  96. package/build/__tests__/behavioral/seeding/UsingDecorators.test.d.ts +0 -37
  97. package/build/__tests__/behavioral/seeding/UsingDecorators.test.js +0 -266
  98. package/build/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.d.ts +0 -14
  99. package/build/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +0 -117
  100. package/build/__tests__/behavioral/views/FakingSkillViewControllers.test.d.ts +0 -12
  101. package/build/__tests__/behavioral/views/FakingSkillViewControllers.test.js +0 -55
  102. package/build/__tests__/behavioral/views/Routing.test.d.ts +0 -36
  103. package/build/__tests__/behavioral/views/Routing.test.js +0 -177
  104. package/build/__tests__/behavioral/views/TestingScope.test.d.ts +0 -24
  105. package/build/__tests__/behavioral/views/TestingScope.test.js +0 -197
  106. package/build/__tests__/behavioral/views/ViewPlugins.test.d.ts +0 -12
  107. package/build/__tests__/behavioral/views/ViewPlugins.test.js +0 -83
  108. package/build/__tests__/behavioral/views/WorkingWithTimezones.test.d.ts +0 -11
  109. package/build/__tests__/behavioral/views/WorkingWithTimezones.test.js +0 -55
  110. package/build/__tests__/behavioral/views/viewFixture/ViewFixture.test.d.ts +0 -118
  111. package/build/__tests__/behavioral/views/viewFixture/ViewFixture.test.js +0 -761
  112. package/build/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.d.ts +0 -5
  113. package/build/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.js +0 -29
  114. package/build/__tests__/support/AbstractFakeDecoratorTest.d.ts +0 -5
  115. package/build/__tests__/support/AbstractFakeDecoratorTest.js +0 -27
  116. package/build/__tests__/support/EventFaker.d.ts +0 -5
  117. package/build/__tests__/support/EventFaker.js +0 -36
  118. package/build/__tests__/support/FakeThemeManager.d.ts +0 -8
  119. package/build/__tests__/support/FakeThemeManager.js +0 -40
  120. package/build/__tests__/support/RandomViewPlugin.d.ts +0 -2
  121. package/build/__tests__/support/RandomViewPlugin.js +0 -5
  122. package/build/__tests__/support/RandomViewPlugin2.d.ts +0 -2
  123. package/build/__tests__/support/RandomViewPlugin2.js +0 -5
  124. package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/.spruce/stores/stores.d.ts +0 -5
  125. package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/.spruce/stores/stores.js +0 -9
  126. package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.d.ts +0 -51
  127. package/build/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js +0 -33
  128. package/build/__tests__/testDirsAndFiles/one-good-store-skill/src/.spruce/settings.json +0 -6
  129. package/build/__tests__/testDirsAndFiles/plugins1/build/.spruce/views/views.d.ts +0 -6
  130. package/build/__tests__/testDirsAndFiles/plugins1/build/.spruce/views/views.js +0 -11
  131. package/build/__tests__/testDirsAndFiles/plugins2/build/.spruce/views/views.d.ts +0 -6
  132. package/build/__tests__/testDirsAndFiles/plugins2/build/.spruce/views/views.js +0 -11
  133. package/build/__tests__/testDirsAndFiles/skill/build/.spruce/views/views.js +0 -18
  134. package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.d.ts +0 -5
  135. package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.js +0 -11
  136. package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.d.ts +0 -7
  137. package/build/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.js +0 -19
  138. package/build/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.d.ts +0 -8
  139. package/build/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.js +0 -31
  140. package/build/__tests__/testDirsAndFiles/skill/package.json +0 -5
  141. package/build/__tests__/testDirsAndFiles/skill/src/.spruce/settings.json +0 -6
  142. package/build/__tests__/testDirsAndFiles/skill/src/.spruce/views/views.d.ts +0 -7
  143. package/build/__tests__/testDirsAndFiles/skill/src/.spruce/views/views.js +0 -17
  144. package/build/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.d.ts +0 -5
  145. package/build/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.js +0 -11
  146. package/build/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.d.ts +0 -8
  147. package/build/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.js +0 -31
  148. package/build/esm/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.d.ts +0 -15
  149. package/build/esm/__tests__/behavioral/DecoratoringEmitToPassThroughProxy.test.js +0 -128
  150. package/build/esm/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.d.ts +0 -4
  151. package/build/esm/__tests__/behavioral/DelaysConnectWhenOnlyUsingLoginDecorator.test.js +0 -40
  152. package/build/esm/__tests__/behavioral/DisablingSchemaValidationOnTest.test.d.ts +0 -5
  153. package/build/esm/__tests__/behavioral/DisablingSchemaValidationOnTest.test.js +0 -23
  154. package/build/esm/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.d.ts +0 -8
  155. package/build/esm/__tests__/behavioral/DoesntResetAccountIfOnlySeedingLocally.test.js +0 -80
  156. package/build/esm/__tests__/behavioral/FakingEventResponses.test.d.ts +0 -12
  157. package/build/esm/__tests__/behavioral/FakingEventResponses.test.js +0 -148
  158. package/build/esm/__tests__/behavioral/FixtureFactory.test.d.ts +0 -7
  159. package/build/esm/__tests__/behavioral/FixtureFactory.test.js +0 -61
  160. package/build/esm/__tests__/behavioral/LocationFixture.test.d.ts +0 -17
  161. package/build/esm/__tests__/behavioral/LocationFixture.test.js +0 -173
  162. package/build/esm/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.d.ts +0 -12
  163. package/build/esm/__tests__/behavioral/LoginDecoratorHandlingProxiesForMe.test.js +0 -113
  164. package/build/esm/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.d.ts +0 -4
  165. package/build/esm/__tests__/behavioral/MakingSureLocalEventsAreHandledLocally.test.js +0 -41
  166. package/build/esm/__tests__/behavioral/MercuryFixture.test.d.ts +0 -20
  167. package/build/esm/__tests__/behavioral/MercuryFixture.test.js +0 -223
  168. package/build/esm/__tests__/behavioral/OrganizationFixture.test.d.ts +0 -31
  169. package/build/esm/__tests__/behavioral/OrganizationFixture.test.js +0 -389
  170. package/build/esm/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.d.ts +0 -4
  171. package/build/esm/__tests__/behavioral/PatchingConsoleErrorToErrorStream.test.js +0 -18
  172. package/build/esm/__tests__/behavioral/PersonFixture.test.d.ts +0 -22
  173. package/build/esm/__tests__/behavioral/PersonFixture.test.js +0 -232
  174. package/build/esm/__tests__/behavioral/PhoneNumberIncrementor.test.d.ts +0 -11
  175. package/build/esm/__tests__/behavioral/PhoneNumberIncrementor.test.js +0 -112
  176. package/build/esm/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.d.ts +0 -8
  177. package/build/esm/__tests__/behavioral/ResettingAccountLocationsInBeforeAll.test.js +0 -84
  178. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.d.ts +0 -5
  179. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInAfterAll.test.js +0 -55
  180. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.d.ts +0 -8
  181. package/build/esm/__tests__/behavioral/ResettingAccountOrgsInBeforeAll.test.js +0 -72
  182. package/build/esm/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.d.ts +0 -10
  183. package/build/esm/__tests__/behavioral/ResettingFixtureFieldsBeforeEach.test.js +0 -146
  184. package/build/esm/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.d.ts +0 -7
  185. package/build/esm/__tests__/behavioral/ResettingLocalEventListeningBeforeSeeding.test.js +0 -66
  186. package/build/esm/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.d.ts +0 -6
  187. package/build/esm/__tests__/behavioral/RetainsContractWhenLoggingInUsingDecotorator.test.js +0 -51
  188. package/build/esm/__tests__/behavioral/RoleFixture.test.d.ts +0 -15
  189. package/build/esm/__tests__/behavioral/RoleFixture.test.js +0 -143
  190. package/build/esm/__tests__/behavioral/SkillFixture.test.d.ts +0 -13
  191. package/build/esm/__tests__/behavioral/SkillFixture.test.js +0 -141
  192. package/build/esm/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.d.ts +0 -7
  193. package/build/esm/__tests__/behavioral/databases/CanUseStoresSetupInBeforeEach.test.js +0 -53
  194. package/build/esm/__tests__/behavioral/databases/DatabaseFixture.test.d.ts +0 -7
  195. package/build/esm/__tests__/behavioral/databases/DatabaseFixture.test.js +0 -48
  196. package/build/esm/__tests__/behavioral/databases/DbResetsAsExpected.test.d.ts +0 -5
  197. package/build/esm/__tests__/behavioral/databases/DbResetsAsExpected.test.js +0 -28
  198. package/build/esm/__tests__/behavioral/databases/DummyStore.d.ts +0 -55
  199. package/build/esm/__tests__/behavioral/databases/DummyStore.js +0 -43
  200. package/build/esm/__tests__/behavioral/databases/StoreFixture.test.d.ts +0 -23
  201. package/build/esm/__tests__/behavioral/databases/StoreFixture.test.js +0 -164
  202. package/build/esm/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.d.ts +0 -9
  203. package/build/esm/__tests__/behavioral/faking/AuthenticatingAsAPerson.test.js +0 -89
  204. package/build/esm/__tests__/behavioral/faking/FakeDecorator.test.d.ts +0 -45
  205. package/build/esm/__tests__/behavioral/faking/FakeDecorator.test.js +0 -482
  206. package/build/esm/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.d.ts +0 -4
  207. package/build/esm/__tests__/behavioral/faking/FakeDecoratorSetsPerson.test.js +0 -28
  208. package/build/esm/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.d.ts +0 -4
  209. package/build/esm/__tests__/behavioral/faking/FakeDecoratorWhoAmI.test.js +0 -32
  210. package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.d.ts +0 -8
  211. package/build/esm/__tests__/behavioral/faking/FakeThemeManager.test.js +0 -82
  212. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.d.ts +0 -8
  213. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToALocation.test.js +0 -70
  214. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.d.ts +0 -14
  215. package/build/esm/__tests__/behavioral/faking/FakingAddingPeopleToAnOrg.test.js +0 -165
  216. package/build/esm/__tests__/behavioral/faking/FakingAuthenticator.test.d.ts +0 -5
  217. package/build/esm/__tests__/behavioral/faking/FakingAuthenticator.test.js +0 -43
  218. package/build/esm/__tests__/behavioral/faking/FakingInBeforeEach.test.d.ts +0 -6
  219. package/build/esm/__tests__/behavioral/faking/FakingInBeforeEach.test.js +0 -55
  220. package/build/esm/__tests__/behavioral/faking/FakingLocations.test.d.ts +0 -6
  221. package/build/esm/__tests__/behavioral/faking/FakingLocations.test.js +0 -55
  222. package/build/esm/__tests__/behavioral/faking/FakingRoleEvents.test.d.ts +0 -19
  223. package/build/esm/__tests__/behavioral/faking/FakingRoleEvents.test.js +0 -175
  224. package/build/esm/__tests__/behavioral/faking/FakingSkillEvents.test.d.ts +0 -24
  225. package/build/esm/__tests__/behavioral/faking/FakingSkillEvents.test.js +0 -214
  226. package/build/esm/__tests__/behavioral/faking/UpdatePerson.test.d.ts +0 -4
  227. package/build/esm/__tests__/behavioral/faking/UpdatePerson.test.js +0 -38
  228. package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.d.ts +0 -35
  229. package/build/esm/__tests__/behavioral/faking/UsingFakeDecorators.test.js +0 -360
  230. package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.d.ts +0 -4
  231. package/build/esm/__tests__/behavioral/faking/UsingFakesOnIncompatibleClass.test.js +0 -31
  232. package/build/esm/__tests__/behavioral/faking/WhoAmI.test.d.ts +0 -19
  233. package/build/esm/__tests__/behavioral/faking/WhoAmI.test.js +0 -142
  234. package/build/esm/__tests__/behavioral/maps/SpyingMapUtil.test.d.ts +0 -10
  235. package/build/esm/__tests__/behavioral/maps/SpyingMapUtil.test.js +0 -94
  236. package/build/esm/__tests__/behavioral/permissions/FakeAuthorizer.test.d.ts +0 -34
  237. package/build/esm/__tests__/behavioral/permissions/FakeAuthorizer.test.js +0 -324
  238. package/build/esm/__tests__/behavioral/permissions/PermissionFixture.test.d.ts +0 -5
  239. package/build/esm/__tests__/behavioral/permissions/PermissionFixture.test.js +0 -43
  240. package/build/esm/__tests__/behavioral/seeding/SeedingData.test.d.ts +0 -24
  241. package/build/esm/__tests__/behavioral/seeding/SeedingData.test.js +0 -314
  242. package/build/esm/__tests__/behavioral/seeding/UsingDecorators.test.d.ts +0 -37
  243. package/build/esm/__tests__/behavioral/seeding/UsingDecorators.test.js +0 -322
  244. package/build/esm/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.d.ts +0 -14
  245. package/build/esm/__tests__/behavioral/seeding/UsingDecoratorsToInstallSkills.test.js +0 -138
  246. package/build/esm/__tests__/behavioral/views/FakingSkillViewControllers.test.d.ts +0 -12
  247. package/build/esm/__tests__/behavioral/views/FakingSkillViewControllers.test.js +0 -70
  248. package/build/esm/__tests__/behavioral/views/Routing.test.d.ts +0 -36
  249. package/build/esm/__tests__/behavioral/views/Routing.test.js +0 -212
  250. package/build/esm/__tests__/behavioral/views/TestingScope.test.d.ts +0 -24
  251. package/build/esm/__tests__/behavioral/views/TestingScope.test.js +0 -238
  252. package/build/esm/__tests__/behavioral/views/ViewPlugins.test.d.ts +0 -12
  253. package/build/esm/__tests__/behavioral/views/ViewPlugins.test.js +0 -103
  254. package/build/esm/__tests__/behavioral/views/WorkingWithTimezones.test.d.ts +0 -11
  255. package/build/esm/__tests__/behavioral/views/WorkingWithTimezones.test.js +0 -64
  256. package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixture.test.d.ts +0 -118
  257. package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixture.test.js +0 -856
  258. package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.d.ts +0 -5
  259. package/build/esm/__tests__/behavioral/views/viewFixture/ViewFixtureLetsYouOverrideViewControllerFactory.test.js +0 -39
  260. package/build/esm/__tests__/support/AbstractFakeDecoratorTest.d.ts +0 -5
  261. package/build/esm/__tests__/support/AbstractFakeDecoratorTest.js +0 -34
  262. package/build/esm/__tests__/support/EventFaker.d.ts +0 -5
  263. package/build/esm/__tests__/support/EventFaker.js +0 -45
  264. package/build/esm/__tests__/support/FakeThemeManager.d.ts +0 -8
  265. package/build/esm/__tests__/support/FakeThemeManager.js +0 -37
  266. package/build/esm/__tests__/support/RandomViewPlugin.d.ts +0 -2
  267. package/build/esm/__tests__/support/RandomViewPlugin.js +0 -2
  268. package/build/esm/__tests__/support/RandomViewPlugin2.d.ts +0 -2
  269. package/build/esm/__tests__/support/RandomViewPlugin2.js +0 -2
  270. package/build/esm/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.d.ts +0 -51
  271. package/build/esm/__tests__/testDirsAndFiles/one-good-store-skill/build/stores/Good.store.js +0 -41
  272. package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.d.ts +0 -5
  273. package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Book.svc.js +0 -9
  274. package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.d.ts +0 -7
  275. package/build/esm/__tests__/testDirsAndFiles/skill/build/skillViewControllers/Spy.svc.js +0 -28
  276. package/build/esm/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.d.ts +0 -8
  277. package/build/esm/__tests__/testDirsAndFiles/skill/build/viewControllers/BookForm.vc.js +0 -26
  278. package/build/esm/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.d.ts +0 -5
  279. package/build/esm/__tests__/testDirsAndFiles/skill/src/skillViewControllers/Book.svc.js +0 -9
  280. package/build/esm/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.d.ts +0 -8
  281. package/build/esm/__tests__/testDirsAndFiles/skill/src/viewControllers/BookForm.vc.js +0 -26
@@ -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
- }