@testsmith/testblocks 0.9.4 → 0.9.7

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 (300) hide show
  1. package/dist/cli/index.js +4 -1
  2. package/dist/client/assets/index-B8OSvcUg.css +1 -0
  3. package/dist/client/assets/index-CMMJHs_d.js +2197 -0
  4. package/dist/client/assets/index-CMMJHs_d.js.map +1 -0
  5. package/dist/client/index.html +2 -2
  6. package/dist/core/blocks/api/ApiAssertBodyContainsBlock.d.ts +13 -0
  7. package/dist/core/blocks/api/ApiAssertBodyContainsBlock.js +40 -0
  8. package/dist/core/blocks/api/ApiAssertStatusBlock.d.ts +13 -0
  9. package/dist/core/blocks/api/ApiAssertStatusBlock.js +35 -0
  10. package/dist/core/blocks/api/ApiClearHeadersBlock.d.ts +13 -0
  11. package/dist/core/blocks/api/ApiClearHeadersBlock.js +25 -0
  12. package/dist/core/blocks/api/ApiDeleteBlock.d.ts +13 -0
  13. package/dist/core/blocks/api/ApiDeleteBlock.js +37 -0
  14. package/dist/core/blocks/api/ApiExtractBlock.d.ts +14 -0
  15. package/dist/core/blocks/api/ApiExtractBlock.js +40 -0
  16. package/dist/core/blocks/api/ApiExtractJsonPathBlock.d.ts +13 -0
  17. package/dist/core/blocks/api/ApiExtractJsonPathBlock.js +47 -0
  18. package/dist/core/blocks/api/ApiExtractXPathBlock.d.ts +13 -0
  19. package/dist/core/blocks/api/ApiExtractXPathBlock.js +70 -0
  20. package/dist/core/blocks/api/ApiGetBlock.d.ts +13 -0
  21. package/dist/core/blocks/api/ApiGetBlock.js +36 -0
  22. package/dist/core/blocks/api/ApiHeadersBlock.d.ts +14 -0
  23. package/dist/core/blocks/api/ApiHeadersBlock.js +44 -0
  24. package/dist/core/blocks/api/ApiJsonBodyBlock.d.ts +14 -0
  25. package/dist/core/blocks/api/ApiJsonBodyBlock.js +28 -0
  26. package/dist/core/blocks/api/ApiPatchBlock.d.ts +13 -0
  27. package/dist/core/blocks/api/ApiPatchBlock.js +47 -0
  28. package/dist/core/blocks/api/ApiPostBlock.d.ts +13 -0
  29. package/dist/core/blocks/api/ApiPostBlock.js +47 -0
  30. package/dist/core/blocks/api/ApiPutBlock.d.ts +13 -0
  31. package/dist/core/blocks/api/ApiPutBlock.js +47 -0
  32. package/dist/core/blocks/api/ApiSetHeaderBlock.d.ts +13 -0
  33. package/dist/core/blocks/api/ApiSetHeaderBlock.js +37 -0
  34. package/dist/core/blocks/api/ApiSetHeadersBlock.d.ts +13 -0
  35. package/dist/core/blocks/api/ApiSetHeadersBlock.js +41 -0
  36. package/dist/core/blocks/api/index.d.ts +25 -0
  37. package/dist/core/blocks/api/index.js +83 -0
  38. package/dist/core/blocks/base/Block.d.ts +59 -0
  39. package/dist/core/blocks/base/Block.js +151 -0
  40. package/dist/core/blocks/base/ContainerBlock.d.ts +14 -0
  41. package/dist/core/blocks/base/ContainerBlock.js +16 -0
  42. package/dist/core/blocks/base/ControlFlowBlock.d.ts +13 -0
  43. package/dist/core/blocks/base/ControlFlowBlock.js +17 -0
  44. package/dist/core/blocks/base/StatementBlock.d.ts +9 -0
  45. package/dist/core/blocks/base/StatementBlock.js +16 -0
  46. package/dist/core/blocks/base/ValueBlock.d.ts +12 -0
  47. package/dist/core/blocks/base/ValueBlock.js +16 -0
  48. package/dist/core/blocks/base/index.d.ts +5 -0
  49. package/dist/core/blocks/base/index.js +13 -0
  50. package/dist/core/blocks/data/DataCsvBlock.d.ts +14 -0
  51. package/dist/core/blocks/data/DataCsvBlock.js +51 -0
  52. package/dist/core/blocks/data/DataDefineBlock.d.ts +14 -0
  53. package/dist/core/blocks/data/DataDefineBlock.js +28 -0
  54. package/dist/core/blocks/data/DataForeachBlock.d.ts +13 -0
  55. package/dist/core/blocks/data/DataForeachBlock.js +37 -0
  56. package/dist/core/blocks/data/DataFromVariableBlock.d.ts +14 -0
  57. package/dist/core/blocks/data/DataFromVariableBlock.js +27 -0
  58. package/dist/core/blocks/data/DataGetCurrentBlock.d.ts +14 -0
  59. package/dist/core/blocks/data/DataGetCurrentBlock.js +34 -0
  60. package/dist/core/blocks/data/DataGetIndexBlock.d.ts +14 -0
  61. package/dist/core/blocks/data/DataGetIndexBlock.js +24 -0
  62. package/dist/core/blocks/data/DataGetNameBlock.d.ts +14 -0
  63. package/dist/core/blocks/data/DataGetNameBlock.js +24 -0
  64. package/dist/core/blocks/data/DataRangeBlock.d.ts +14 -0
  65. package/dist/core/blocks/data/DataRangeBlock.js +40 -0
  66. package/dist/core/blocks/data/DataRowBlock.d.ts +14 -0
  67. package/dist/core/blocks/data/DataRowBlock.js +33 -0
  68. package/dist/core/blocks/data/DataTableBlock.d.ts +14 -0
  69. package/dist/core/blocks/data/DataTableBlock.js +51 -0
  70. package/dist/core/blocks/data/index.d.ts +20 -0
  71. package/dist/core/blocks/data/index.js +57 -0
  72. package/dist/core/blocks/index.d.ts +66 -5
  73. package/dist/core/blocks/index.js +134 -35
  74. package/dist/core/blocks/lifecycle/LifecycleAfterAllBlock.d.ts +15 -0
  75. package/dist/core/blocks/lifecycle/LifecycleAfterAllBlock.js +27 -0
  76. package/dist/core/blocks/lifecycle/LifecycleAfterEachBlock.d.ts +15 -0
  77. package/dist/core/blocks/lifecycle/LifecycleAfterEachBlock.js +27 -0
  78. package/dist/core/blocks/lifecycle/LifecycleBeforeAllBlock.d.ts +15 -0
  79. package/dist/core/blocks/lifecycle/LifecycleBeforeAllBlock.js +28 -0
  80. package/dist/core/blocks/lifecycle/LifecycleBeforeEachBlock.d.ts +15 -0
  81. package/dist/core/blocks/lifecycle/LifecycleBeforeEachBlock.js +27 -0
  82. package/dist/core/blocks/lifecycle/LifecycleOnFailureBlock.d.ts +13 -0
  83. package/dist/core/blocks/lifecycle/LifecycleOnFailureBlock.js +25 -0
  84. package/dist/core/blocks/lifecycle/LifecycleRetryBlock.d.ts +13 -0
  85. package/dist/core/blocks/lifecycle/LifecycleRetryBlock.js +29 -0
  86. package/dist/core/blocks/lifecycle/LifecycleSetupBlock.d.ts +13 -0
  87. package/dist/core/blocks/lifecycle/LifecycleSetupBlock.js +27 -0
  88. package/dist/core/blocks/lifecycle/LifecycleSkipIfBlock.d.ts +13 -0
  89. package/dist/core/blocks/lifecycle/LifecycleSkipIfBlock.js +31 -0
  90. package/dist/core/blocks/lifecycle/LifecycleTeardownBlock.d.ts +13 -0
  91. package/dist/core/blocks/lifecycle/LifecycleTeardownBlock.js +27 -0
  92. package/dist/core/blocks/lifecycle/TestCaseBlock.d.ts +21 -0
  93. package/dist/core/blocks/lifecycle/TestCaseBlock.js +72 -0
  94. package/dist/core/blocks/lifecycle/TestCaseDataDrivenBlock.d.ts +21 -0
  95. package/dist/core/blocks/lifecycle/TestCaseDataDrivenBlock.js +102 -0
  96. package/dist/core/blocks/lifecycle/index.d.ts +21 -0
  97. package/dist/core/blocks/lifecycle/index.js +63 -0
  98. package/dist/core/blocks/logic/LogicArrayBlock.d.ts +14 -0
  99. package/dist/core/blocks/logic/LogicArrayBlock.js +28 -0
  100. package/dist/core/blocks/logic/LogicAssertBlock.d.ts +13 -0
  101. package/dist/core/blocks/logic/LogicAssertBlock.js +32 -0
  102. package/dist/core/blocks/logic/LogicBooleanBlock.d.ts +14 -0
  103. package/dist/core/blocks/logic/LogicBooleanBlock.js +26 -0
  104. package/dist/core/blocks/logic/LogicBooleanOpBlock.d.ts +14 -0
  105. package/dist/core/blocks/logic/LogicBooleanOpBlock.js +31 -0
  106. package/dist/core/blocks/logic/LogicCommentBlock.d.ts +13 -0
  107. package/dist/core/blocks/logic/LogicCommentBlock.js +26 -0
  108. package/dist/core/blocks/logic/LogicCompareBlock.d.ts +14 -0
  109. package/dist/core/blocks/logic/LogicCompareBlock.js +52 -0
  110. package/dist/core/blocks/logic/LogicFailBlock.d.ts +16 -0
  111. package/dist/core/blocks/logic/LogicFailBlock.js +30 -0
  112. package/dist/core/blocks/logic/LogicForeachBlock.d.ts +13 -0
  113. package/dist/core/blocks/logic/LogicForeachBlock.js +29 -0
  114. package/dist/core/blocks/logic/LogicGetVariableBlock.d.ts +14 -0
  115. package/dist/core/blocks/logic/LogicGetVariableBlock.js +27 -0
  116. package/dist/core/blocks/logic/LogicIfBlock.d.ts +13 -0
  117. package/dist/core/blocks/logic/LogicIfBlock.js +36 -0
  118. package/dist/core/blocks/logic/LogicLogBlock.d.ts +13 -0
  119. package/dist/core/blocks/logic/LogicLogBlock.js +30 -0
  120. package/dist/core/blocks/logic/LogicNotBlock.d.ts +14 -0
  121. package/dist/core/blocks/logic/LogicNotBlock.js +26 -0
  122. package/dist/core/blocks/logic/LogicNumberBlock.d.ts +14 -0
  123. package/dist/core/blocks/logic/LogicNumberBlock.js +26 -0
  124. package/dist/core/blocks/logic/LogicObjectBlock.d.ts +14 -0
  125. package/dist/core/blocks/logic/LogicObjectBlock.js +28 -0
  126. package/dist/core/blocks/logic/LogicRepeatBlock.d.ts +13 -0
  127. package/dist/core/blocks/logic/LogicRepeatBlock.js +27 -0
  128. package/dist/core/blocks/logic/LogicSetVariableBlock.d.ts +13 -0
  129. package/dist/core/blocks/logic/LogicSetVariableBlock.js +34 -0
  130. package/dist/core/blocks/logic/LogicTextBlock.d.ts +14 -0
  131. package/dist/core/blocks/logic/LogicTextBlock.js +27 -0
  132. package/dist/core/blocks/logic/LogicTryCatchBlock.d.ts +13 -0
  133. package/dist/core/blocks/logic/LogicTryCatchBlock.js +26 -0
  134. package/dist/core/blocks/logic/index.d.ts +28 -0
  135. package/dist/core/blocks/logic/index.js +95 -0
  136. package/dist/core/blocks/playwright/assertions/WebAssertAccessibleDescriptionBlock.d.ts +13 -0
  137. package/dist/core/blocks/playwright/assertions/WebAssertAccessibleDescriptionBlock.js +41 -0
  138. package/dist/core/blocks/playwright/assertions/WebAssertAccessibleNameBlock.d.ts +13 -0
  139. package/dist/core/blocks/playwright/assertions/WebAssertAccessibleNameBlock.js +41 -0
  140. package/dist/core/blocks/playwright/assertions/WebAssertAttachedBlock.d.ts +13 -0
  141. package/dist/core/blocks/playwright/assertions/WebAssertAttachedBlock.js +39 -0
  142. package/dist/core/blocks/playwright/assertions/WebAssertAttributeBlock.d.ts +13 -0
  143. package/dist/core/blocks/playwright/assertions/WebAssertAttributeBlock.js +44 -0
  144. package/dist/core/blocks/playwright/assertions/WebAssertCheckedBlock.d.ts +13 -0
  145. package/dist/core/blocks/playwright/assertions/WebAssertCheckedBlock.js +48 -0
  146. package/dist/core/blocks/playwright/assertions/WebAssertClassBlock.d.ts +13 -0
  147. package/dist/core/blocks/playwright/assertions/WebAssertClassBlock.js +43 -0
  148. package/dist/core/blocks/playwright/assertions/WebAssertCountBlock.d.ts +13 -0
  149. package/dist/core/blocks/playwright/assertions/WebAssertCountBlock.js +41 -0
  150. package/dist/core/blocks/playwright/assertions/WebAssertCssBlock.d.ts +13 -0
  151. package/dist/core/blocks/playwright/assertions/WebAssertCssBlock.js +44 -0
  152. package/dist/core/blocks/playwright/assertions/WebAssertDisabledBlock.d.ts +13 -0
  153. package/dist/core/blocks/playwright/assertions/WebAssertDisabledBlock.js +39 -0
  154. package/dist/core/blocks/playwright/assertions/WebAssertEditableBlock.d.ts +13 -0
  155. package/dist/core/blocks/playwright/assertions/WebAssertEditableBlock.js +39 -0
  156. package/dist/core/blocks/playwright/assertions/WebAssertEmptyBlock.d.ts +13 -0
  157. package/dist/core/blocks/playwright/assertions/WebAssertEmptyBlock.js +39 -0
  158. package/dist/core/blocks/playwright/assertions/WebAssertEnabledBlock.d.ts +13 -0
  159. package/dist/core/blocks/playwright/assertions/WebAssertEnabledBlock.js +39 -0
  160. package/dist/core/blocks/playwright/assertions/WebAssertFocusedBlock.d.ts +13 -0
  161. package/dist/core/blocks/playwright/assertions/WebAssertFocusedBlock.js +39 -0
  162. package/dist/core/blocks/playwright/assertions/WebAssertIdBlock.d.ts +13 -0
  163. package/dist/core/blocks/playwright/assertions/WebAssertIdBlock.js +41 -0
  164. package/dist/core/blocks/playwright/assertions/WebAssertInViewportBlock.d.ts +13 -0
  165. package/dist/core/blocks/playwright/assertions/WebAssertInViewportBlock.js +39 -0
  166. package/dist/core/blocks/playwright/assertions/WebAssertNotVisibleBlock.d.ts +13 -0
  167. package/dist/core/blocks/playwright/assertions/WebAssertNotVisibleBlock.js +39 -0
  168. package/dist/core/blocks/playwright/assertions/WebAssertRoleBlock.d.ts +13 -0
  169. package/dist/core/blocks/playwright/assertions/WebAssertRoleBlock.js +69 -0
  170. package/dist/core/blocks/playwright/assertions/WebAssertTextContainsBlock.d.ts +13 -0
  171. package/dist/core/blocks/playwright/assertions/WebAssertTextContainsBlock.js +41 -0
  172. package/dist/core/blocks/playwright/assertions/WebAssertTextEqualsBlock.d.ts +13 -0
  173. package/dist/core/blocks/playwright/assertions/WebAssertTextEqualsBlock.js +41 -0
  174. package/dist/core/blocks/playwright/assertions/WebAssertTitleContainsBlock.d.ts +13 -0
  175. package/dist/core/blocks/playwright/assertions/WebAssertTitleContainsBlock.js +39 -0
  176. package/dist/core/blocks/playwright/assertions/WebAssertTitleEqualsBlock.d.ts +13 -0
  177. package/dist/core/blocks/playwright/assertions/WebAssertTitleEqualsBlock.js +36 -0
  178. package/dist/core/blocks/playwright/assertions/WebAssertUrlContainsBlock.d.ts +13 -0
  179. package/dist/core/blocks/playwright/assertions/WebAssertUrlContainsBlock.js +40 -0
  180. package/dist/core/blocks/playwright/assertions/WebAssertUrlEqualsBlock.d.ts +13 -0
  181. package/dist/core/blocks/playwright/assertions/WebAssertUrlEqualsBlock.js +37 -0
  182. package/dist/core/blocks/playwright/assertions/WebAssertValueBlock.d.ts +13 -0
  183. package/dist/core/blocks/playwright/assertions/WebAssertValueBlock.js +43 -0
  184. package/dist/core/blocks/playwright/assertions/WebAssertValueContainsBlock.d.ts +13 -0
  185. package/dist/core/blocks/playwright/assertions/WebAssertValueContainsBlock.js +43 -0
  186. package/dist/core/blocks/playwright/assertions/WebAssertVisibleBlock.d.ts +13 -0
  187. package/dist/core/blocks/playwright/assertions/WebAssertVisibleBlock.js +39 -0
  188. package/dist/core/blocks/playwright/assertions/index.d.ts +36 -0
  189. package/dist/core/blocks/playwright/assertions/index.js +127 -0
  190. package/dist/core/blocks/playwright/index.d.ts +16 -0
  191. package/dist/core/blocks/playwright/index.js +28 -3
  192. package/dist/core/blocks/playwright/interactions/WebCheckboxBlock.d.ts +13 -0
  193. package/dist/core/blocks/playwright/interactions/WebCheckboxBlock.js +43 -0
  194. package/dist/core/blocks/playwright/interactions/WebClickBlock.d.ts +13 -0
  195. package/dist/core/blocks/playwright/interactions/WebClickBlock.js +34 -0
  196. package/dist/core/blocks/playwright/interactions/WebDragAndDropBlock.d.ts +13 -0
  197. package/dist/core/blocks/playwright/interactions/WebDragAndDropBlock.js +37 -0
  198. package/dist/core/blocks/playwright/interactions/WebFillBlock.d.ts +13 -0
  199. package/dist/core/blocks/playwright/interactions/WebFillBlock.js +38 -0
  200. package/dist/core/blocks/playwright/interactions/WebFocusBlock.d.ts +13 -0
  201. package/dist/core/blocks/playwright/interactions/WebFocusBlock.js +34 -0
  202. package/dist/core/blocks/playwright/interactions/WebHoverBlock.d.ts +13 -0
  203. package/dist/core/blocks/playwright/interactions/WebHoverBlock.js +34 -0
  204. package/dist/core/blocks/playwright/interactions/WebPressKeyBlock.d.ts +13 -0
  205. package/dist/core/blocks/playwright/interactions/WebPressKeyBlock.js +37 -0
  206. package/dist/core/blocks/playwright/interactions/WebScrollIntoViewBlock.d.ts +13 -0
  207. package/dist/core/blocks/playwright/interactions/WebScrollIntoViewBlock.js +34 -0
  208. package/dist/core/blocks/playwright/interactions/WebSelectBlock.d.ts +13 -0
  209. package/dist/core/blocks/playwright/interactions/WebSelectBlock.js +37 -0
  210. package/dist/core/blocks/playwright/interactions/WebTypeBlock.d.ts +13 -0
  211. package/dist/core/blocks/playwright/interactions/WebTypeBlock.js +41 -0
  212. package/dist/core/blocks/playwright/interactions/WebUploadFileBlock.d.ts +13 -0
  213. package/dist/core/blocks/playwright/interactions/WebUploadFileBlock.js +39 -0
  214. package/dist/core/blocks/playwright/interactions/index.d.ts +21 -0
  215. package/dist/core/blocks/playwright/interactions/index.js +56 -0
  216. package/dist/core/blocks/playwright/navigation/WebNavigateBlock.d.ts +13 -0
  217. package/dist/core/blocks/playwright/navigation/WebNavigateBlock.js +36 -0
  218. package/dist/core/blocks/playwright/navigation/WebScreenshotBlock.d.ts +13 -0
  219. package/dist/core/blocks/playwright/navigation/WebScreenshotBlock.js +36 -0
  220. package/dist/core/blocks/playwright/navigation/WebWaitBlock.d.ts +13 -0
  221. package/dist/core/blocks/playwright/navigation/WebWaitBlock.js +32 -0
  222. package/dist/core/blocks/playwright/navigation/WebWaitForElementBlock.d.ts +13 -0
  223. package/dist/core/blocks/playwright/navigation/WebWaitForElementBlock.js +37 -0
  224. package/dist/core/blocks/playwright/navigation/WebWaitForUrlBlock.d.ts +13 -0
  225. package/dist/core/blocks/playwright/navigation/WebWaitForUrlBlock.js +34 -0
  226. package/dist/core/blocks/playwright/navigation/index.d.ts +15 -0
  227. package/dist/core/blocks/playwright/navigation/index.js +32 -0
  228. package/dist/core/blocks/playwright/retrieval/WebCountElementsBlock.d.ts +16 -0
  229. package/dist/core/blocks/playwright/retrieval/WebCountElementsBlock.js +36 -0
  230. package/dist/core/blocks/playwright/retrieval/WebGetAttributeBlock.d.ts +16 -0
  231. package/dist/core/blocks/playwright/retrieval/WebGetAttributeBlock.js +42 -0
  232. package/dist/core/blocks/playwright/retrieval/WebGetInputValueBlock.d.ts +16 -0
  233. package/dist/core/blocks/playwright/retrieval/WebGetInputValueBlock.js +40 -0
  234. package/dist/core/blocks/playwright/retrieval/WebGetTextBlock.d.ts +16 -0
  235. package/dist/core/blocks/playwright/retrieval/WebGetTextBlock.js +40 -0
  236. package/dist/core/blocks/playwright/retrieval/WebGetTitleBlock.d.ts +16 -0
  237. package/dist/core/blocks/playwright/retrieval/WebGetTitleBlock.js +31 -0
  238. package/dist/core/blocks/playwright/retrieval/WebGetUrlBlock.d.ts +16 -0
  239. package/dist/core/blocks/playwright/retrieval/WebGetUrlBlock.js +31 -0
  240. package/dist/core/blocks/playwright/retrieval/index.d.ts +16 -0
  241. package/dist/core/blocks/playwright/retrieval/index.js +36 -0
  242. package/dist/core/blocks/playwright/types.d.ts +14 -0
  243. package/dist/core/blocks/procedures/ProcedureCallBlock.d.ts +13 -0
  244. package/dist/core/blocks/procedures/ProcedureCallBlock.js +66 -0
  245. package/dist/core/blocks/procedures/ProcedureCallWithReturnBlock.d.ts +14 -0
  246. package/dist/core/blocks/procedures/ProcedureCallWithReturnBlock.js +51 -0
  247. package/dist/core/blocks/procedures/ProcedureDefineBlock.d.ts +15 -0
  248. package/dist/core/blocks/procedures/ProcedureDefineBlock.js +59 -0
  249. package/dist/core/blocks/procedures/ProcedureFillFormBlock.d.ts +13 -0
  250. package/dist/core/blocks/procedures/ProcedureFillFormBlock.js +30 -0
  251. package/dist/core/blocks/procedures/ProcedureGetParamBlock.d.ts +14 -0
  252. package/dist/core/blocks/procedures/ProcedureGetParamBlock.js +33 -0
  253. package/dist/core/blocks/procedures/ProcedureInlineBlock.d.ts +14 -0
  254. package/dist/core/blocks/procedures/ProcedureInlineBlock.js +31 -0
  255. package/dist/core/blocks/procedures/ProcedureLoginBlock.d.ts +13 -0
  256. package/dist/core/blocks/procedures/ProcedureLoginBlock.js +37 -0
  257. package/dist/core/blocks/procedures/ProcedureMapBlock.d.ts +14 -0
  258. package/dist/core/blocks/procedures/ProcedureMapBlock.js +36 -0
  259. package/dist/core/blocks/procedures/ProcedureReturnBlock.d.ts +15 -0
  260. package/dist/core/blocks/procedures/ProcedureReturnBlock.js +28 -0
  261. package/dist/core/blocks/procedures/ProcedureWaitAndClickBlock.d.ts +13 -0
  262. package/dist/core/blocks/procedures/ProcedureWaitAndClickBlock.js +32 -0
  263. package/dist/core/blocks/procedures/index.d.ts +21 -0
  264. package/dist/core/blocks/procedures/index.js +62 -0
  265. package/dist/core/blocks/{procedures.d.ts → procedures/procedureRegistry.d.ts} +10 -2
  266. package/dist/core/blocks/procedures/procedureRegistry.js +27 -0
  267. package/dist/core/blocks/utils/apiUtils.d.ts +81 -0
  268. package/dist/core/blocks/utils/apiUtils.js +176 -0
  269. package/dist/core/blocks/utils/index.d.ts +2 -0
  270. package/dist/core/blocks/utils/index.js +16 -0
  271. package/dist/core/blocks/utils/variableUtils.d.ts +19 -0
  272. package/dist/core/blocks/utils/variableUtils.js +69 -0
  273. package/dist/server/index.js +117 -11
  274. package/dist/server/openApiParser.d.ts +82 -0
  275. package/dist/server/openApiParser.js +495 -0
  276. package/dist/server/startServer.d.ts +1 -0
  277. package/dist/server/startServer.js +164 -0
  278. package/package.json +4 -2
  279. package/dist/client/assets/index-BLBBQ6Rn.js +0 -2195
  280. package/dist/client/assets/index-BLBBQ6Rn.js.map +0 -1
  281. package/dist/client/assets/index-qjoPPl9y.css +0 -1
  282. package/dist/core/blocks/api.d.ts +0 -2
  283. package/dist/core/blocks/api.js +0 -607
  284. package/dist/core/blocks/data-driven.d.ts +0 -2
  285. package/dist/core/blocks/data-driven.js +0 -245
  286. package/dist/core/blocks/lifecycle.d.ts +0 -2
  287. package/dist/core/blocks/lifecycle.js +0 -201
  288. package/dist/core/blocks/logic.d.ts +0 -2
  289. package/dist/core/blocks/logic.js +0 -360
  290. package/dist/core/blocks/playwright/assertions.d.ts +0 -5
  291. package/dist/core/blocks/playwright/assertions.js +0 -311
  292. package/dist/core/blocks/playwright/interactions.d.ts +0 -5
  293. package/dist/core/blocks/playwright/interactions.js +0 -208
  294. package/dist/core/blocks/playwright/navigation.d.ts +0 -5
  295. package/dist/core/blocks/playwright/navigation.js +0 -131
  296. package/dist/core/blocks/playwright/retrieval.d.ts +0 -5
  297. package/dist/core/blocks/playwright/retrieval.js +0 -153
  298. package/dist/core/blocks/playwright.d.ts +0 -13
  299. package/dist/core/blocks/playwright.js +0 -17
  300. package/dist/core/blocks/procedures.js +0 -321
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LifecycleTeardownBlock = void 0;
4
+ const base_1 = require("../base");
5
+ /**
6
+ * Teardown steps to run after the test.
7
+ */
8
+ class LifecycleTeardownBlock extends base_1.StatementBlock {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.type = 'lifecycle_teardown';
12
+ this.category = 'Lifecycle';
13
+ this.color = '#8E24AA';
14
+ this.tooltip = 'Teardown steps to run after the test';
15
+ }
16
+ getInputs() {
17
+ return [
18
+ { name: 'DESCRIPTION', type: 'field', fieldType: 'text', default: 'Teardown' },
19
+ { name: 'DO', type: 'statement' },
20
+ ];
21
+ }
22
+ async execute(params, context) {
23
+ context.logger.info(`Teardown: ${params.DESCRIPTION}`);
24
+ return { lifecycle: 'teardown', statement: 'DO' };
25
+ }
26
+ }
27
+ exports.LifecycleTeardownBlock = LifecycleTeardownBlock;
@@ -0,0 +1,21 @@
1
+ import { ContainerBlock } from '../base';
2
+ import { BlockInput, ExecutionContext } from '../../types';
3
+ /**
4
+ * A test case containing steps to execute.
5
+ */
6
+ export declare class TestCaseBlock extends ContainerBlock {
7
+ readonly type = "test_case";
8
+ readonly category = "Tests";
9
+ readonly color = "#1E88E5";
10
+ readonly tooltip = "A test case containing steps to execute";
11
+ getInputs(): BlockInput[];
12
+ execute(params: Record<string, unknown>, _context: ExecutionContext): Promise<unknown>;
13
+ /**
14
+ * Custom Blockly JSON for test_case with multi-message layout.
15
+ */
16
+ toBlocklyJson(): Record<string, unknown>;
17
+ /**
18
+ * Custom init extension to add tooltip to soft assertions checkbox.
19
+ */
20
+ getBlocklyInitExtension(): (() => void) | undefined;
21
+ }
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TestCaseBlock = void 0;
4
+ const base_1 = require("../base");
5
+ /**
6
+ * A test case containing steps to execute.
7
+ */
8
+ class TestCaseBlock extends base_1.ContainerBlock {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.type = 'test_case';
12
+ this.category = 'Tests';
13
+ this.color = '#1E88E5';
14
+ this.tooltip = 'A test case containing steps to execute';
15
+ }
16
+ getInputs() {
17
+ return [
18
+ { name: 'NAME', type: 'field', fieldType: 'multiline', default: 'Test Case' },
19
+ { name: 'SOFT_ASSERTIONS', type: 'field', fieldType: 'checkbox', default: false },
20
+ { name: 'STEPS', type: 'statement' },
21
+ ];
22
+ }
23
+ async execute(params, _context) {
24
+ // Marker block - steps are executed by the executor
25
+ return { testCase: true, name: params.NAME, softAssertions: params.SOFT_ASSERTIONS, statement: 'STEPS' };
26
+ }
27
+ /**
28
+ * Custom Blockly JSON for test_case with multi-message layout.
29
+ */
30
+ toBlocklyJson() {
31
+ return {
32
+ type: this.type,
33
+ colour: this.color,
34
+ tooltip: this.tooltip || '',
35
+ helpUrl: this.helpUrl || '',
36
+ message0: 'Test %1 %2',
37
+ args0: [
38
+ {
39
+ type: 'field_multiline_autocomplete',
40
+ name: 'NAME',
41
+ text: 'Test Case',
42
+ spellcheck: false,
43
+ },
44
+ {
45
+ type: 'field_checkbox',
46
+ name: 'SOFT_ASSERTIONS',
47
+ checked: false,
48
+ },
49
+ ],
50
+ message1: '%1',
51
+ args1: [
52
+ {
53
+ type: 'input_statement',
54
+ name: 'STEPS',
55
+ },
56
+ ],
57
+ };
58
+ }
59
+ /**
60
+ * Custom init extension to add tooltip to soft assertions checkbox.
61
+ */
62
+ getBlocklyInitExtension() {
63
+ return function () {
64
+ const block = this;
65
+ const softAssertionsField = block.getField('SOFT_ASSERTIONS');
66
+ if (softAssertionsField) {
67
+ softAssertionsField.setTooltip('Soft Assertions - continue test on assertion failure');
68
+ }
69
+ };
70
+ }
71
+ }
72
+ exports.TestCaseBlock = TestCaseBlock;
@@ -0,0 +1,21 @@
1
+ import { ContainerBlock } from '../base';
2
+ import { BlockInput, ExecutionContext } from '../../types';
3
+ /**
4
+ * A data-driven test case that runs for each row of data (CSV format).
5
+ */
6
+ export declare class TestCaseDataDrivenBlock extends ContainerBlock {
7
+ readonly type = "test_case_data_driven";
8
+ readonly category = "Tests";
9
+ readonly color = "#1565C0";
10
+ readonly tooltip = "A data-driven test case that runs for each row of data (CSV format: header row, then data rows)";
11
+ getInputs(): BlockInput[];
12
+ execute(params: Record<string, unknown>, _context: ExecutionContext): Promise<unknown>;
13
+ /**
14
+ * Custom Blockly JSON for test_case_data_driven with multi-message layout.
15
+ */
16
+ toBlocklyJson(): Record<string, unknown>;
17
+ /**
18
+ * Custom init extension to add tooltip to soft assertions checkbox.
19
+ */
20
+ getBlocklyInitExtension(): (() => void) | undefined;
21
+ }
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TestCaseDataDrivenBlock = void 0;
4
+ const base_1 = require("../base");
5
+ /**
6
+ * A data-driven test case that runs for each row of data (CSV format).
7
+ */
8
+ class TestCaseDataDrivenBlock extends base_1.ContainerBlock {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.type = 'test_case_data_driven';
12
+ this.category = 'Tests';
13
+ this.color = '#1565C0';
14
+ this.tooltip = 'A data-driven test case that runs for each row of data (CSV format: header row, then data rows)';
15
+ }
16
+ getInputs() {
17
+ return [
18
+ { name: 'NAME', type: 'field', fieldType: 'text', default: 'Data-Driven Test' },
19
+ { name: 'SOFT_ASSERTIONS', type: 'field', fieldType: 'checkbox', default: false },
20
+ { name: 'DATA', type: 'field', fieldType: 'multiline', default: 'username,password,expected\nuser1,pass1,true\nuser2,pass2,false' },
21
+ { name: 'STEPS', type: 'statement' },
22
+ ];
23
+ }
24
+ async execute(params, _context) {
25
+ // Marker block - actual data parsing and execution handled by executor
26
+ const csvData = params.DATA;
27
+ const rows = csvData.trim().split('\n').map(row => row.split(',').map(cell => cell.trim()));
28
+ if (rows.length < 2) {
29
+ return { testCase: true, name: params.NAME, softAssertions: params.SOFT_ASSERTIONS, dataDriven: true, data: [], statement: 'STEPS' };
30
+ }
31
+ const headers = rows[0];
32
+ const data = rows.slice(1).map((row, index) => {
33
+ const values = {};
34
+ headers.forEach((header, i) => {
35
+ let value = row[i] || '';
36
+ // Try to parse as boolean or number
37
+ if (value === 'true')
38
+ value = true;
39
+ else if (value === 'false')
40
+ value = false;
41
+ else if (!isNaN(Number(value)) && value !== '')
42
+ value = Number(value);
43
+ values[header] = value;
44
+ });
45
+ return { name: `Row ${index + 1}`, values };
46
+ });
47
+ return { testCase: true, name: params.NAME, softAssertions: params.SOFT_ASSERTIONS, dataDriven: true, data, statement: 'STEPS' };
48
+ }
49
+ /**
50
+ * Custom Blockly JSON for test_case_data_driven with multi-message layout.
51
+ */
52
+ toBlocklyJson() {
53
+ return {
54
+ type: this.type,
55
+ colour: this.color,
56
+ tooltip: this.tooltip || '',
57
+ helpUrl: this.helpUrl || '',
58
+ message0: 'Data-Driven Test %1 %2',
59
+ args0: [
60
+ {
61
+ type: 'field_input_autocomplete',
62
+ name: 'NAME',
63
+ text: 'Data-Driven Test',
64
+ },
65
+ {
66
+ type: 'field_checkbox',
67
+ name: 'SOFT_ASSERTIONS',
68
+ checked: false,
69
+ },
70
+ ],
71
+ message1: 'Data %1',
72
+ args1: [
73
+ {
74
+ type: 'field_multiline_autocomplete',
75
+ name: 'DATA',
76
+ text: 'username,password,expected\nuser1,pass1,true\nuser2,pass2,false',
77
+ spellcheck: false,
78
+ },
79
+ ],
80
+ message2: '%1',
81
+ args2: [
82
+ {
83
+ type: 'input_statement',
84
+ name: 'STEPS',
85
+ },
86
+ ],
87
+ };
88
+ }
89
+ /**
90
+ * Custom init extension to add tooltip to soft assertions checkbox.
91
+ */
92
+ getBlocklyInitExtension() {
93
+ return function () {
94
+ const block = this;
95
+ const softAssertionsField = block.getField('SOFT_ASSERTIONS');
96
+ if (softAssertionsField) {
97
+ softAssertionsField.setTooltip('Soft Assertions - continue test on assertion failure');
98
+ }
99
+ };
100
+ }
101
+ }
102
+ exports.TestCaseDataDrivenBlock = TestCaseDataDrivenBlock;
@@ -0,0 +1,21 @@
1
+ import { Block } from '../base';
2
+ import { BlockDefinition } from '../../types';
3
+ export { TestCaseBlock } from './TestCaseBlock';
4
+ export { TestCaseDataDrivenBlock } from './TestCaseDataDrivenBlock';
5
+ export { LifecycleBeforeAllBlock } from './LifecycleBeforeAllBlock';
6
+ export { LifecycleAfterAllBlock } from './LifecycleAfterAllBlock';
7
+ export { LifecycleBeforeEachBlock } from './LifecycleBeforeEachBlock';
8
+ export { LifecycleAfterEachBlock } from './LifecycleAfterEachBlock';
9
+ export { LifecycleSetupBlock } from './LifecycleSetupBlock';
10
+ export { LifecycleTeardownBlock } from './LifecycleTeardownBlock';
11
+ export { LifecycleOnFailureBlock } from './LifecycleOnFailureBlock';
12
+ export { LifecycleSkipIfBlock } from './LifecycleSkipIfBlock';
13
+ export { LifecycleRetryBlock } from './LifecycleRetryBlock';
14
+ /**
15
+ * All Lifecycle block class instances.
16
+ */
17
+ export declare const lifecycleBlockClasses: Block[];
18
+ /**
19
+ * Lifecycle blocks as BlockDefinition array for backward compatibility.
20
+ */
21
+ export declare const lifecycleBlocks: BlockDefinition[];
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.lifecycleBlocks = exports.lifecycleBlockClasses = exports.LifecycleRetryBlock = exports.LifecycleSkipIfBlock = exports.LifecycleOnFailureBlock = exports.LifecycleTeardownBlock = exports.LifecycleSetupBlock = exports.LifecycleAfterEachBlock = exports.LifecycleBeforeEachBlock = exports.LifecycleAfterAllBlock = exports.LifecycleBeforeAllBlock = exports.TestCaseDataDrivenBlock = exports.TestCaseBlock = void 0;
4
+ // Test case blocks
5
+ var TestCaseBlock_1 = require("./TestCaseBlock");
6
+ Object.defineProperty(exports, "TestCaseBlock", { enumerable: true, get: function () { return TestCaseBlock_1.TestCaseBlock; } });
7
+ var TestCaseDataDrivenBlock_1 = require("./TestCaseDataDrivenBlock");
8
+ Object.defineProperty(exports, "TestCaseDataDrivenBlock", { enumerable: true, get: function () { return TestCaseDataDrivenBlock_1.TestCaseDataDrivenBlock; } });
9
+ // Lifecycle hooks
10
+ var LifecycleBeforeAllBlock_1 = require("./LifecycleBeforeAllBlock");
11
+ Object.defineProperty(exports, "LifecycleBeforeAllBlock", { enumerable: true, get: function () { return LifecycleBeforeAllBlock_1.LifecycleBeforeAllBlock; } });
12
+ var LifecycleAfterAllBlock_1 = require("./LifecycleAfterAllBlock");
13
+ Object.defineProperty(exports, "LifecycleAfterAllBlock", { enumerable: true, get: function () { return LifecycleAfterAllBlock_1.LifecycleAfterAllBlock; } });
14
+ var LifecycleBeforeEachBlock_1 = require("./LifecycleBeforeEachBlock");
15
+ Object.defineProperty(exports, "LifecycleBeforeEachBlock", { enumerable: true, get: function () { return LifecycleBeforeEachBlock_1.LifecycleBeforeEachBlock; } });
16
+ var LifecycleAfterEachBlock_1 = require("./LifecycleAfterEachBlock");
17
+ Object.defineProperty(exports, "LifecycleAfterEachBlock", { enumerable: true, get: function () { return LifecycleAfterEachBlock_1.LifecycleAfterEachBlock; } });
18
+ // In-test lifecycle blocks
19
+ var LifecycleSetupBlock_1 = require("./LifecycleSetupBlock");
20
+ Object.defineProperty(exports, "LifecycleSetupBlock", { enumerable: true, get: function () { return LifecycleSetupBlock_1.LifecycleSetupBlock; } });
21
+ var LifecycleTeardownBlock_1 = require("./LifecycleTeardownBlock");
22
+ Object.defineProperty(exports, "LifecycleTeardownBlock", { enumerable: true, get: function () { return LifecycleTeardownBlock_1.LifecycleTeardownBlock; } });
23
+ var LifecycleOnFailureBlock_1 = require("./LifecycleOnFailureBlock");
24
+ Object.defineProperty(exports, "LifecycleOnFailureBlock", { enumerable: true, get: function () { return LifecycleOnFailureBlock_1.LifecycleOnFailureBlock; } });
25
+ var LifecycleSkipIfBlock_1 = require("./LifecycleSkipIfBlock");
26
+ Object.defineProperty(exports, "LifecycleSkipIfBlock", { enumerable: true, get: function () { return LifecycleSkipIfBlock_1.LifecycleSkipIfBlock; } });
27
+ var LifecycleRetryBlock_1 = require("./LifecycleRetryBlock");
28
+ Object.defineProperty(exports, "LifecycleRetryBlock", { enumerable: true, get: function () { return LifecycleRetryBlock_1.LifecycleRetryBlock; } });
29
+ // Import all block classes
30
+ const TestCaseBlock_2 = require("./TestCaseBlock");
31
+ const TestCaseDataDrivenBlock_2 = require("./TestCaseDataDrivenBlock");
32
+ const LifecycleBeforeAllBlock_2 = require("./LifecycleBeforeAllBlock");
33
+ const LifecycleAfterAllBlock_2 = require("./LifecycleAfterAllBlock");
34
+ const LifecycleBeforeEachBlock_2 = require("./LifecycleBeforeEachBlock");
35
+ const LifecycleAfterEachBlock_2 = require("./LifecycleAfterEachBlock");
36
+ const LifecycleSetupBlock_2 = require("./LifecycleSetupBlock");
37
+ const LifecycleTeardownBlock_2 = require("./LifecycleTeardownBlock");
38
+ const LifecycleOnFailureBlock_2 = require("./LifecycleOnFailureBlock");
39
+ const LifecycleSkipIfBlock_2 = require("./LifecycleSkipIfBlock");
40
+ const LifecycleRetryBlock_2 = require("./LifecycleRetryBlock");
41
+ /**
42
+ * All Lifecycle block class instances.
43
+ */
44
+ exports.lifecycleBlockClasses = [
45
+ // Test case blocks
46
+ new TestCaseBlock_2.TestCaseBlock(),
47
+ new TestCaseDataDrivenBlock_2.TestCaseDataDrivenBlock(),
48
+ // Suite-level lifecycle hooks
49
+ new LifecycleBeforeAllBlock_2.LifecycleBeforeAllBlock(),
50
+ new LifecycleAfterAllBlock_2.LifecycleAfterAllBlock(),
51
+ new LifecycleBeforeEachBlock_2.LifecycleBeforeEachBlock(),
52
+ new LifecycleAfterEachBlock_2.LifecycleAfterEachBlock(),
53
+ // In-test lifecycle blocks
54
+ new LifecycleSetupBlock_2.LifecycleSetupBlock(),
55
+ new LifecycleTeardownBlock_2.LifecycleTeardownBlock(),
56
+ new LifecycleOnFailureBlock_2.LifecycleOnFailureBlock(),
57
+ new LifecycleSkipIfBlock_2.LifecycleSkipIfBlock(),
58
+ new LifecycleRetryBlock_2.LifecycleRetryBlock(),
59
+ ];
60
+ /**
61
+ * Lifecycle blocks as BlockDefinition array for backward compatibility.
62
+ */
63
+ exports.lifecycleBlocks = exports.lifecycleBlockClasses.map(block => block.toDefinition());
@@ -0,0 +1,14 @@
1
+ import { ValueBlock } from '../base';
2
+ import { BlockInput, BlockOutput, ExecutionContext } from '../../types';
3
+ /**
4
+ * Create an array.
5
+ */
6
+ export declare class LogicArrayBlock extends ValueBlock {
7
+ readonly type = "logic_array";
8
+ readonly category = "Logic";
9
+ readonly color = "#795548";
10
+ readonly tooltip = "Create an array";
11
+ readonly output: BlockOutput;
12
+ getInputs(): BlockInput[];
13
+ execute(params: Record<string, unknown>, context: ExecutionContext): Promise<unknown>;
14
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LogicArrayBlock = void 0;
4
+ const base_1 = require("../base");
5
+ const utils_1 = require("../utils");
6
+ /**
7
+ * Create an array.
8
+ */
9
+ class LogicArrayBlock extends base_1.ValueBlock {
10
+ constructor() {
11
+ super(...arguments);
12
+ this.type = 'logic_array';
13
+ this.category = 'Logic';
14
+ this.color = '#795548';
15
+ this.tooltip = 'Create an array';
16
+ this.output = { type: 'Array' };
17
+ }
18
+ getInputs() {
19
+ return [
20
+ { name: 'JSON', type: 'field', fieldType: 'text', default: '[]' },
21
+ ];
22
+ }
23
+ async execute(params, context) {
24
+ const json = (0, utils_1.resolveVariables)(params.JSON, context);
25
+ return JSON.parse(json);
26
+ }
27
+ }
28
+ exports.LogicArrayBlock = LogicArrayBlock;
@@ -0,0 +1,13 @@
1
+ import { StatementBlock } from '../base';
2
+ import { BlockInput, ExecutionContext } from '../../types';
3
+ /**
4
+ * Assert a condition is true.
5
+ */
6
+ export declare class LogicAssertBlock extends StatementBlock {
7
+ readonly type = "logic_assert";
8
+ readonly category = "Logic";
9
+ readonly color = "#FF9800";
10
+ readonly tooltip = "Assert a condition is true";
11
+ getInputs(): BlockInput[];
12
+ execute(params: Record<string, unknown>, context: ExecutionContext): Promise<unknown>;
13
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LogicAssertBlock = void 0;
4
+ const base_1 = require("../base");
5
+ const utils_1 = require("../utils");
6
+ const assertions_1 = require("../assertions");
7
+ /**
8
+ * Assert a condition is true.
9
+ */
10
+ class LogicAssertBlock extends base_1.StatementBlock {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.type = 'logic_assert';
14
+ this.category = 'Logic';
15
+ this.color = '#FF9800';
16
+ this.tooltip = 'Assert a condition is true';
17
+ }
18
+ getInputs() {
19
+ return [
20
+ { name: 'CONDITION', type: 'value', check: 'Boolean', required: true },
21
+ { name: 'MESSAGE', type: 'field', fieldType: 'text', default: 'Assertion failed' },
22
+ ];
23
+ }
24
+ async execute(params, context) {
25
+ const condition = params.CONDITION;
26
+ const message = (0, utils_1.resolveVariables)(params.MESSAGE, context);
27
+ (0, assertions_1.handleAssertion)(context, condition, message, { stepType: 'logic_assert', expected: true, actual: condition });
28
+ context.logger.info('✓ Assertion passed');
29
+ return undefined;
30
+ }
31
+ }
32
+ exports.LogicAssertBlock = LogicAssertBlock;
@@ -0,0 +1,14 @@
1
+ import { ValueBlock } from '../base';
2
+ import { BlockInput, BlockOutput, ExecutionContext } from '../../types';
3
+ /**
4
+ * A boolean value.
5
+ */
6
+ export declare class LogicBooleanBlock extends ValueBlock {
7
+ readonly type = "logic_boolean";
8
+ readonly category = "Logic";
9
+ readonly color = "#795548";
10
+ readonly tooltip = "A boolean value";
11
+ readonly output: BlockOutput;
12
+ getInputs(): BlockInput[];
13
+ execute(params: Record<string, unknown>, _context: ExecutionContext): Promise<unknown>;
14
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LogicBooleanBlock = void 0;
4
+ const base_1 = require("../base");
5
+ /**
6
+ * A boolean value.
7
+ */
8
+ class LogicBooleanBlock extends base_1.ValueBlock {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.type = 'logic_boolean';
12
+ this.category = 'Logic';
13
+ this.color = '#795548';
14
+ this.tooltip = 'A boolean value';
15
+ this.output = { type: 'Boolean' };
16
+ }
17
+ getInputs() {
18
+ return [
19
+ { name: 'BOOL', type: 'field', fieldType: 'dropdown', options: [['true', 'true'], ['false', 'false']] },
20
+ ];
21
+ }
22
+ async execute(params, _context) {
23
+ return params.BOOL === 'true';
24
+ }
25
+ }
26
+ exports.LogicBooleanBlock = LogicBooleanBlock;
@@ -0,0 +1,14 @@
1
+ import { ValueBlock } from '../base';
2
+ import { BlockInput, BlockOutput, ExecutionContext } from '../../types';
3
+ /**
4
+ * Combine boolean values.
5
+ */
6
+ export declare class LogicBooleanOpBlock extends ValueBlock {
7
+ readonly type = "logic_boolean_op";
8
+ readonly category = "Logic";
9
+ readonly color = "#5C6BC0";
10
+ readonly tooltip = "Combine boolean values";
11
+ readonly output: BlockOutput;
12
+ getInputs(): BlockInput[];
13
+ execute(params: Record<string, unknown>, _context: ExecutionContext): Promise<unknown>;
14
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LogicBooleanOpBlock = void 0;
4
+ const base_1 = require("../base");
5
+ /**
6
+ * Combine boolean values.
7
+ */
8
+ class LogicBooleanOpBlock extends base_1.ValueBlock {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.type = 'logic_boolean_op';
12
+ this.category = 'Logic';
13
+ this.color = '#5C6BC0';
14
+ this.tooltip = 'Combine boolean values';
15
+ this.output = { type: 'Boolean' };
16
+ }
17
+ getInputs() {
18
+ return [
19
+ { name: 'A', type: 'value', check: 'Boolean', required: true },
20
+ { name: 'OP', type: 'field', fieldType: 'dropdown', options: [['and', 'and'], ['or', 'or']] },
21
+ { name: 'B', type: 'value', check: 'Boolean', required: true },
22
+ ];
23
+ }
24
+ async execute(params, _context) {
25
+ const a = params.A;
26
+ const b = params.B;
27
+ const op = params.OP;
28
+ return op === 'and' ? a && b : a || b;
29
+ }
30
+ }
31
+ exports.LogicBooleanOpBlock = LogicBooleanOpBlock;
@@ -0,0 +1,13 @@
1
+ import { StatementBlock } from '../base';
2
+ import { BlockInput, ExecutionContext } from '../../types';
3
+ /**
4
+ * Add a comment (does nothing).
5
+ */
6
+ export declare class LogicCommentBlock extends StatementBlock {
7
+ readonly type = "logic_comment";
8
+ readonly category = "Logic";
9
+ readonly color = "#9E9E9E";
10
+ readonly tooltip = "Add a comment (does nothing)";
11
+ getInputs(): BlockInput[];
12
+ execute(_params: Record<string, unknown>, _context: ExecutionContext): Promise<unknown>;
13
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LogicCommentBlock = void 0;
4
+ const base_1 = require("../base");
5
+ /**
6
+ * Add a comment (does nothing).
7
+ */
8
+ class LogicCommentBlock extends base_1.StatementBlock {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.type = 'logic_comment';
12
+ this.category = 'Logic';
13
+ this.color = '#9E9E9E';
14
+ this.tooltip = 'Add a comment (does nothing)';
15
+ }
16
+ getInputs() {
17
+ return [
18
+ { name: 'TEXT', type: 'field', fieldType: 'text', default: 'Comment' },
19
+ ];
20
+ }
21
+ async execute(_params, _context) {
22
+ // No-op
23
+ return undefined;
24
+ }
25
+ }
26
+ exports.LogicCommentBlock = LogicCommentBlock;
@@ -0,0 +1,14 @@
1
+ import { ValueBlock } from '../base';
2
+ import { BlockInput, BlockOutput, ExecutionContext } from '../../types';
3
+ /**
4
+ * Compare two values.
5
+ */
6
+ export declare class LogicCompareBlock extends ValueBlock {
7
+ readonly type = "logic_compare";
8
+ readonly category = "Logic";
9
+ readonly color = "#5C6BC0";
10
+ readonly tooltip = "Compare two values";
11
+ readonly output: BlockOutput;
12
+ getInputs(): BlockInput[];
13
+ execute(params: Record<string, unknown>, _context: ExecutionContext): Promise<unknown>;
14
+ }
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LogicCompareBlock = void 0;
4
+ const base_1 = require("../base");
5
+ /**
6
+ * Compare two values.
7
+ */
8
+ class LogicCompareBlock extends base_1.ValueBlock {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.type = 'logic_compare';
12
+ this.category = 'Logic';
13
+ this.color = '#5C6BC0';
14
+ this.tooltip = 'Compare two values';
15
+ this.output = { type: 'Boolean' };
16
+ }
17
+ getInputs() {
18
+ return [
19
+ { name: 'A', type: 'value', required: true },
20
+ { name: 'OP', type: 'field', fieldType: 'dropdown', options: [['=', 'eq'], ['≠', 'neq'], ['<', 'lt'], ['≤', 'lte'], ['>', 'gt'], ['≥', 'gte'], ['contains', 'contains']] },
21
+ { name: 'B', type: 'value', required: true },
22
+ ];
23
+ }
24
+ async execute(params, _context) {
25
+ const a = params.A;
26
+ const b = params.B;
27
+ const op = params.OP;
28
+ switch (op) {
29
+ case 'eq':
30
+ return JSON.stringify(a) === JSON.stringify(b);
31
+ case 'neq':
32
+ return JSON.stringify(a) !== JSON.stringify(b);
33
+ case 'lt':
34
+ return a < b;
35
+ case 'lte':
36
+ return a <= b;
37
+ case 'gt':
38
+ return a > b;
39
+ case 'gte':
40
+ return a >= b;
41
+ case 'contains':
42
+ if (typeof a === 'string')
43
+ return a.includes(b);
44
+ if (Array.isArray(a))
45
+ return a.includes(b);
46
+ return false;
47
+ default:
48
+ return false;
49
+ }
50
+ }
51
+ }
52
+ exports.LogicCompareBlock = LogicCompareBlock;
@@ -0,0 +1,16 @@
1
+ import { Block } from '../base';
2
+ import { BlockInput, ExecutionContext } from '../../types';
3
+ /**
4
+ * Fail the test with a message.
5
+ * Note: This block has previousStatement but no nextStatement.
6
+ */
7
+ export declare class LogicFailBlock extends Block {
8
+ readonly type = "logic_fail";
9
+ readonly category = "Logic";
10
+ readonly color = "#f44336";
11
+ readonly tooltip = "Fail the test with a message";
12
+ readonly previousStatement = true;
13
+ readonly nextStatement = false;
14
+ getInputs(): BlockInput[];
15
+ execute(params: Record<string, unknown>, context: ExecutionContext): Promise<unknown>;
16
+ }