@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
@@ -1,245 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dataDrivenBlocks = void 0;
4
- // Data-Driven Testing Blocks
5
- exports.dataDrivenBlocks = [
6
- // Define test data inline
7
- {
8
- type: 'data_define',
9
- category: 'Data',
10
- color: '#00897B',
11
- tooltip: 'Define test data sets for data-driven testing',
12
- inputs: [
13
- { name: 'DATA_JSON', type: 'field', fieldType: 'text', default: '[{"name": "test1", "value": 1}]' },
14
- ],
15
- output: { type: 'Array' },
16
- execute: async (params, context) => {
17
- const json = resolveVariables(params.DATA_JSON, context);
18
- return JSON.parse(json);
19
- },
20
- },
21
- // Load data from variable
22
- {
23
- type: 'data_from_variable',
24
- category: 'Data',
25
- color: '#00897B',
26
- tooltip: 'Get test data from a variable',
27
- inputs: [
28
- { name: 'NAME', type: 'field', fieldType: 'text', required: true },
29
- ],
30
- output: { type: 'Array' },
31
- execute: async (params, context) => {
32
- const name = params.NAME;
33
- return context.variables.get(name) || [];
34
- },
35
- },
36
- // Get current data value
37
- {
38
- type: 'data_get_current',
39
- category: 'Data',
40
- color: '#00897B',
41
- tooltip: 'Get a value from the current data set',
42
- inputs: [
43
- { name: 'KEY', type: 'field', fieldType: 'text', required: true },
44
- ],
45
- output: { type: ['String', 'Number', 'Boolean', 'Object', 'Array'] },
46
- execute: async (params, context) => {
47
- const key = params.KEY;
48
- if (!context.currentData) {
49
- throw new Error('No data set available. This block must be used inside a data-driven test.');
50
- }
51
- const value = context.currentData.values[key];
52
- if (value === undefined) {
53
- context.logger.warn(`Data key "${key}" not found in current data set`);
54
- }
55
- return value;
56
- },
57
- },
58
- // Get current iteration index
59
- {
60
- type: 'data_get_index',
61
- category: 'Data',
62
- color: '#00897B',
63
- tooltip: 'Get the current data iteration index (0-based)',
64
- inputs: [],
65
- output: { type: 'Number' },
66
- execute: async (params, context) => {
67
- return context.dataIndex ?? 0;
68
- },
69
- },
70
- // Get current data set name
71
- {
72
- type: 'data_get_name',
73
- category: 'Data',
74
- color: '#00897B',
75
- tooltip: 'Get the name of the current data set',
76
- inputs: [],
77
- output: { type: 'String' },
78
- execute: async (params, context) => {
79
- return context.currentData?.name ?? `Iteration ${(context.dataIndex ?? 0) + 1}`;
80
- },
81
- },
82
- // For each data - iterate over data array
83
- {
84
- type: 'data_foreach',
85
- category: 'Data',
86
- color: '#00897B',
87
- tooltip: 'Run steps for each item in a data set',
88
- inputs: [
89
- { name: 'DATA', type: 'value', check: 'Array', required: true },
90
- { name: 'ITEM_VAR', type: 'field', fieldType: 'text', default: 'item' },
91
- { name: 'INDEX_VAR', type: 'field', fieldType: 'text', default: 'index' },
92
- { name: 'DO', type: 'statement' },
93
- ],
94
- previousStatement: true,
95
- nextStatement: true,
96
- execute: async (params, _context) => {
97
- const data = params.DATA;
98
- const itemVar = params.ITEM_VAR;
99
- const indexVar = params.INDEX_VAR;
100
- return {
101
- dataLoop: true,
102
- data,
103
- itemVar,
104
- indexVar,
105
- statement: 'DO',
106
- };
107
- },
108
- },
109
- // Create data row
110
- {
111
- type: 'data_row',
112
- category: 'Data',
113
- color: '#00897B',
114
- tooltip: 'Create a single data row with key-value pairs',
115
- inputs: [
116
- { name: 'NAME', type: 'field', fieldType: 'text', default: '' },
117
- { name: 'JSON', type: 'field', fieldType: 'text', default: '{}' },
118
- ],
119
- output: { type: 'Object' },
120
- execute: async (params, context) => {
121
- const name = params.NAME;
122
- const json = resolveVariables(params.JSON, context);
123
- return {
124
- name: name || undefined,
125
- values: JSON.parse(json),
126
- };
127
- },
128
- },
129
- // Data table - create multiple rows at once
130
- {
131
- type: 'data_table',
132
- category: 'Data',
133
- color: '#00897B',
134
- tooltip: 'Create a data table with headers and rows',
135
- inputs: [
136
- { name: 'HEADERS', type: 'field', fieldType: 'text', default: 'username, password, expected' },
137
- { name: 'ROWS', type: 'field', fieldType: 'text', default: 'user1, pass1, true\nuser2, pass2, false' },
138
- ],
139
- output: { type: 'Array' },
140
- execute: async (params, context) => {
141
- const headersStr = params.HEADERS;
142
- const rowsStr = resolveVariables(params.ROWS, context);
143
- const headers = headersStr.split(',').map(h => h.trim());
144
- const rows = rowsStr.split('\n').filter(r => r.trim());
145
- return rows.map((row, index) => {
146
- const values = row.split(',').map(v => {
147
- const trimmed = v.trim();
148
- // Try to parse as JSON for numbers, booleans, etc.
149
- try {
150
- return JSON.parse(trimmed);
151
- }
152
- catch {
153
- return trimmed;
154
- }
155
- });
156
- const obj = {};
157
- headers.forEach((header, i) => {
158
- obj[header] = values[i];
159
- });
160
- return {
161
- name: `Row ${index + 1}`,
162
- values: obj,
163
- };
164
- });
165
- },
166
- },
167
- // CSV-style data
168
- {
169
- type: 'data_csv',
170
- category: 'Data',
171
- color: '#00897B',
172
- tooltip: 'Parse CSV-style data (first row as headers)',
173
- inputs: [
174
- { name: 'CSV', type: 'field', fieldType: 'text', default: 'name,value\ntest1,100\ntest2,200' },
175
- ],
176
- output: { type: 'Array' },
177
- execute: async (params, context) => {
178
- const csv = resolveVariables(params.CSV, context);
179
- const lines = csv.split('\n').filter(l => l.trim());
180
- if (lines.length < 2) {
181
- return [];
182
- }
183
- const headers = lines[0].split(',').map(h => h.trim());
184
- return lines.slice(1).map((line, index) => {
185
- const values = line.split(',').map(v => {
186
- const trimmed = v.trim();
187
- try {
188
- return JSON.parse(trimmed);
189
- }
190
- catch {
191
- return trimmed;
192
- }
193
- });
194
- const obj = {};
195
- headers.forEach((header, i) => {
196
- obj[header] = values[i];
197
- });
198
- return {
199
- name: `Row ${index + 1}`,
200
- values: obj,
201
- };
202
- });
203
- },
204
- },
205
- // Generate range of numbers
206
- {
207
- type: 'data_range',
208
- category: 'Data',
209
- color: '#00897B',
210
- tooltip: 'Generate a range of numbers as data',
211
- inputs: [
212
- { name: 'START', type: 'field', fieldType: 'number', default: 1 },
213
- { name: 'END', type: 'field', fieldType: 'number', default: 10 },
214
- { name: 'STEP', type: 'field', fieldType: 'number', default: 1 },
215
- { name: 'VAR_NAME', type: 'field', fieldType: 'text', default: 'n' },
216
- ],
217
- output: { type: 'Array' },
218
- execute: async (params, _context) => {
219
- const start = params.START;
220
- const end = params.END;
221
- const step = params.STEP;
222
- const varName = params.VAR_NAME;
223
- const result = [];
224
- for (let i = start; i <= end; i += step) {
225
- result.push({
226
- name: `${varName}=${i}`,
227
- values: { [varName]: i },
228
- });
229
- }
230
- return result;
231
- },
232
- },
233
- ];
234
- // Helper function
235
- function resolveVariables(text, context) {
236
- return text.replace(/\$\{(\w+)\}/g, (_, varName) => {
237
- // First check current data
238
- if (context.currentData?.values[varName] !== undefined) {
239
- return String(context.currentData.values[varName]);
240
- }
241
- // Then check variables
242
- const value = context.variables.get(varName);
243
- return value !== undefined ? String(value) : '';
244
- });
245
- }
@@ -1,2 +0,0 @@
1
- import { BlockDefinition } from '../types';
2
- export declare const lifecycleBlocks: BlockDefinition[];
@@ -1,201 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.lifecycleBlocks = void 0;
4
- // Lifecycle and Hook Blocks
5
- exports.lifecycleBlocks = [
6
- // Test Case - container for test steps
7
- {
8
- type: 'test_case',
9
- category: 'Tests',
10
- color: '#1E88E5',
11
- tooltip: 'A test case containing steps to execute',
12
- inputs: [
13
- { name: 'NAME', type: 'field', fieldType: 'multiline', default: 'Test Case' },
14
- { name: 'SOFT_ASSERTIONS', type: 'field', fieldType: 'checkbox', default: false },
15
- { name: 'STEPS', type: 'statement' },
16
- ],
17
- execute: async (params, _context) => {
18
- // Marker block - steps are executed by the executor
19
- return { testCase: true, name: params.NAME, softAssertions: params.SOFT_ASSERTIONS, statement: 'STEPS' };
20
- },
21
- },
22
- // Data-Driven Test Case - runs multiple times with different data
23
- {
24
- type: 'test_case_data_driven',
25
- category: 'Tests',
26
- color: '#1565C0',
27
- tooltip: 'A data-driven test case that runs for each row of data (CSV format: header row, then data rows)',
28
- inputs: [
29
- { name: 'NAME', type: 'field', fieldType: 'text', default: 'Data-Driven Test' },
30
- { name: 'SOFT_ASSERTIONS', type: 'field', fieldType: 'checkbox', default: false },
31
- { name: 'DATA', type: 'field', fieldType: 'multiline', default: 'username,password,expected\nuser1,pass1,true\nuser2,pass2,false' },
32
- { name: 'STEPS', type: 'statement' },
33
- ],
34
- execute: async (params, _context) => {
35
- // Marker block - actual data parsing and execution handled by executor
36
- const csvData = params.DATA;
37
- const rows = csvData.trim().split('\n').map(row => row.split(',').map(cell => cell.trim()));
38
- if (rows.length < 2) {
39
- return { testCase: true, name: params.NAME, softAssertions: params.SOFT_ASSERTIONS, dataDriven: true, data: [], statement: 'STEPS' };
40
- }
41
- const headers = rows[0];
42
- const data = rows.slice(1).map((row, index) => {
43
- const values = {};
44
- headers.forEach((header, i) => {
45
- let value = row[i] || '';
46
- // Try to parse as boolean or number
47
- if (value === 'true')
48
- value = true;
49
- else if (value === 'false')
50
- value = false;
51
- else if (!isNaN(Number(value)) && value !== '')
52
- value = Number(value);
53
- values[header] = value;
54
- });
55
- return { name: `Row ${index + 1}`, values };
56
- });
57
- return { testCase: true, name: params.NAME, softAssertions: params.SOFT_ASSERTIONS, dataDriven: true, data, statement: 'STEPS' };
58
- },
59
- },
60
- // Before All - runs once before all tests
61
- {
62
- type: 'lifecycle_before_all',
63
- category: 'Lifecycle',
64
- color: '#8E24AA',
65
- tooltip: 'Steps to run once before all tests in the suite',
66
- inputs: [
67
- { name: 'DO', type: 'statement' },
68
- ],
69
- execute: async (_params, _context) => {
70
- // Marker block - actual execution handled by executor
71
- return { lifecycle: 'beforeAll', statement: 'DO' };
72
- },
73
- },
74
- // After All - runs once after all tests
75
- {
76
- type: 'lifecycle_after_all',
77
- category: 'Lifecycle',
78
- color: '#8E24AA',
79
- tooltip: 'Steps to run once after all tests in the suite',
80
- inputs: [
81
- { name: 'DO', type: 'statement' },
82
- ],
83
- execute: async (_params, _context) => {
84
- return { lifecycle: 'afterAll', statement: 'DO' };
85
- },
86
- },
87
- // Before Each - runs before each test
88
- {
89
- type: 'lifecycle_before_each',
90
- category: 'Lifecycle',
91
- color: '#8E24AA',
92
- tooltip: 'Steps to run before each test',
93
- inputs: [
94
- { name: 'DO', type: 'statement' },
95
- ],
96
- execute: async (_params, _context) => {
97
- return { lifecycle: 'beforeEach', statement: 'DO' };
98
- },
99
- },
100
- // After Each - runs after each test
101
- {
102
- type: 'lifecycle_after_each',
103
- category: 'Lifecycle',
104
- color: '#8E24AA',
105
- tooltip: 'Steps to run after each test',
106
- inputs: [
107
- { name: 'DO', type: 'statement' },
108
- ],
109
- execute: async (_params, _context) => {
110
- return { lifecycle: 'afterEach', statement: 'DO' };
111
- },
112
- },
113
- // Setup - alias for beforeEach with clearer naming
114
- {
115
- type: 'lifecycle_setup',
116
- category: 'Lifecycle',
117
- color: '#8E24AA',
118
- tooltip: 'Setup steps to run before the test',
119
- inputs: [
120
- { name: 'DESCRIPTION', type: 'field', fieldType: 'text', default: 'Setup' },
121
- { name: 'DO', type: 'statement' },
122
- ],
123
- previousStatement: true,
124
- nextStatement: true,
125
- execute: async (params, context) => {
126
- context.logger.info(`Setup: ${params.DESCRIPTION}`);
127
- return { lifecycle: 'setup', statement: 'DO' };
128
- },
129
- },
130
- // Teardown - alias for afterEach with clearer naming
131
- {
132
- type: 'lifecycle_teardown',
133
- category: 'Lifecycle',
134
- color: '#8E24AA',
135
- tooltip: 'Teardown steps to run after the test',
136
- inputs: [
137
- { name: 'DESCRIPTION', type: 'field', fieldType: 'text', default: 'Teardown' },
138
- { name: 'DO', type: 'statement' },
139
- ],
140
- previousStatement: true,
141
- nextStatement: true,
142
- execute: async (params, context) => {
143
- context.logger.info(`Teardown: ${params.DESCRIPTION}`);
144
- return { lifecycle: 'teardown', statement: 'DO' };
145
- },
146
- },
147
- // Cleanup on failure - only runs if test fails
148
- {
149
- type: 'lifecycle_on_failure',
150
- category: 'Lifecycle',
151
- color: '#C62828',
152
- tooltip: 'Steps to run only if the test fails',
153
- inputs: [
154
- { name: 'DO', type: 'statement' },
155
- ],
156
- previousStatement: true,
157
- nextStatement: true,
158
- execute: async (_params, _context) => {
159
- return { lifecycle: 'onFailure', statement: 'DO' };
160
- },
161
- },
162
- // Skip test conditionally
163
- {
164
- type: 'lifecycle_skip_if',
165
- category: 'Lifecycle',
166
- color: '#757575',
167
- tooltip: 'Skip the rest of the test if condition is true',
168
- inputs: [
169
- { name: 'CONDITION', type: 'value', check: 'Boolean', required: true },
170
- { name: 'REASON', type: 'field', fieldType: 'text', default: 'Condition not met' },
171
- ],
172
- previousStatement: true,
173
- nextStatement: true,
174
- execute: async (params, _context) => {
175
- const condition = params.CONDITION;
176
- const reason = params.REASON;
177
- if (condition) {
178
- throw { skip: true, reason };
179
- }
180
- },
181
- },
182
- // Retry on failure
183
- {
184
- type: 'lifecycle_retry',
185
- category: 'Lifecycle',
186
- color: '#FF6F00',
187
- tooltip: 'Retry steps on failure',
188
- inputs: [
189
- { name: 'TIMES', type: 'field', fieldType: 'number', default: 3 },
190
- { name: 'DELAY', type: 'field', fieldType: 'number', default: 1000 },
191
- { name: 'DO', type: 'statement' },
192
- ],
193
- previousStatement: true,
194
- nextStatement: true,
195
- execute: async (params, _context) => {
196
- const times = params.TIMES;
197
- const delay = params.DELAY;
198
- return { retry: true, times, delay, statement: 'DO' };
199
- },
200
- },
201
- ];
@@ -1,2 +0,0 @@
1
- import { BlockDefinition } from '../types';
2
- export declare const logicBlocks: BlockDefinition[];