@aj-shadow/actorjs-app 0.0.0-aj-beta.221

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 (423) hide show
  1. package/.gitattributes +29 -0
  2. package/.vscode/launch.json +18 -0
  3. package/CHANGELOG.md +79 -0
  4. package/LICENSE.txt +96 -0
  5. package/README.md +86 -0
  6. package/contributors.txt +3 -0
  7. package/main.js +14 -0
  8. package/npm-post-install.js +618 -0
  9. package/npm-shrinkwrap.json +14 -0
  10. package/package.json +16 -0
  11. package/project/actorjs-project.tree +466 -0
  12. package/project/client/actions/action-actor-editor/action-actor-editor-file.js +101 -0
  13. package/project/client/actions/action-actor-editor/action-actor-editor-folder.js +41 -0
  14. package/project/client/actions/action-actor-editor/action-actor-editor-persistent-data.js +23 -0
  15. package/project/client/actions/action-actor-editor/action-actor-editor-project.js +23 -0
  16. package/project/client/actions/action-actor-editor/data-action-actor-editor-file.js +70 -0
  17. package/project/client/actions/action-actor-editor/data-action-actor-editor-folder.js +26 -0
  18. package/project/client/actions/action-actor-editor/data-action-actor-editor-project.js +27 -0
  19. package/project/client/actions/action-actor-editor/realtime-action-actors-editor.js +14 -0
  20. package/project/client/actions/action-addresses/action-addresses.js +180 -0
  21. package/project/client/actions/action-addresses/data-action-addresses.js +174 -0
  22. package/project/client/actions/action-console/action-console.js +11 -0
  23. package/project/client/actions/action-console/data-action-console.js +12 -0
  24. package/project/client/actions/action-content/action-content.js +101 -0
  25. package/project/client/actions/action-content/data-action-content.js +90 -0
  26. package/project/client/actions/action-function-under-test.js +45 -0
  27. package/project/client/actions/action-load/action-load.js +29 -0
  28. package/project/client/actions/action-load/data-action-load.js +4 -0
  29. package/project/client/actions/action-login/action-login.js +95 -0
  30. package/project/client/actions/action-login/data-action-login.js +83 -0
  31. package/project/client/actions/action-plugins/action-plugins.js +17 -0
  32. package/project/client/actions/action-plugins/data-action-plugins.js +20 -0
  33. package/project/client/actions/action-plus-services/action-plus-services.js +17 -0
  34. package/project/client/actions/action-plus-services/data-action-plus-services.js +20 -0
  35. package/project/client/actions/action-repos/action-repos.js +35 -0
  36. package/project/client/actions/action-repos/data-action-repos.js +42 -0
  37. package/project/client/actions/action-stack-editor/action-stack-editor-file.js +84 -0
  38. package/project/client/actions/action-stack-editor/action-stack-editor-folder.js +41 -0
  39. package/project/client/actions/action-stack-editor/action-stack-editor-persistent-data.js +23 -0
  40. package/project/client/actions/action-stack-editor/action-stack-editor-project.js +29 -0
  41. package/project/client/actions/action-stack-editor/data-action-stack-editor-file.js +49 -0
  42. package/project/client/actions/action-stack-editor/data-action-stack-editor-folder.js +26 -0
  43. package/project/client/actions/action-stack-editor/data-action-stack-editor-project.js +34 -0
  44. package/project/client/actions/action-sut-fut-filter.js +23 -0
  45. package/project/client/actions/action-system-under-test/action-system-under-test.js +164 -0
  46. package/project/client/actions/action-system-under-test/data-action-system-under-test.js +70 -0
  47. package/project/client/actions/action-test-case/action-test-case.js +323 -0
  48. package/project/client/actions/action-test-case/data-action-test-case.js +133 -0
  49. package/project/client/actions/action-test-case/realtime-action-test-case.js +69 -0
  50. package/project/client/actions/action-test-cases.js +49 -0
  51. package/project/client/actions/action-test-data/action-test-data.js +77 -0
  52. package/project/client/actions/action-test-data/data-action-test-data.js +62 -0
  53. package/project/client/actions/action-test-suite/action-test-suite.js +122 -0
  54. package/project/client/actions/action-test-suite/data-action-test-suite.js +76 -0
  55. package/project/client/actions/action-test-suite/realtime-action-test-suite.js +20 -0
  56. package/project/client/actions/action-test-suites.js +47 -0
  57. package/project/client/actor-default.js +18 -0
  58. package/project/client/communication/messages/messages-c-to-c/message-new-actor-index.js +15 -0
  59. package/project/client/communication/messages/messages-c-to-c/message-test-case-clear.js +15 -0
  60. package/project/client/communication/messages/messages-c-to-c/message-test-case-not-started.js +15 -0
  61. package/project/client/communication/messages/messages-c-to-c/message-test-suite-clear.js +15 -0
  62. package/project/client/components/footer/footer.jsx +94 -0
  63. package/project/client/components/header/header-status-login.jsx +78 -0
  64. package/project/client/components/header/header-status-staging-environment.jsx +132 -0
  65. package/project/client/components/header/header.jsx +27 -0
  66. package/project/client/components/header/header_icon.jsx +37 -0
  67. package/project/client/components/header/header_status.jsx +33 -0
  68. package/project/client/components/middle/abbreviation/middle-abbreviation-toolbar.jsx +126 -0
  69. package/project/client/components/middle/abbreviation/middle-abbreviation.jsx +27 -0
  70. package/project/client/components/middle/actor-editor/middle-actor-editor-sidebar.jsx +101 -0
  71. package/project/client/components/middle/actor-editor/middle-actor-editor-toolbar.jsx +612 -0
  72. package/project/client/components/middle/actor-editor/middle-actor-editor-view.jsx +157 -0
  73. package/project/client/components/middle/actor-editor/middle-actor-editor.jsx +38 -0
  74. package/project/client/components/middle/addresses/helpers/stage-filter.js +32 -0
  75. package/project/client/components/middle/addresses/middle-addresses-toolbar.jsx +183 -0
  76. package/project/client/components/middle/addresses/middle-addresses-view-client-address.jsx +67 -0
  77. package/project/client/components/middle/addresses/middle-addresses-view-client-interface.jsx +68 -0
  78. package/project/client/components/middle/addresses/middle-addresses-view-dns.jsx +67 -0
  79. package/project/client/components/middle/addresses/middle-addresses-view-dst.jsx +67 -0
  80. package/project/client/components/middle/addresses/middle-addresses-view-network-interface.jsx +67 -0
  81. package/project/client/components/middle/addresses/middle-addresses-view-ports.jsx +67 -0
  82. package/project/client/components/middle/addresses/middle-addresses-view-server-address.jsx +68 -0
  83. package/project/client/components/middle/addresses/middle-addresses-view-server-interface.jsx +68 -0
  84. package/project/client/components/middle/addresses/middle-addresses-view-src.jsx +67 -0
  85. package/project/client/components/middle/addresses/middle-addresses-view-srv.jsx +67 -0
  86. package/project/client/components/middle/addresses/middle-addresses-view-sut-address.jsx +67 -0
  87. package/project/client/components/middle/addresses/middle-addresses-view-sut-interface.jsx +67 -0
  88. package/project/client/components/middle/addresses/middle-addresses-view.jsx +155 -0
  89. package/project/client/components/middle/addresses/middle-addresses.jsx +39 -0
  90. package/project/client/components/middle/content/middle-content-toolbar.jsx +135 -0
  91. package/project/client/components/middle/content/middle-content-view-audio.jsx +60 -0
  92. package/project/client/components/middle/content/middle-content-view-documents.jsx +60 -0
  93. package/project/client/components/middle/content/middle-content-view-image.jsx +60 -0
  94. package/project/client/components/middle/content/middle-content-view-other.jsx +60 -0
  95. package/project/client/components/middle/content/middle-content-view-text.jsx +60 -0
  96. package/project/client/components/middle/content/middle-content-view-video.jsx +60 -0
  97. package/project/client/components/middle/content/middle-content-view.jsx +111 -0
  98. package/project/client/components/middle/content/middle-content.jsx +39 -0
  99. package/project/client/components/middle/middle-not-found.jsx +24 -0
  100. package/project/client/components/middle/middle-sut-fut-filter.jsx +90 -0
  101. package/project/client/components/middle/middle.jsx +90 -0
  102. package/project/client/components/middle/middle_sidebar.jsx +256 -0
  103. package/project/client/components/middle/plugins/middle-plugins.jsx +64 -0
  104. package/project/client/components/middle/plus-services/middle-plus-services.jsx +63 -0
  105. package/project/client/components/middle/repos/middle-repos-toolbar.jsx +137 -0
  106. package/project/client/components/middle/repos/middle-repos-view.jsx +47 -0
  107. package/project/client/components/middle/repos/middle-repos.jsx +36 -0
  108. package/project/client/components/middle/stack-editor/middle-stack-editor-sidebar.jsx +101 -0
  109. package/project/client/components/middle/stack-editor/middle-stack-editor-toolbar.jsx +525 -0
  110. package/project/client/components/middle/stack-editor/middle-stack-editor-view.jsx +156 -0
  111. package/project/client/components/middle/stack-editor/middle-stack-editor.jsx +38 -0
  112. package/project/client/components/middle/staging/helper.js +58 -0
  113. package/project/client/components/middle/staging/middle-staging-modal-interface-create.jsx +244 -0
  114. package/project/client/components/middle/staging/middle-staging-modal-interface-delete.jsx +186 -0
  115. package/project/client/components/middle/staging/middle-staging-toolbar.jsx +267 -0
  116. package/project/client/components/middle/staging/middle-staging-view.jsx +67 -0
  117. package/project/client/components/middle/staging/middle-staging.jsx +40 -0
  118. package/project/client/components/middle/staging/tabs/middle-staging-tab-logical.jsx +27 -0
  119. package/project/client/components/middle/staging/tabs/middle-staging-tab-report.jsx +62 -0
  120. package/project/client/components/middle/staging/tabs/middle-staging-tab-repos.jsx +96 -0
  121. package/project/client/components/middle/staging/tabs/middle-staging-tab-setup.jsx +73 -0
  122. package/project/client/components/middle/start/middle-start-toolbar.jsx +134 -0
  123. package/project/client/components/middle/start/middle-start-view.jsx +335 -0
  124. package/project/client/components/middle/start/middle-start.jsx +36 -0
  125. package/project/client/components/middle/system-under-test/middle-system-under-test-toolbar.jsx +171 -0
  126. package/project/client/components/middle/system-under-test/middle-system-under-test-view-multi.jsx +119 -0
  127. package/project/client/components/middle/system-under-test/middle-system-under-test-view-single.jsx +85 -0
  128. package/project/client/components/middle/system-under-test/middle-system-under-test.jsx +40 -0
  129. package/project/client/components/middle/system-under-test/tabs/middle-system-under-test-tab-instances.jsx +164 -0
  130. package/project/client/components/middle/system-under-test/tabs/middle-system-under-test-tab-nodes.jsx +160 -0
  131. package/project/client/components/middle/system-under-test/tabs/middle-system-under-test-tab-specification.jsx +463 -0
  132. package/project/client/components/middle/test-cases/general-helpers/actors-sorting.js +52 -0
  133. package/project/client/components/middle/test-cases/middle-test-cases-not-found.jsx +51 -0
  134. package/project/client/components/middle/test-cases/middle-test-cases-toolbar.jsx +804 -0
  135. package/project/client/components/middle/test-cases/middle-test-cases-view-columns.jsx +222 -0
  136. package/project/client/components/middle/test-cases/middle-test-cases-view-fut.jsx +105 -0
  137. package/project/client/components/middle/test-cases/middle-test-cases-view-recent.jsx +74 -0
  138. package/project/client/components/middle/test-cases/middle-test-cases-view-sut.jsx +98 -0
  139. package/project/client/components/middle/test-cases/middle-test-cases-view-tc.jsx +108 -0
  140. package/project/client/components/middle/test-cases/middle-test-cases-view-test-case.jsx +104 -0
  141. package/project/client/components/middle/test-cases/middle-test-cases.jsx +59 -0
  142. package/project/client/components/middle/test-cases/tabs/middle-test-cases-tab-analyze.jsx +289 -0
  143. package/project/client/components/middle/test-cases/tabs/middle-test-cases-tab-debug.jsx +699 -0
  144. package/project/client/components/middle/test-cases/tabs/middle-test-cases-tab-definition.jsx +103 -0
  145. package/project/client/components/middle/test-cases/tabs/middle-test-cases-tab-execution.jsx +321 -0
  146. package/project/client/components/middle/test-cases/tabs/middle-test-cases-tab-log.jsx +150 -0
  147. package/project/client/components/middle/test-cases/tabs/middle-test-cases-tab-sequence-diagram.jsx +160 -0
  148. package/project/client/components/middle/test-cases/tabs/middle-test-cases-tab-specification.jsx +472 -0
  149. package/project/client/components/middle/test-data/middle-test-data-toolbar.jsx +135 -0
  150. package/project/client/components/middle/test-data/middle-test-data-view-environment.jsx +64 -0
  151. package/project/client/components/middle/test-data/middle-test-data-view-general.jsx +61 -0
  152. package/project/client/components/middle/test-data/middle-test-data-view-output.jsx +60 -0
  153. package/project/client/components/middle/test-data/middle-test-data-view-system.jsx +61 -0
  154. package/project/client/components/middle/test-data/middle-test-data-view.jsx +98 -0
  155. package/project/client/components/middle/test-data/middle-test-data.jsx +39 -0
  156. package/project/client/components/middle/test-suites/middle-test-suites-toolbar.jsx +524 -0
  157. package/project/client/components/middle/test-suites/middle-test-suites-view-columns.jsx +222 -0
  158. package/project/client/components/middle/test-suites/middle-test-suites-view-fut.jsx +105 -0
  159. package/project/client/components/middle/test-suites/middle-test-suites-view-recent.jsx +74 -0
  160. package/project/client/components/middle/test-suites/middle-test-suites-view-sut.jsx +96 -0
  161. package/project/client/components/middle/test-suites/middle-test-suites-view-test-suite.jsx +593 -0
  162. package/project/client/components/middle/test-suites/middle-test-suites-view-ts.jsx +109 -0
  163. package/project/client/components/middle/test-suites/middle-test-suites.jsx +55 -0
  164. package/project/client/components/middle/test-suites/tabs/middle-test-suites-tab-definition.jsx +74 -0
  165. package/project/client/components/middle/test-suites/tabs/middle-test-suites-tab-execution.jsx +544 -0
  166. package/project/client/components/middle/test-suites/tabs/middle-test-suites-tab-log.jsx +118 -0
  167. package/project/client/components/middle/test-suites/tabs/middle-test-suites-tab-sequence-diagram.jsx +155 -0
  168. package/project/client/components/middle/user/middle-user-toolbar.jsx +32 -0
  169. package/project/client/components/middle/user/middle-user-view.jsx +32 -0
  170. package/project/client/components/middle/user/middle-user.jsx +39 -0
  171. package/project/client/components/middle/videos/middle-videos-view.jsx +135 -0
  172. package/project/client/components/middle/videos/middle-videos.jsx +32 -0
  173. package/project/client/css/components/component-video.css +15 -0
  174. package/project/client/css/components/modal-dialog-file.css +4 -0
  175. package/project/client/css/footer/footer-info.css +18 -0
  176. package/project/client/css/footer/footer-logo.css +39 -0
  177. package/project/client/css/from-code-editor/sidebar-dark.css +20 -0
  178. package/project/client/css/from-code-editor/sidebar-light.css +18 -0
  179. package/project/client/css/from-code-editor/tab.css +19 -0
  180. package/project/client/css/from-code-editor/tab_dark.css +9 -0
  181. package/project/client/css/from-code-editor/tab_light.css +9 -0
  182. package/project/client/css/from-code-editor/view-dark.css +11 -0
  183. package/project/client/css/from-code-editor/view-light.css +10 -0
  184. package/project/client/css/header/header-status.css +114 -0
  185. package/project/client/css/header/header.css +16 -0
  186. package/project/client/css/log-inner.css +46 -0
  187. package/project/client/css/main.css +4 -0
  188. package/project/client/css/middle/actor-editor.css +30 -0
  189. package/project/client/css/middle/address.css +57 -0
  190. package/project/client/css/middle/content.css +41 -0
  191. package/project/client/css/middle/login.css +118 -0
  192. package/project/client/css/middle/middle-start.css +5 -0
  193. package/project/client/css/middle/middle.css +13 -0
  194. package/project/client/css/middle/middle_sidebar.css +44 -0
  195. package/project/client/css/middle/middle_view.css +41 -0
  196. package/project/client/css/middle/stack-editor.css +30 -0
  197. package/project/client/css/middle/start/middle_start.css +94 -0
  198. package/project/client/css/middle/systems-under-test/systems-under-test-specification.css +48 -0
  199. package/project/client/css/middle/systems-under-test/systems-under-test.css +49 -0
  200. package/project/client/css/middle/test-case-and-test-suite/analyze.css +5 -0
  201. package/project/client/css/middle/test-case-and-test-suite/debug.css +281 -0
  202. package/project/client/css/middle/test-case-and-test-suite/execution.css +7 -0
  203. package/project/client/css/middle/test-case-and-test-suite/log.css +13 -0
  204. package/project/client/css/middle/test-case-and-test-suite/seq-dia.css +13 -0
  205. package/project/client/css/middle/test-cases/test-cases-analyze.css +9 -0
  206. package/project/client/css/middle/test-cases/test-cases-debug.css +61 -0
  207. package/project/client/css/middle/test-cases/test-cases-execution.css +4 -0
  208. package/project/client/css/middle/test-cases/test-cases-specification.css +82 -0
  209. package/project/client/css/middle/test-cases/test-cases.css +189 -0
  210. package/project/client/css/middle/test-data.css +52 -0
  211. package/project/client/css/middle/test-suites.css +525 -0
  212. package/project/client/css/middle/videos/videos.css +37 -0
  213. package/project/client/css/middle_test_cases_screen.css +8 -0
  214. package/project/client/css/middle_toolbar.css +10 -0
  215. package/project/client/css/repos.css +15 -0
  216. package/project/client/css/same_size_as_parent.css +6 -0
  217. package/project/client/css/test.css +116 -0
  218. package/project/client/html/index.html +61 -0
  219. package/project/client/main.jsx +59 -0
  220. package/project/client/stores/abbreviation-store.js +57 -0
  221. package/project/client/stores/actor-editor-store.js +758 -0
  222. package/project/client/stores/addresses-store.js +419 -0
  223. package/project/client/stores/console-store.js +27 -0
  224. package/project/client/stores/content-store.js +237 -0
  225. package/project/client/stores/documentation-store.js +14 -0
  226. package/project/client/stores/education-store.js +14 -0
  227. package/project/client/stores/filter-store.js +30 -0
  228. package/project/client/stores/function-under-test-store.js +58 -0
  229. package/project/client/stores/load-store.js +92 -0
  230. package/project/client/stores/login-store.js +232 -0
  231. package/project/client/stores/plugins-store.js +255 -0
  232. package/project/client/stores/plus-services-store.js +267 -0
  233. package/project/client/stores/repos-store.js +160 -0
  234. package/project/client/stores/stack-editor-store.js +691 -0
  235. package/project/client/stores/system-under-test-store.js +340 -0
  236. package/project/client/stores/test-case-store.js +1118 -0
  237. package/project/client/stores/test-cases-store.js +106 -0
  238. package/project/client/stores/test-data-store.js +181 -0
  239. package/project/client/stores/test-suite-store.js +438 -0
  240. package/project/client/stores/test-suites-store.js +86 -0
  241. package/project/client/stores/workshop-store.js +15 -0
  242. package/project/server/os/os-hardware.js +83 -0
  243. package/project/server/os/os-networks.js +50 -0
  244. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorBuild.js +185 -0
  245. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorFileDelete.js +21 -0
  246. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorFileGet.js +18 -0
  247. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorFileInlineGet.js +60 -0
  248. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorFileInlineUpdate.js +69 -0
  249. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorFileNew.js +396 -0
  250. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorFileRename.js +28 -0
  251. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorFileUpdate.js +18 -0
  252. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorFolderDelete.js +21 -0
  253. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorFolderNew.js +19 -0
  254. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorFolderUpdate.js +19 -0
  255. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorProjectGet.js +77 -0
  256. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorProjectToggle.js +18 -0
  257. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorProjectUpdate.js +22 -0
  258. package/project/server/plugin-data/actor-editor/plugin_data_ActorEditorStacksGet.js +54 -0
  259. package/project/server/plugin-data/addresses/plugin_data_AddressesClientAddressGet.js +19 -0
  260. package/project/server/plugin-data/addresses/plugin_data_AddressesClientAddressUpdate.js +19 -0
  261. package/project/server/plugin-data/addresses/plugin_data_AddressesClientInterfaceGet.js +19 -0
  262. package/project/server/plugin-data/addresses/plugin_data_AddressesClientInterfaceUpdate.js +19 -0
  263. package/project/server/plugin-data/addresses/plugin_data_AddressesDnsGet.js +20 -0
  264. package/project/server/plugin-data/addresses/plugin_data_AddressesDnsUpdate.js +19 -0
  265. package/project/server/plugin-data/addresses/plugin_data_AddressesDstGet.js +19 -0
  266. package/project/server/plugin-data/addresses/plugin_data_AddressesDstUpdate.js +19 -0
  267. package/project/server/plugin-data/addresses/plugin_data_AddressesNetworkInterfaceGet.js +19 -0
  268. package/project/server/plugin-data/addresses/plugin_data_AddressesNetworkInterfaceUpdate.js +19 -0
  269. package/project/server/plugin-data/addresses/plugin_data_AddressesPortsGet.js +19 -0
  270. package/project/server/plugin-data/addresses/plugin_data_AddressesPortsUpdate.js +19 -0
  271. package/project/server/plugin-data/addresses/plugin_data_AddressesServerAddressGet.js +19 -0
  272. package/project/server/plugin-data/addresses/plugin_data_AddressesServerAddressUpdate.js +19 -0
  273. package/project/server/plugin-data/addresses/plugin_data_AddressesServerInterfaceGet.js +19 -0
  274. package/project/server/plugin-data/addresses/plugin_data_AddressesServerInterfaceUpdate.js +19 -0
  275. package/project/server/plugin-data/addresses/plugin_data_AddressesSrcGet.js +38 -0
  276. package/project/server/plugin-data/addresses/plugin_data_AddressesSrcUpdate.js +19 -0
  277. package/project/server/plugin-data/addresses/plugin_data_AddressesSrvGet.js +19 -0
  278. package/project/server/plugin-data/addresses/plugin_data_AddressesSrvUpdate.js +19 -0
  279. package/project/server/plugin-data/addresses/plugin_data_AddressesSutAddressGet.js +19 -0
  280. package/project/server/plugin-data/addresses/plugin_data_AddressesSutAddressUpdate.js +19 -0
  281. package/project/server/plugin-data/addresses/plugin_data_AddressesSutInterfaceGet.js +19 -0
  282. package/project/server/plugin-data/addresses/plugin_data_AddressesSutInterfaceUpdate.js +19 -0
  283. package/project/server/plugin-data/console/plugin_data_ConsoleClear.js +20 -0
  284. package/project/server/plugin-data/content/plugin_data_ContentAudioGet.js +19 -0
  285. package/project/server/plugin-data/content/plugin_data_ContentAudioUpdate.js +19 -0
  286. package/project/server/plugin-data/content/plugin_data_ContentDocumentsGet.js +19 -0
  287. package/project/server/plugin-data/content/plugin_data_ContentDocumentsUpdate.js +19 -0
  288. package/project/server/plugin-data/content/plugin_data_ContentImageGet.js +19 -0
  289. package/project/server/plugin-data/content/plugin_data_ContentImageUpdate.js +19 -0
  290. package/project/server/plugin-data/content/plugin_data_ContentOtherGet.js +19 -0
  291. package/project/server/plugin-data/content/plugin_data_ContentOtherUpdate.js +19 -0
  292. package/project/server/plugin-data/content/plugin_data_ContentTextGet.js +19 -0
  293. package/project/server/plugin-data/content/plugin_data_ContentTextUpdate.js +19 -0
  294. package/project/server/plugin-data/content/plugin_data_ContentVideoGet.js +19 -0
  295. package/project/server/plugin-data/content/plugin_data_ContentVideoUpdate.js +19 -0
  296. package/project/server/plugin-data/function-under-test/plugin_data_FunctionUnderTestAdd.js +60 -0
  297. package/project/server/plugin-data/function-under-test/plugin_data_FunctionUnderTestDelete.js +20 -0
  298. package/project/server/plugin-data/function-under-test/plugin_data_FunctionUnderTestGet.js +92 -0
  299. package/project/server/plugin-data/login/plugin_data_LoginButtonsAdd.js +18 -0
  300. package/project/server/plugin-data/login/plugin_data_LoginButtonsGet.js +18 -0
  301. package/project/server/plugin-data/login/plugin_data_LoginButtonsUpdate.js +18 -0
  302. package/project/server/plugin-data/login/plugin_data_LoginCreateInterfaces.js +73 -0
  303. package/project/server/plugin-data/login/plugin_data_LoginDataGet.js +88 -0
  304. package/project/server/plugin-data/login/plugin_data_LoginDeleteInterfaces.js +38 -0
  305. package/project/server/plugin-data/login/plugin_data_LoginGet.js +22 -0
  306. package/project/server/plugin-data/login/plugin_data_LoginPing.js +72 -0
  307. package/project/server/plugin-data/login/plugin_data_LoginReposGet.js +18 -0
  308. package/project/server/plugin-data/login/plugin_data_LoginUpdate.js +44 -0
  309. package/project/server/plugin-data/login/plugin_data_LoginWsGet.js +39 -0
  310. package/project/server/plugin-data/plugins/plugin_data_PluginsBundleGet.js +34 -0
  311. package/project/server/plugin-data/plugins/plugin_data_PluginsGet.js +26 -0
  312. package/project/server/plugin-data/plus-services/plugin_data_PlusServicesBundleGet.js +34 -0
  313. package/project/server/plugin-data/plus-services/plugin_data_PlusServicesGet.js +78 -0
  314. package/project/server/plugin-data/repos/plugin_data_ReposAnalyzeLocalReposGet.js +142 -0
  315. package/project/server/plugin-data/repos/plugin_data_ReposClone.js +154 -0
  316. package/project/server/plugin-data/repos/plugin_data_ReposGet.js +18 -0
  317. package/project/server/plugin-data/repos/plugin_data_ReposVerifyGit.js +79 -0
  318. package/project/server/plugin-data/repos/repos.js +94 -0
  319. package/project/server/plugin-data/stack-editor/helpers/template.js +351 -0
  320. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorBuild.js +185 -0
  321. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorFileDelete.js +21 -0
  322. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorFileGet.js +18 -0
  323. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorFileNew.js +24 -0
  324. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorFileRename.js +27 -0
  325. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorFileUpdate.js +18 -0
  326. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorFolderDelete.js +21 -0
  327. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorFolderNew.js +19 -0
  328. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorFolderUpdate.js +19 -0
  329. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorProjectGet.js +77 -0
  330. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorProjectToggle.js +18 -0
  331. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorProjectUpdate.js +22 -0
  332. package/project/server/plugin-data/stack-editor/plugin_data_StackEditorWizard.js +43 -0
  333. package/project/server/plugin-data/system-under-test/plugin_data_SystemUnderTestAdd.js +72 -0
  334. package/project/server/plugin-data/system-under-test/plugin_data_SystemUnderTestDelete.js +20 -0
  335. package/project/server/plugin-data/system-under-test/plugin_data_SystemUnderTestGet.js +138 -0
  336. package/project/server/plugin-data/system-under-test/plugin_data_SystemUnderTestInstancesUpdate.js +21 -0
  337. package/project/server/plugin-data/system-under-test/plugin_data_SystemUnderTestNodesUpdate.js +21 -0
  338. package/project/server/plugin-data/system-under-test/plugin_data_SystemUnderTestRepoAdd.js +46 -0
  339. package/project/server/plugin-data/system-under-test/plugin_data_SystemUnderTestRepoGet.js +57 -0
  340. package/project/server/plugin-data/system-under-test/plugin_data_SystemUnderTestSpecificationUpdate.js +21 -0
  341. package/project/server/plugin-data/system-under-test/plugin_data_SystemUnderTestUpdate.js +24 -0
  342. package/project/server/plugin-data/test-case/debug.js +39 -0
  343. package/project/server/plugin-data/test-case/debugger-api.js +398 -0
  344. package/project/server/plugin-data/test-case/debugger.js +129 -0
  345. package/project/server/plugin-data/test-case/plugin_data_TestCaseActorsFileGet.js +26 -0
  346. package/project/server/plugin-data/test-case/plugin_data_TestCaseAdd.js +74 -0
  347. package/project/server/plugin-data/test-case/plugin_data_TestCaseAnalyze.js +451 -0
  348. package/project/server/plugin-data/test-case/plugin_data_TestCaseButtonsAdd.js +19 -0
  349. package/project/server/plugin-data/test-case/plugin_data_TestCaseButtonsGet.js +19 -0
  350. package/project/server/plugin-data/test-case/plugin_data_TestCaseButtonsUpdate.js +19 -0
  351. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugBreakpointClear.js +56 -0
  352. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugBreakpointClearAll.js +23 -0
  353. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugBreakpointSet.js +118 -0
  354. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugBreakpointUpdate.js +84 -0
  355. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugGet.js +40 -0
  356. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugGetMembers.js +40 -0
  357. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugGetProperty.js +47 -0
  358. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugGetSource.js +29 -0
  359. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugLoad.js +35 -0
  360. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugRun.js +52 -0
  361. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugStart.js +217 -0
  362. package/project/server/plugin-data/test-case/plugin_data_TestCaseDebugStop.js +23 -0
  363. package/project/server/plugin-data/test-case/plugin_data_TestCaseDelete.js +20 -0
  364. package/project/server/plugin-data/test-case/plugin_data_TestCaseExecutionStart.js +73 -0
  365. package/project/server/plugin-data/test-case/plugin_data_TestCaseGet.js +118 -0
  366. package/project/server/plugin-data/test-case/plugin_data_TestCaseRecentDelete.js +57 -0
  367. package/project/server/plugin-data/test-case/plugin_data_TestCaseRecentGet.js +20 -0
  368. package/project/server/plugin-data/test-case/plugin_data_TestCaseRecentUpdate.js +62 -0
  369. package/project/server/plugin-data/test-case/plugin_data_TestCaseRename.js +43 -0
  370. package/project/server/plugin-data/test-case/plugin_data_TestCaseSpecificationUpdate.js +21 -0
  371. package/project/server/plugin-data/test-case/plugin_data_TestCaseStacksGet.js +54 -0
  372. package/project/server/plugin-data/test-case/plugin_data_TestCaseUpdate.js +42 -0
  373. package/project/server/plugin-data/test-data/plugin_data_TestDataEnvironmentGet.js +72 -0
  374. package/project/server/plugin-data/test-data/plugin_data_TestDataEnvironmentUpdate.js +19 -0
  375. package/project/server/plugin-data/test-data/plugin_data_TestDataGeneralGet.js +19 -0
  376. package/project/server/plugin-data/test-data/plugin_data_TestDataGeneralUpdate.js +19 -0
  377. package/project/server/plugin-data/test-data/plugin_data_TestDataOutputGet.js +19 -0
  378. package/project/server/plugin-data/test-data/plugin_data_TestDataOutputUpdate.js +19 -0
  379. package/project/server/plugin-data/test-data/plugin_data_TestDataSystemGet.js +19 -0
  380. package/project/server/plugin-data/test-data/plugin_data_TestDataSystemUpdate.js +19 -0
  381. package/project/server/plugin-data/test-suite/plugin_data_TestSuiteAdd.js +51 -0
  382. package/project/server/plugin-data/test-suite/plugin_data_TestSuiteButtonsAdd.js +19 -0
  383. package/project/server/plugin-data/test-suite/plugin_data_TestSuiteButtonsGet.js +18 -0
  384. package/project/server/plugin-data/test-suite/plugin_data_TestSuiteButtonsUpdate.js +18 -0
  385. package/project/server/plugin-data/test-suite/plugin_data_TestSuiteDelete.js +20 -0
  386. package/project/server/plugin-data/test-suite/plugin_data_TestSuiteExecutionStart.js +401 -0
  387. package/project/server/plugin-data/test-suite/plugin_data_TestSuiteGet.js +110 -0
  388. package/project/server/plugin-data/test-suite/plugin_data_TestSuiteRecentDelete.js +54 -0
  389. package/project/server/plugin-data/test-suite/plugin_data_TestSuiteRecentGet.js +18 -0
  390. package/project/server/plugin-data/test-suite/plugin_data_TestSuiteRecentUpdate.js +59 -0
  391. package/project/server/plugin-data/test-suite/plugin_data_TestSuiteUpdate.js +42 -0
  392. package/project/server/plugin-service/platform-fs/plugin_service_Platform-Fs.js +65 -0
  393. package/project/server/plugin-service/platform-fs/verify-or-create-files.js +57 -0
  394. package/repos.json +19 -0
  395. package/server-test-case.js +50 -0
  396. package/settings - Copy (2).json +77 -0
  397. package/settings.json +63 -0
  398. package/workspace/Bundle-AppLayer-client.bld +77 -0
  399. package/workspace/Bundle-AppLayer-cs.bld +37 -0
  400. package/workspace/Client-AppLayer-client-jsx.bld +10 -0
  401. package/workspace/Client-AppLayer-client.bld +10 -0
  402. package/workspace/Client-AppLayer-cs.bld +10 -0
  403. package/workspace/Server-AppLayer-cs.bld +12 -0
  404. package/workspace/Server-AppLayer-server.bld +12 -0
  405. package/workspace/actorjs.wrk +336 -0
  406. package/workspace/clean-all.tsk +11 -0
  407. package/workspace/clean-build.tsk +8 -0
  408. package/workspace/clean-compiled.tsk +9 -0
  409. package/workspace/clean-dist.tsk +7 -0
  410. package/workspace/clean-generated.tsk +7 -0
  411. package/workspace/clean-node.tsk +7 -0
  412. package/workspace/clean-temp.tsk +7 -0
  413. package/workspace/client-css-actorjs-bundle.bld +10 -0
  414. package/workspace/list-debug.tsk +4 -0
  415. package/workspace/list-default.tsk +4 -0
  416. package/workspace/list-redebug.tsk +4 -0
  417. package/workspace/list-release.tsk +4 -0
  418. package/workspace/list-rerelease.tsk +4 -0
  419. package/workspace/list-start.tsk +4 -0
  420. package/workspace/server-html-rc.bld +10 -0
  421. package/workspace/server-image-actorjs-rc.bld +9 -0
  422. package/workspace/simple-help.tsk +5 -0
  423. package/workspace/simple-help.txt +39 -0
@@ -0,0 +1,1118 @@
1
+
2
+ 'use strict';
3
+
4
+ import MessageNewActorIndex from '../communication/messages/messages-c-to-c/message-new-actor-index';
5
+ import MessageTestCaseNotStarted from '../communication/messages/messages-c-to-c/message-test-case-not-started';
6
+ import MessageTestCaseClear from '../communication/messages/messages-c-to-c/message-test-case-clear';
7
+ import LoginStore from './login-store';
8
+ import { DataActionTestCaseGet, DataActionTestCaseAdd, DataActionTestCaseDelete, DataActionTestCaseRename, DataActionTestCaseUpdate, DataActionTestCaseRecentGet, DataActionTestCaseRecentUpdate, DataActionTestCaseRecentDelete, DataActionTestCaseActorsFileGet, DataActionTestCaseDebugGet, DataActionTestCaseDebugBreakpointClearAll, DataActionTestCaseAnalyze, DataActionTestCaseButtonsAdd, DataActionTestCaseButtonsGet, DataActionTestCaseButtonsUpdate, DataActionTestCaseSpecificationUpdate, DataActionTestCaseStacksGet } from '../actions/action-test-case/data-action-test-case';
9
+ import { RealtimeActionTestCaseExecutionStart, RealtimeActionTestCaseDebugStart, RealtimeActionTestCaseDebugBreakpointSet, RealtimeActionTestCaseDebugBreakpointClear, RealtimeActionTestCaseDebugBreakpointUpdate, RealtimeActionTestCaseDebugGetMembers, RealtimeActionTestCaseDebugGetProperty, RealtimeActionTestCaseDebugGetSource } from '../actions/action-test-case/realtime-action-test-case';
10
+ import MarkupTestCase from 'z-abs-complayer-markup-client/client/markup/markup-test-case/markup-test-case';
11
+ import MarkupDocumentationPage from 'z-abs-complayer-markup-client/client/markup/markup-documentation/markup-documentation-page';
12
+ import DataTestCase from 'z-abs-complayer-markup-client/client/data/data-test-case/data-test-case';
13
+ import MessageTestCaseDebugContinue from 'z-abs-funclayer-engine-cs/clientServer/communication/messages/messages-client-to-server/message-test-case-debug-continue';
14
+ import MessageTestCaseDebugPause from 'z-abs-funclayer-engine-cs/clientServer/communication/messages/messages-client-to-server/message-test-case-debug-pause';
15
+ import MessageTestCaseDebugStepOver from 'z-abs-funclayer-engine-cs/clientServer/communication/messages/messages-client-to-server/message-test-case-debug-step-over';
16
+ import MessageTestCaseDebugStepIn from 'z-abs-funclayer-engine-cs/clientServer/communication/messages/messages-client-to-server/message-test-case-debug-step-in';
17
+ import MessageTestCaseDebugStepOut from 'z-abs-funclayer-engine-cs/clientServer/communication/messages/messages-client-to-server/message-test-case-debug-step-out';
18
+ import MessageTestCaseStop from 'z-abs-funclayer-engine-cs/clientServer/communication/messages/messages-client-to-server/message-test-case-stop';
19
+ import ActorResultConst from 'z-abs-funclayer-engine-cs/clientServer/execution/actor-result-const';
20
+ import GuidGenerator from 'z-abs-corelayer-cs/clientServer/guid-generator';
21
+ import StoreBaseRealtime from 'z-abs-corelayer-client/client/store/store-base-realtime';
22
+
23
+
24
+ class TestCaseStore extends StoreBaseRealtime {
25
+ static DEBUGGER_RUNNING = 0;
26
+ static DEBUGGER_BREAK = 1;
27
+ static DEBUGGER_NOT_RUNNING = 2;
28
+
29
+ static DEBUG_LOCAL = 0;
30
+ static DEBUG_REMOTE = 1;
31
+
32
+ static EXECUTION_NOT_RUNNING = 0;
33
+ static EXECUTION_RUNNING = 1;
34
+ static EXECUTION_DISABLED = 2;
35
+
36
+ static REALTIME_CONNECTION_CLOSED = 0;
37
+ static REALTIME_CONNECTION_OPEN = 1;
38
+ static REALTIME_CONNECTION_ERROR = 2;
39
+
40
+ constructor() {
41
+ super({
42
+ testCase: undefined,
43
+ error: null,
44
+ analyze: {
45
+ testData: new Map(),
46
+ dependencies: new Map(),
47
+ time: ''
48
+ },
49
+ dbugger: {
50
+ breakpoints: [],
51
+ state: TestCaseStore.DEBUGGER_NOT_RUNNING,
52
+ stack: [],
53
+ level: 0,
54
+ actor: {
55
+ index: -1,
56
+ name: ''
57
+ },
58
+ scopesOpen: new Map(),
59
+ currentThis: null,
60
+ currentValue: null,
61
+ objectValues: new Map(),
62
+ actorFiles: new Map(),
63
+ scripts: new Map()
64
+ },
65
+ markup: {
66
+ definition: false,
67
+ content: undefined,
68
+ contentOriginal: undefined,
69
+ rows: undefined
70
+ },
71
+ execution: TestCaseStore.EXECUTION_NOT_RUNNING,
72
+ realtimeConnection: TestCaseStore.REALTIME_CONNECTION_CLOSED,
73
+ recentTestCases: [],
74
+ testCases: [],
75
+ buttonsLoaded: false,
76
+ buttons: {
77
+ sequenceDiagram: {
78
+ zoom: 1.0,
79
+ width: 180,
80
+ scroll: true,
81
+
82
+ executedStateEvents: true,
83
+ notExecutedStateEvents: false,
84
+
85
+ serverEvents: false,
86
+ connectionEvents: false,
87
+ messageEvents: true,
88
+ messageDetailEvents: false,
89
+
90
+ protocolData: true,
91
+ protocolAddressNameData: false,
92
+ protocolIpData: true,
93
+ protocolTransportData: false,
94
+ protocolInfoData: false,
95
+ protocolInstanceData: true,
96
+ protocolNameData: true,
97
+
98
+ stackEvents: true,
99
+ stackInfoEvents: false,
100
+ stackInstanceEvents: true,
101
+ stackProtocolEvents: true,
102
+
103
+ guiEvents: true,
104
+ guiObjectEvents: true,
105
+ guiActionEvents: true,
106
+ guiFunctionEvents: false,
107
+ guiInfoData: true,
108
+ guiInstanceData: false,
109
+ guiProtocolData: false,
110
+
111
+ phases: [true, true, true, true, true],
112
+
113
+ ////////////////
114
+
115
+ showMessageContent: false,
116
+ showMessageContentOpen: false,
117
+ showSentMessageNumbers: false,
118
+ showReceivedMessageNumbers: false,
119
+ showSentMessageDetailNumbers: false,
120
+ showReceivedMessageDetailNumbers: false,
121
+
122
+ showAddresses: false
123
+ },
124
+ log: {
125
+ filterError: true,
126
+ filterWarning: true,
127
+ filterSuccess: true,
128
+ filterFailure: true,
129
+ filterEngine: false,
130
+ filterTestData: false,
131
+ filterDebug: false,
132
+ filterIP: true,
133
+ filterGUI: true,
134
+ filterBrowserLog: true,
135
+ filterBrowserErr: true,
136
+ filterDetailEngine: false,
137
+ filterDetailTestData: false,
138
+ filterDetailDebug: false,
139
+ filterOpenIp: false,
140
+ filterOpenGui: false,
141
+ filterOpenBrowserLog: false,
142
+ filterOpenBrowserErr: false,
143
+ zoom: 1.0,
144
+ scroll: true
145
+ },
146
+ debug: {
147
+ breakOnEnterRun: false,
148
+ breakOnLeaveRun: false,
149
+ breakOnIpEvent: false,
150
+ breakOnGuiEvent: false,
151
+ debugType: TestCaseStore.DEBUG_LOCAL
152
+ },
153
+ general: {
154
+ asService: false,
155
+ withLogs: true,
156
+ slowOnIpEvent: true,
157
+ slowOnGuiEvent: true
158
+ }
159
+ },
160
+ persistentData: {
161
+ darkMode: false
162
+ },
163
+ specification: {
164
+ definition: false,
165
+ document: [],
166
+ content: undefined,
167
+ contentLines: 0,
168
+ documentationPreview: {
169
+ document: []
170
+ //embededDocuments: new Map(),
171
+ //localNotes: new Map()
172
+ }
173
+ },
174
+ wizard: {
175
+ stacks: [],
176
+ stackTemplates: new Map()
177
+ }
178
+ });
179
+ this.sessionId = undefined;
180
+ this.buttonsKey = '';
181
+ this.on('DataActionLoginUpdate', (store) => {
182
+ this.buttonsKey = `${store.state.login.labId}_${store.state.login.userId}`;
183
+ this.sendDataAction(new DataActionTestCaseButtonsGet(this.buttonsKey));
184
+ });
185
+ }
186
+
187
+ onActionTestCaseMounted(action) {
188
+ const loginData = LoginStore.isLoggedIn();
189
+ if(loginData) {
190
+ this.buttonsKey = `${loginData.labId}_${loginData.userId}`;
191
+ this.sendDataAction(new DataActionTestCaseButtonsGet(this.buttonsKey));
192
+ this.sendDataAction(new DataActionTestCaseStacksGet());
193
+ }
194
+ else {
195
+ this.once('DataActionLoginGet', (store) => {
196
+ this.buttonsKey = `${store.state.login.labId}_${store.state.login.userId}`;
197
+ this.sendDataAction(new DataActionTestCaseButtonsGet(this.buttonsKey));
198
+ this.sendDataAction(new DataActionTestCaseStacksGet());
199
+ });
200
+ }
201
+ }
202
+
203
+ onActionTestCasePersistentDataUpdate(action) {
204
+ const persistentData = this.deepCopy(this.state.persistentData);
205
+ const parent = action.parentName ? persistentData[action.parentName] : persistentData;
206
+ parent[action.name] = action.value;
207
+ this.updateState({persistentData: {$set: parent}});
208
+ }
209
+
210
+ onActionTestCaseGet(action) {
211
+ this.clearMarkup();
212
+ this.sendDataAction(new DataActionTestCaseGet(action.repo, action.sut, action.fut, action.tc));
213
+ if(undefined !== action.tc) {
214
+ this.sendDataAction(new DataActionTestCaseRecentUpdate(action.repo, action.sut, action.fut, action.tc));
215
+ }
216
+ }
217
+
218
+ onActionTestCaseAdd(action) {
219
+ this.sendDataAction(new DataActionTestCaseAdd(action.repo, action.sut, action.fut, action.tc, action.description, new DataTestCase(), action.stackName, action.templateName, action.testData, action.show));
220
+ }
221
+
222
+ onActionTestCaseDelete(action) {
223
+ this.sendDataAction(new DataActionTestCaseDelete(action.tces));
224
+ }
225
+
226
+ onActionTestCaseRename(action) {
227
+ this.sendDataAction(new DataActionTestCaseRename(action.repo, action.sut, action.fut, action.currentTcName, action.newTcName, action.description, action.show));
228
+ }
229
+
230
+ onActionTestCaseMarkup(action) {
231
+ const markupTc = MarkupTestCase.stringify(this.state.testCase);
232
+ this.updateState({markup: {definition: {$set: true}}});
233
+ this.updateState({markup: {content: {$set: markupTc}}});
234
+ this.updateState({markup: {contentOriginal: {$set: markupTc}}});
235
+ }
236
+
237
+ onActionTestCaseMarkupSave(action) {
238
+ const result = MarkupTestCase.parse(this.state.markup.content);
239
+ if(!result.success) {
240
+ this.updateState({markup: {rows: {$set: result.rows}}});
241
+ }
242
+ else {
243
+ const actors = this.state.testCase.tc.actors;
244
+ result.tc.actors.forEach((actor) => {
245
+ for(let i = 0; i < actors.length; ++i) {
246
+ if(actors[i].name === actor.name) {
247
+ actor.inlineCode = actors[i].inlineCode;
248
+ }
249
+ }
250
+ });
251
+ this.updateState({testCase: {tc: {$set: result.tc}}});
252
+ this.sendDataAction(new DataActionTestCaseUpdate(action.repo, action.sut, action.fut, action.tc, undefined, this.state.testCase));
253
+ this.clearMarkup();
254
+ }
255
+ }
256
+
257
+ onActionTestCaseMarkupCancel(action) {
258
+ this.clearMarkup();
259
+ }
260
+
261
+ onActionTestCaseMarkupChange(action) {
262
+ const result = MarkupTestCase.parse(action.markup);
263
+ this.updateState({markup: {content: {$set: action.markup}}});
264
+ this.updateState({markup: {rows: {$set: result.rows}}});
265
+ }
266
+
267
+ onActionTestCaseMarkupCopy() {
268
+ const markupTc = MarkupTestCase.stringify(this.state.testCase);
269
+ navigator.clipboard.writeText(markupTc).then(() => {}, () => {});
270
+ }
271
+
272
+ onActionTestCaseExecutionStart(action) {
273
+ if(TestCaseStore.EXECUTION_NOT_RUNNING === this.state.execution) {
274
+ this.updateState({execution: {$set: TestCaseStore.EXECUTION_DISABLED}});
275
+ this.sessionId = GuidGenerator.create();
276
+ this.sendRealtimeAction(new RealtimeActionTestCaseExecutionStart(action), this.sessionId);
277
+ }
278
+ }
279
+
280
+ onActionTestCaseExecutionStop(action) {
281
+ this.updateState({execution: {$set: TestCaseStore.EXECUTION_DISABLED}});
282
+ this.sendRealtimeMessage(new MessageTestCaseStop(this.sessionId), null);
283
+ }
284
+
285
+ onActionTestCaseDebugStart(action) {
286
+ if(TestCaseStore.EXECUTION_NOT_RUNNING === this.state.execution) {
287
+ this.updateState({execution: {$set: TestCaseStore.EXECUTION_DISABLED}});
288
+ this.updateState({dbugger: {state: {$set: TestCaseStore.DEBUGGER_RUNNING}}});
289
+ this.sessionId = GuidGenerator.create();
290
+ this.sendRealtimeAction(new RealtimeActionTestCaseDebugStart(action), this.sessionId);
291
+ }
292
+ }
293
+
294
+ onActionTestCaseDebugBreakpointSet(action) {
295
+ this.sendRealtimeAction(new RealtimeActionTestCaseDebugBreakpointSet(action), this.sessionId);
296
+ }
297
+
298
+ onActionTestCaseDebugBreakpointClear(action) {
299
+ this.sendRealtimeAction(new RealtimeActionTestCaseDebugBreakpointClear(action), this.sessionId);
300
+ }
301
+
302
+ onActionTestCaseDebugBreakpointDeactivate(action) {
303
+ //this.sendDataAction(new DataActionTestCaseDebugBreakpointClearAll(action), this.sessionId);
304
+ }
305
+
306
+ onActionTestCaseDebugBreakpointClearAll(action) {
307
+ this.sendDataAction(new DataActionTestCaseDebugBreakpointClearAll(action), this.sessionId);
308
+ }
309
+
310
+ onActionTestCaseDebugStopAfterRun(action) {
311
+ this.sendDataAction(new DataActionTestCaseDebugStopAfterRun(action), this.sessionId);
312
+ }
313
+
314
+ onActionTestCaseDebugBreakpointUpdate(action) {
315
+ this.sendRealtimeAction(new RealtimeActionTestCaseDebugBreakpointUpdate(action), this.sessionId);
316
+ }
317
+
318
+ onActionTestCaseRecentGet(action) {
319
+ this.sendDataAction(new DataActionTestCaseRecentGet());
320
+ }
321
+
322
+ onActionTestCaseRecentDelete(action) {
323
+ this.sendDataAction(new DataActionTestCaseRecentDelete(action.repo, action.suts, action.futs, action.tces));
324
+ }
325
+
326
+ onActionTestCaseActorsFileGet(action) {
327
+ this.sendDataAction(new DataActionTestCaseActorsFileGet(action.actorFiles, action.actorKey));
328
+ }
329
+
330
+ onActionTestCaseDebugContinue(action) {
331
+ this.sendRealtimeMessage(new MessageTestCaseDebugContinue(this.sessionId), null);
332
+ this.updateState({dbugger: {
333
+ state: {$set: TestCaseStore.DEBUGGER_RUNNING}
334
+ }});
335
+ }
336
+
337
+ onActionTestCaseDebugPause(action) {
338
+ this.sendRealtimeMessage(new MessageTestCaseDebugPause(this.sessionId), null);
339
+ }
340
+
341
+ onActionTestCaseDebugStepOver(action) {
342
+ this.sendRealtimeMessage(new MessageTestCaseDebugStepOver(this.sessionId), null);
343
+ this.updateState({dbugger: {
344
+ state: {$set: TestCaseStore.DEBUGGER_RUNNING}
345
+ }});
346
+ }
347
+
348
+ onActionTestCaseDebugStepIn(action) {
349
+ this.sendRealtimeMessage(new MessageTestCaseDebugStepIn(this.sessionId), null);
350
+ this.updateState({dbugger: {
351
+ state: {$set: TestCaseStore.DEBUGGER_RUNNING}
352
+ }});
353
+ }
354
+
355
+ onActionTestCaseDebugStepOut(action) {
356
+ this.sendRealtimeMessage(new MessageTestCaseDebugStepOut(this.sessionId), null);
357
+ this.updateState({dbugger: {
358
+ state: {$set: TestCaseStore.DEBUGGER_RUNNING}
359
+ }});
360
+ }
361
+
362
+ onActionTestCaseDebugStep(action) {
363
+ /*this.sendRealtimeMessage(new MessageTestCaseDebugStep(this.sessionId), null);
364
+ this.updateState({dbugger: {
365
+ state: {$set: TestCaseStore.DEBUGGER_RUNNING}
366
+ }});*/
367
+ }
368
+
369
+ onActionTestCaseDebugLevel(action) {
370
+ this.sendRealtimeAction(new RealtimeActionTestCaseDebugGetSource(this.state.dbugger.stack[action.level].location.scriptId), this.sessionId);
371
+ const debugData = this._calculateDebugData(undefined, action.level, action.actorIndex);
372
+ if(debugData.thisValue) {
373
+ const name = 'this_' + debugData.thisValue.className;
374
+ const thisScope = debugData.scopesOpen.get(name);
375
+ if(thisScope && thisScope.open[0]) {
376
+ this.sendRealtimeAction(new RealtimeActionTestCaseDebugGetMembers(debugData.thisValue, true), this.sessionId);
377
+ }
378
+ }
379
+ this.updateState({dbugger: {
380
+ level: {$set: action.level},
381
+ actor: {
382
+ index: {$set: debugData.actor.index},
383
+ name: {$set: debugData.actor.name}
384
+ },
385
+ scopesOpen: {$set: debugData.scopesOpen}
386
+ }});
387
+ this.handleRealtimeMessage(new MessageNewActorIndex(debugData.actor.index));
388
+ }
389
+
390
+ onActionTestCaseDebugGetMembers(action) {
391
+ if(action.open) {
392
+ this.sendRealtimeAction(new RealtimeActionTestCaseDebugGetMembers(action.object, action.open), this.sessionId);
393
+ }
394
+ else {
395
+ const objectData = this.state.dbugger.objectValues.get(action.object.objectId);
396
+ this.updateState({dbugger: {objectValues: (objectValues) => {
397
+ const members = undefined !== objectData ? objectData.members : undefined;
398
+ const extraMembers = undefined !== objectData ? objectData.extraMembers : undefined;
399
+ objectValues.set(action.object.objectId, {
400
+ open: false,
401
+ members: members,
402
+ extraMembers: extraMembers
403
+ });
404
+ }}});
405
+ }
406
+ }
407
+
408
+ onActionTestCaseDebugGetProperty(action) {
409
+ this.sendRealtimeAction(new RealtimeActionTestCaseDebugGetProperty(action), this.sessionId);
410
+ }
411
+
412
+ onActionTestCaseDebugClearCurrentValue(action) {
413
+ this.updateState({dbugger: {currentValue: {$set: ''}}});
414
+ }
415
+
416
+ onActionTestCaseDebugScopeOpen(action) {
417
+ this.updateState({dbugger: {scopesOpen: (scopesOpen) => {
418
+ const scopeOpen = scopesOpen.get(action.name);
419
+ scopeOpen.open[action.index] = action.open;
420
+ }}});
421
+ }
422
+
423
+ onActionTestCaseAnalyze(action) {
424
+ this.sendDataAction(new DataActionTestCaseAnalyze(action));
425
+ }
426
+
427
+ onActionTestCaseAnalyzeClear(action) {
428
+ this.updateState({analyze: {testData: {$set: new Map()}}});
429
+ this.updateState({analyze: {dependencies: {$set: new Map()}}});
430
+ this.updateState({analyze: {time: {$set: ''}}});
431
+ }
432
+
433
+ onActionTestCaseButtonsUpdate(action) {
434
+ const buttons = this.deepCopy(this.state.buttons);
435
+ const tab = buttons[action.tab];
436
+ tab[action.button] = action.value;
437
+ this.sendDataAction(new DataActionTestCaseButtonsUpdate(action, this.buttonsKey, buttons));
438
+ }
439
+
440
+ onActionTestCaseZoom(action) {
441
+ const buttons = this.deepCopy(this.state.buttons);
442
+ buttons.zoom = action.zoom;
443
+ this.sendDataAction(new DataActionTestCaseButtonsUpdate(action, this.buttonsKey, buttons));
444
+ }
445
+
446
+ onActionTestCaseSpecificationMarkup(action) {
447
+ const markupDocument = MarkupDocumentationPage.stringify(this.state.specification.document);
448
+ this.updateState({specification: {definition: {$set: true}}});
449
+ this.updateState({specification: {content: {$set: markupDocument}}});
450
+ this.updateState({specification: {contentLines: {$set: markupDocument.split('\n').length}}});
451
+ this.updateState({specification: {documentationPreview: {document: {$set: this.state.specification.document}}}});
452
+ }
453
+
454
+ onActionTestCaseSpecificationMarkupChange(action) {
455
+ this.updateState({specification: {content: {$set: action.markup}}});
456
+ this.updateState({specification: {contentLines: {$set: action.markup.split('\n').length}}});
457
+ const document = MarkupDocumentationPage.parse(action.markup);
458
+ this.updateState({specification:{documentationPreview: {document: {$set: document}}}});
459
+ // this._getInternalDocumentationData(document, this.state.documentationPreview.embededDocuments, true);
460
+ }
461
+
462
+ onActionTestCaseSpecificationMarkupCancel(action) {
463
+ this._clearSpecificationMarkup();
464
+ this._clearSpecificationPreview();
465
+ }
466
+
467
+ onActionTestCaseSpecificationMarkupSave(action) {
468
+ this.sendDataAction(new DataActionTestCaseSpecificationUpdate(action.repoName, action.sutName, action.futName, action.tcName, this.state.testCase, action.markup));
469
+ this._clearSpecificationMarkup();
470
+ this._clearSpecificationPreview();
471
+ }
472
+
473
+ onDataActionTestCaseGet(action) {
474
+ const response = action.getResponse();
475
+ if(response.isSuccess()) {
476
+ this.updateState({error: {$set: null}});
477
+ if(undefined !== response.data.testCases) {
478
+ this.updateState({testCases: {$set: response.data.testCases}});
479
+ }
480
+ else if(undefined !== response.data.testCase) {
481
+ this.updateState({testCase: {$set: response.data.testCase}});
482
+ const document = MarkupDocumentationPage.parse(response.data.testCase.specification);
483
+ this.updateState({specification: {document: {$set: document}}});
484
+ this.calculateTestCases();
485
+ const actorFiles = this.state.testCase.tc.actors.map((actor) => {
486
+ return `./${actor.name.split('.').join('/')}.js`;
487
+ });
488
+ this.sendDataAction(new DataActionTestCaseDebugGet(action.repo, action.sut, action.fut, action.tc));
489
+ if(0 !== actorFiles.length) {
490
+ this.updateState({dbugger: {actorFiles: (actorFiles) => {
491
+ actorFiles.clear();
492
+ }}});
493
+ this.sendDataAction(new DataActionTestCaseActorsFileGet(actorFiles));
494
+ }
495
+ }
496
+ }
497
+ else {
498
+ this.updateState({error: {$set: response.result}});
499
+ }
500
+ }
501
+
502
+ onDataActionTestCaseAdd(action) {
503
+ const response = action.getResponse();
504
+ if(response.isSuccess()) {
505
+ if(action.show) {
506
+ this.sendDataAction(new DataActionTestCaseGet(action.repo, action.sut, action.fut, action.tc));
507
+ }
508
+ else {
509
+ this.sendDataAction(new DataActionTestCaseGet(action.repo, action.sut, action.fut));
510
+ }
511
+ this.calculateTestCases();
512
+ }
513
+ }
514
+
515
+ onDataActionTestCaseUpdate(action) {
516
+ const response = action.getResponse();
517
+ if(response.isSuccess()) {
518
+ this.sendDataAction(new DataActionTestCaseGet(action.repo, action.sut, action.fut, action.tc));
519
+ this.calculateTestCases();
520
+ }
521
+ }
522
+
523
+ onDataActionTestCaseDelete(action) {
524
+ const response = action.getResponse();
525
+ if(response.isSuccess()) {
526
+ const firstTc = action.tces[0];
527
+ this.sendDataAction(new DataActionTestCaseRecentDelete(firstTc.repo, firstTc.sut, firstTc.fut, action.tces));
528
+ this.sendDataAction(new DataActionTestCaseGet(firstTc.repo, firstTc.sut, firstTc.fut));
529
+ this.calculateTestCases();
530
+ }
531
+ }
532
+
533
+ onDataActionTestCaseRename(action) {
534
+ const response = action.getResponse();
535
+ if(response.isSuccess()) {
536
+ if(action.show) {
537
+ this.sendDataAction(new DataActionTestCaseGet(action.repo, action.sut, action.fut, action.newTcName));
538
+ }
539
+ else {
540
+ this.sendDataAction(new DataActionTestCaseGet(action.repo, action.sut, action.fut));
541
+ }
542
+ this.sendDataAction(new DataActionTestCaseRecentDelete(action.repo, action.sut, action.fut, [{
543
+ repo: action.repo,
544
+ sut: action.sut,
545
+ fut: action.fut,
546
+ tc: action.currentTcName
547
+ }]));
548
+ this.calculateTestCases();
549
+ }
550
+ }
551
+
552
+ onDataActionTestCaseRecentGet(action) {
553
+ const response = action.getResponse();
554
+ if(response.isSuccess()) {
555
+ this.updateState({recentTestCases: {$set: response.data}});
556
+ }
557
+ }
558
+
559
+ onDataActionTestCaseRecentUpdate(action) {
560
+ const response = action.getResponse();
561
+ if(response.isSuccess()) {
562
+ this.sendDataAction(new DataActionTestCaseRecentGet());
563
+ }
564
+ }
565
+
566
+ onDataActionTestCaseRecentDelete(action) {
567
+ const response = action.getResponse();
568
+ if(response.isSuccess()) {
569
+ this.sendDataAction(new DataActionTestCaseRecentGet());
570
+ }
571
+ }
572
+
573
+ onDataActionTestCaseActorsFileGet(action) {
574
+ const response = action.getResponse();
575
+ if(response.isSuccess()) {
576
+ if(!Array.isArray(response.data)) {
577
+ let actorFile = response.data;
578
+ if(null === actorFile) {
579
+ const actor = this.state.testCase.tc.actors.find((actor) => {
580
+ const name = action.actorFiles[0].replaceAll('/', '.');
581
+ return name === `..${actor.name}.js`;
582
+ });
583
+ if(actor) {
584
+ actorFile = actor.inlineCode;
585
+ }
586
+ }
587
+ if(actorFile) {
588
+ const url = action.actorFiles[0];
589
+ const actorFilesSplit = url.split('/');
590
+ const title = actorFilesSplit.pop();
591
+ const name = title.split('.').shift();
592
+ const index = action.actorKey || 0;
593
+ const breaks = this._findFunctionBreaks('*run', actorFile);
594
+ this.updateState({dbugger: {actorFiles: (actorFiles) => {
595
+ actorFiles.set(index, {
596
+ url,
597
+ title,
598
+ name,
599
+ path: actorFilesSplit.join('/'),
600
+ index,
601
+ previousIndex: index,
602
+ type: url.split('.').pop(),
603
+ content: actorFile,
604
+ lineRunEnter: breaks.enter,
605
+ lineRunLeave: breaks.leave
606
+ });
607
+ }}});
608
+ }
609
+ }
610
+ else {
611
+ let key = 0;
612
+ const exclusiveFile = new Map();
613
+ response.data.forEach((actorFile, index) => {
614
+ if(null === actorFile) {
615
+ const actor = this.state.testCase.tc.actors.find((actor) => {
616
+ const name = action.actorFiles[0].replaceAll('/', '.');
617
+ return name === `..${actor.name}.js`;
618
+ });
619
+ if(actor) {
620
+ actorFile = actor.inlineCode;
621
+ }
622
+ }
623
+ const url = action.actorFiles[index];
624
+ const duplicate = exclusiveFile.has(url);
625
+ if(!duplicate) {
626
+ exclusiveFile.set(url, key);
627
+ }
628
+ const actorFilesSplit = url.split('/');
629
+ const title = actorFilesSplit.pop();
630
+ const name = title.split('.').shift();
631
+ const breaks = this._findFunctionBreaks('*run', actorFile);
632
+ this.updateState({dbugger: {actorFiles: (actorFiles) => {
633
+ actorFiles.set(key++, {
634
+ url,
635
+ title,
636
+ name,
637
+ path: actorFilesSplit.join('/'),
638
+ index,
639
+ previousIndex: !duplicate ? index : exclusiveFile.get(url),
640
+ type: url.split('.').pop(),
641
+ content: actorFile,
642
+ lineRunEnter: breaks.enter,
643
+ lineRunLeave: breaks.leave
644
+ });
645
+ }}});
646
+ });
647
+ }
648
+ }
649
+ }
650
+
651
+ onDataActionTestCaseDebugGet(action) {
652
+ const response = action.getResponse();
653
+ if(response.isSuccess()) {
654
+ this.updateState({dbugger: {breakpoints: {$set: response.data.breakpoints}}});
655
+ }
656
+ }
657
+
658
+ onDataActionTestCaseDebugBreakpointClearAll(action) {
659
+ const response = action.getResponse();
660
+ if(response.isSuccess()) {
661
+ this.updateState({dbugger: {breakpoints: {$set: response.data}}});
662
+ }
663
+ }
664
+
665
+ onDataActionTestCaseAnalyze(action) {
666
+ const response = action.getResponse();
667
+ if(response.isSuccess()) {
668
+ this.updateState({analyze: {testData: {$set: new Map(response.data[0])}}});
669
+ this.updateState({analyze: {dependencies: {$set: new Map(response.data[1])}}});
670
+ this.updateState({analyze: {time: {$set: response.data[2]}}});
671
+ }
672
+ }
673
+
674
+ onDataActionTestCaseButtonsAdd(action) {
675
+ const response = action.getResponse();
676
+ if(response.isSuccess()) {
677
+ this.updateState({buttons: {$set: response.data}});
678
+ }
679
+ }
680
+
681
+ onDataActionTestCaseButtonsGet(action) {
682
+ const response = action.getResponse();
683
+ if(response.isSuccess()) {
684
+ const keys = Object.keys(this.state.buttons);
685
+ const resultObject = {};
686
+ keys.forEach((key) => {
687
+ const stateObject = this.state.buttons[key];
688
+ const storedObject = response.data[key];
689
+ const mergedObject = {...stateObject, ...storedObject};
690
+ resultObject[key] = mergedObject;
691
+ });
692
+ this.updateState({buttonsLoaded: {$set: true}, buttons: {$set: resultObject}});
693
+ }
694
+ else {
695
+ this.sendDataAction(new DataActionTestCaseButtonsAdd(this.buttonsKey, this.state.buttons));
696
+ }
697
+ }
698
+
699
+ onDataActionTestCaseButtonsUpdate(action) {
700
+ const response = action.getResponse();
701
+ if(response.isSuccess()) {
702
+ if('sequenceDiagram' === action.tab) {
703
+ this.updateState({buttons: {sequenceDiagram: {$set: response.data.sequenceDiagram}}});
704
+ }
705
+ else if('log' === action.tab) {
706
+ this.updateState({buttons: {log: {$set: response.data.log}}});
707
+ }
708
+ else if('debug' === action.tab) {
709
+ this.updateState({buttons: {debug: {$set: response.data.debug}}});
710
+ }
711
+ else if('general' === action.tab) {
712
+ this.updateState({buttons: {general: {$set: response.data.general}}});
713
+ }
714
+ }
715
+ }
716
+
717
+ onDataActionTestCaseSpecificationUpdate(action) {
718
+ const response = action.getResponse();
719
+ if(response.isSuccess()) {
720
+ this.sendDataAction(new DataActionTestCaseGet(action.repoName, action.sutName, action.futName, action.tcName));
721
+ }
722
+ }
723
+
724
+ onDataActionTestCaseStacksGet(action) {
725
+ const response = action.getResponse();
726
+ if(response.isSuccess()) {
727
+ if(response.data) {
728
+ const stacks = ['none'];
729
+ const stackTemplates = new Map();
730
+ response.data.forEach((stack) => {
731
+ stacks.push(stack[0]);
732
+ const stackTemplateMap = new Map(stack[1]);
733
+ stackTemplates.set(stack[0], stackTemplateMap);
734
+ });
735
+ this.updateState({wizard: {stacks: {$set: stacks}}});
736
+ this.updateState({wizard: {stackTemplates: {$set: stackTemplates}}});
737
+ }
738
+ }
739
+ }
740
+
741
+ onRealtimeActionTestCaseExecutionStart(action) {
742
+ const response = action.getResponse();
743
+ if(!response.isSuccess()) {
744
+ this.updateState({execution: {$set: TestCaseStore.EXECUTION_NOT_RUNNING}});
745
+ const msg = new MessageTestCaseNotStarted(('N/A' === action?.response?.result?.msg) ? ActorResultConst.NA : ActorResultConst.ERROR);
746
+ this.handleRealtimeMessage(msg);
747
+ }
748
+ }
749
+
750
+ onRealtimeActionTestCaseDebugStart(action) {
751
+ const response = action.getResponse();
752
+ if(!response.isSuccess()) {
753
+ this.updateState({execution: {$set: TestCaseStore.EXECUTION_NOT_RUNNING}});
754
+ this.updateState({dbugger: {state: {$set: TestCaseStore.DEBUGGER_NOT_RUNNING}}});
755
+ const msg = new MessageTestCaseNotStarted(('N/A' === action?.response?.result?.msg[0]) ? ActorResultConst.NA : ActorResultConst.ERROR);
756
+ this.handleRealtimeMessage(msg);
757
+ }
758
+ }
759
+
760
+ onRealtimeMessageTestCaseStarted(msg) {
761
+ this.updateState({execution: {$set: TestCaseStore.EXECUTION_RUNNING}});
762
+ }
763
+
764
+ onRealtimeMessageTestCaseStopped(msg) {
765
+ this._clearSession();
766
+ this.updateState({execution: {$set: TestCaseStore.EXECUTION_NOT_RUNNING}});
767
+ this.updateState({dbugger: {
768
+ state: {$set: TestCaseStore.DEBUGGER_NOT_RUNNING},
769
+ actor: {
770
+ index: {$set: -1},
771
+ name: {$set: ''}
772
+ }
773
+ }});
774
+ }
775
+
776
+ onRealtimeActionTestCaseDebugBreakpointSet(action) {
777
+ const response = action.getResponse();
778
+ if(response.isSuccess()) {
779
+ this.updateState({dbugger: {breakpoints: {$set: response.data.breakpoints}}});
780
+ }
781
+ }
782
+
783
+ onRealtimeActionTestCaseDebugBreakpointClear(action) {
784
+ const response = action.getResponse();
785
+ if(response.isSuccess()) {
786
+ this.updateState({dbugger: {breakpoints: {$set: response.data.breakpoints}}});
787
+ }
788
+ }
789
+
790
+ onRealtimeActionTestCaseDebugBreakpointUpdate(action) {
791
+ const response = action.getResponse();
792
+ if(response.isSuccess()) {
793
+ this.updateState({dbugger: {breakpoints: {$set: response.data.breakpoints}}});
794
+ }
795
+ }
796
+
797
+ onRealtimeActionTestCaseDebugGetMembers(action) {
798
+ const response = action.getResponse();
799
+ if(response.isSuccess()) {
800
+ const object = {
801
+ open: true,
802
+ name: action.object.description,
803
+ members: response.data.result,
804
+ extraMembers: response.data.extraResult
805
+ };
806
+ this.updateState({dbugger: {objectValues: (objectValues) => {
807
+ objectValues.set(action.object.objectId, object);
808
+ }}});
809
+ /*if(action.isCurrent) {
810
+ this.updateState({dbugger: {
811
+ currentThis: {$set: object},
812
+ currentValue: {$set: object}
813
+ }});
814
+ }*/
815
+ }
816
+ }
817
+
818
+ onRealtimeActionTestCaseDebugGetProperty(action) {
819
+ const response = action.getResponse();
820
+ if(response.isSuccess()) {
821
+ if(!response.data.name) {
822
+ response.data.name = action.memberNameArray[action.memberNameArray.length - 1];
823
+ }
824
+ this.updateState({dbugger: {currentValue: {$set: response.data}}});
825
+ }
826
+ }
827
+
828
+ onRealtimeActionTestCaseDebugGetSource(action) {
829
+ const response = action.getResponse();
830
+ if(response.isSuccess()) {
831
+ this.updateState({dbugger: {scripts: (scripts) => {
832
+ scripts.set(action.scriptId, response.data);
833
+ }}});
834
+ }
835
+ }
836
+
837
+ onRealtimeMessageTestCaseDebugPaused(msg) {
838
+ const level = 0;
839
+ const debugData = this._calculateDebugData(msg.stack, level, msg.actorIndex);
840
+ if(debugData) {
841
+ if(debugData.thisValue) {
842
+ //const name = 'this_' + debugData.thisValue.className;
843
+ //const thisScope = debugData.scopesOpen.get(name);
844
+ //if(thisScope && thisScope.open[0]) {
845
+ this.sendRealtimeAction(new RealtimeActionTestCaseDebugGetMembers(debugData.thisValue, true, true), this.sessionId);
846
+ //}
847
+ }
848
+ //const objectData = this.state.dbugger.objectValues.get(action.object.objectId);
849
+ /*if(!objectData) {
850
+
851
+ }*/
852
+ this.updateState({dbugger: {
853
+ state: {$set: TestCaseStore.DEBUGGER_BREAK},
854
+ stack: {$set: msg.stack},
855
+ level: {$set: level},
856
+ actor: {
857
+ index: {$set: debugData.actor.index},
858
+ name: {$set: debugData.actor.name}
859
+ },
860
+ scopesOpen: {$set: debugData.scopesOpen},
861
+ currentThis: {$set: debugData.thisValue},
862
+ currentValue: {$set: debugData.thisValue},
863
+ objectValues: {$set: new Map()},
864
+ scripts: (scripts) => {
865
+ scripts.set(msg.scriptId, msg.script);
866
+ }
867
+ }});
868
+ this.handleRealtimeMessage(new MessageNewActorIndex(debugData.actor.index));
869
+ }
870
+ }
871
+
872
+ onRealtimeMessageRealtimeOpen(msg) {
873
+ this.updateState({realtimeConnection: {$set: TestCaseStore.REALTIME_CONNECTION_OPEN}});
874
+ }
875
+
876
+ onRealtimeMessageRealtimeClosed(msg) {
877
+ this.updateState({realtimeConnection: {$set: TestCaseStore.REALTIME_CONNECTION_CLOSED}});
878
+ }
879
+
880
+ onActionTestCaseClear(action) {
881
+ this.handleRealtimeMessage(new MessageTestCaseClear(action.tab));
882
+ }
883
+
884
+ calculateTestCases() {
885
+ this.updateState({testCases: (testCases) => {
886
+ testCases.sort((a, b) => {
887
+ return a.name > b.name ? 1 : -1;
888
+ });
889
+ }});
890
+ }
891
+
892
+ clearMarkup() {
893
+ this.updateState({markup: {definition: {$set: false}}});
894
+ this.updateState({markup: {content: {$set: undefined}}});
895
+ this.updateState({markup: {contentOriginal: {$set: undefined}}});
896
+ this.updateState({markup: {rows: {$set: undefined}}});
897
+ }
898
+
899
+ _calculateScopes(debugStack, level) {
900
+ const callFrame = debugStack[level];
901
+ if(callFrame) {
902
+ const previousScopesOpen = this.state.dbugger.scopesOpen;
903
+ const scopeStatuses = new Map();
904
+ const nameInstances = new Map();
905
+ if(callFrame.this) {
906
+ const name = 'this_' + callFrame.this.className;
907
+ const thisPreviousScope = previousScopesOpen.get(name);
908
+ if(thisPreviousScope) {
909
+ scopeStatuses.set(name, {
910
+ amount: 1,
911
+ open: [thisPreviousScope.open[0]],
912
+ });
913
+ }
914
+ else {
915
+ scopeStatuses.set(name, {
916
+ amount: 1,
917
+ open: [true],
918
+ });
919
+ }
920
+ }
921
+ callFrame.scopes.forEach((scope) => {
922
+ const name = scope.type + '_' + (scope.name ? scope.name : '');
923
+ let open = !name.startsWith('global');
924
+ const previousScopeOpenGroup = previousScopesOpen.get(name);
925
+ let index = 0;
926
+ if(previousScopeOpenGroup) {
927
+ if(nameInstances.has(name)) {
928
+ if(nameInstances.has(name)) {
929
+ index = ++nameInstances.get(name).index;
930
+ }
931
+ else {
932
+ nameInstances.set(name, {index: 0});
933
+ }
934
+ }
935
+ const previousOpen = previousScopeOpenGroup.open[index];
936
+ if(undefined !== previousOpen) {
937
+ open = previousOpen;
938
+ }
939
+ }
940
+ if(scopeStatuses.has(name)) {
941
+ const scopeStatus = scopeStatuses.get(name);
942
+ ++scopeStatus.amount;
943
+ scopeStatus.open.push(open);
944
+ }
945
+ else {
946
+ scopeStatuses.set(name, {
947
+ amount: 1,
948
+ open: [open],
949
+ });
950
+ }
951
+ });
952
+ return scopeStatuses;
953
+ }
954
+ else {
955
+ return new Map();
956
+ }
957
+ }
958
+
959
+ _calculateDebugData(debugStack, level, actorIndex) {
960
+ if(-1 >= actorIndex) {
961
+ return;
962
+ }
963
+ if(!debugStack) {
964
+ debugStack = this.state.dbugger.stack;
965
+ }
966
+ actorIndex = this.state.dbugger.actorFiles.get(actorIndex).previousIndex;
967
+ const scopeStatuses = this._calculateScopes(debugStack, level);
968
+ const actorFiles = this.state.dbugger.actorFiles;
969
+ const fileName = actorFiles.get(actorIndex).name;
970
+ const stackLevel = debugStack[level];
971
+ return {
972
+ actor: {
973
+ index: actorIndex,
974
+ name: fileName
975
+ },
976
+ thisValue: stackLevel.this,
977
+ scopesOpen: scopeStatuses
978
+ };
979
+ /*for(let j = 0; j < debugStack.length; ++j) {
980
+ const stackLevel = debugStack[j];
981
+ if(stackLevel.this && stackLevel.this.description && (fileName === stackLevel.this.description || `Proxy(${fileName})` === stackLevel.this.description)) {
982
+ return {
983
+ actor: {
984
+ index: actorIndex,
985
+ name: fileName
986
+ },
987
+ thisValue: stackLevel.this,
988
+ scopesOpen: scopeStatuses
989
+ };
990
+ }
991
+ }
992
+ if(-1 !== this.state.dbugger.actor.index) {
993
+ return {
994
+ actor: this.state.dbugger.actor,
995
+ thisValue: debugStack[level].this,
996
+ scopesOpen: scopeStatuses
997
+ }
998
+ }
999
+ else if(0 !== this.state.dbugger.actorFiles.length) {
1000
+ return {
1001
+ actor: {
1002
+ index: 0,
1003
+ name: ''
1004
+ },
1005
+ thisValue: debugStack[level].this,
1006
+ scopesOpen: scopeStatuses
1007
+ }
1008
+ }*/
1009
+ }
1010
+
1011
+ // TODO: SHOULD BE STATIC
1012
+ STATIC() {
1013
+ return 'static';
1014
+ }
1015
+
1016
+ VISIBLE() {
1017
+ return 'visible';
1018
+ }
1019
+
1020
+ HIDDEN() {
1021
+ return 'hidden';
1022
+ }
1023
+
1024
+ _clearSession() {
1025
+ this.sessionId = undefined;
1026
+ }
1027
+
1028
+ _clearSpecificationMarkup() {
1029
+ this.updateState({specification: {definition: {$set: false}}});
1030
+ this.updateState({specification: {content: {$set: undefined}}});
1031
+ this.updateState({specification: {contentLines: {$set: 0}}});
1032
+ }
1033
+
1034
+ _clearSpecificationPreview() {
1035
+ this.updateState({specification: {documentationPreview: {document: {$set: []}}}});
1036
+ // this.updateState({specification: {documentationPreview: {embededDocuments: {$set: new Map()}}}});
1037
+ // this.updateState({specification: {documentationPreview: {localNotes: {$set: new Map()}}}});
1038
+ }
1039
+
1040
+ _findFirstCharacterOf(result, text, index, charString) {
1041
+ let bestFoundIndex = -1;
1042
+ let foundIndex = -1;
1043
+ for(let i = 0; i < charString.length; ++i) {
1044
+ const char = charString.charAt(i);
1045
+ foundIndex = text.indexOf(char, index);
1046
+ if(-1 !== foundIndex && (foundIndex < bestFoundIndex || -1 === bestFoundIndex)) {
1047
+ bestFoundIndex = foundIndex;
1048
+ result.char = char;
1049
+ result.index = foundIndex;
1050
+ }
1051
+ }
1052
+ }
1053
+
1054
+ _findFunctionIndexies(actorFile, index) {
1055
+ let depth = 1;
1056
+ const searchResult = {
1057
+ index: -1,
1058
+ char: ''
1059
+ };
1060
+ const result = {
1061
+ start: -1,
1062
+ stop: -1
1063
+ };
1064
+ this._findFirstCharacterOf(searchResult, actorFile, index, '{}');
1065
+ if(-1 === searchResult.index || '{' !== searchResult.char) {
1066
+ return result;
1067
+ }
1068
+ result.start = searchResult.index;
1069
+ index = searchResult.index + 1;
1070
+ do {
1071
+ this._findFirstCharacterOf(searchResult, actorFile, index, '{}');
1072
+ if('{' === searchResult.char) {
1073
+ ++depth;
1074
+ }
1075
+ else {
1076
+ --depth;
1077
+ }
1078
+ index = searchResult.index + 1;
1079
+ } while(-1 !== searchResult.index && depth > 0);
1080
+ if(0 === depth) {
1081
+ if(-1 !== searchResult.index || '}' !== searchResult.char) {
1082
+ result.stop = searchResult.index;
1083
+ }
1084
+ }
1085
+ return result;
1086
+ }
1087
+
1088
+ _findFunctionBreaks(name, actorFile) {
1089
+ const lineBreaks = {
1090
+ enter: -1,
1091
+ leave: -1
1092
+ };
1093
+ const index = actorFile.indexOf(name);
1094
+ if(-1 === index) {
1095
+ return lineBreaks;
1096
+ }
1097
+ const result = this._findFunctionIndexies(actorFile, index);
1098
+ if(-1 === result.start) {
1099
+ return lineBreaks;
1100
+ }
1101
+ let line = 0;
1102
+ let lineIndex = -1;
1103
+ do {
1104
+ ++line;
1105
+ lineIndex = actorFile.indexOf('\n', lineIndex + 1);
1106
+ } while (-1 !== lineIndex && lineIndex < result.start);
1107
+ lineBreaks.enter = line;
1108
+ do {
1109
+ ++line;
1110
+ lineIndex = actorFile.indexOf('\n', lineIndex + 1);
1111
+ } while (-1 !== lineIndex && lineIndex < result.stop);
1112
+ lineBreaks.leave = line - 1;
1113
+ return lineBreaks;
1114
+ }
1115
+ }
1116
+
1117
+
1118
+ module.exports = TestCaseStore.export(TestCaseStore);