@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.
- package/dist/cli/index.js +4 -1
- package/dist/client/assets/index-B8OSvcUg.css +1 -0
- package/dist/client/assets/index-CMMJHs_d.js +2197 -0
- package/dist/client/assets/index-CMMJHs_d.js.map +1 -0
- package/dist/client/index.html +2 -2
- package/dist/core/blocks/api/ApiAssertBodyContainsBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiAssertBodyContainsBlock.js +40 -0
- package/dist/core/blocks/api/ApiAssertStatusBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiAssertStatusBlock.js +35 -0
- package/dist/core/blocks/api/ApiClearHeadersBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiClearHeadersBlock.js +25 -0
- package/dist/core/blocks/api/ApiDeleteBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiDeleteBlock.js +37 -0
- package/dist/core/blocks/api/ApiExtractBlock.d.ts +14 -0
- package/dist/core/blocks/api/ApiExtractBlock.js +40 -0
- package/dist/core/blocks/api/ApiExtractJsonPathBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiExtractJsonPathBlock.js +47 -0
- package/dist/core/blocks/api/ApiExtractXPathBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiExtractXPathBlock.js +70 -0
- package/dist/core/blocks/api/ApiGetBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiGetBlock.js +36 -0
- package/dist/core/blocks/api/ApiHeadersBlock.d.ts +14 -0
- package/dist/core/blocks/api/ApiHeadersBlock.js +44 -0
- package/dist/core/blocks/api/ApiJsonBodyBlock.d.ts +14 -0
- package/dist/core/blocks/api/ApiJsonBodyBlock.js +28 -0
- package/dist/core/blocks/api/ApiPatchBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiPatchBlock.js +47 -0
- package/dist/core/blocks/api/ApiPostBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiPostBlock.js +47 -0
- package/dist/core/blocks/api/ApiPutBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiPutBlock.js +47 -0
- package/dist/core/blocks/api/ApiSetHeaderBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiSetHeaderBlock.js +37 -0
- package/dist/core/blocks/api/ApiSetHeadersBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiSetHeadersBlock.js +41 -0
- package/dist/core/blocks/api/index.d.ts +25 -0
- package/dist/core/blocks/api/index.js +83 -0
- package/dist/core/blocks/base/Block.d.ts +59 -0
- package/dist/core/blocks/base/Block.js +151 -0
- package/dist/core/blocks/base/ContainerBlock.d.ts +14 -0
- package/dist/core/blocks/base/ContainerBlock.js +16 -0
- package/dist/core/blocks/base/ControlFlowBlock.d.ts +13 -0
- package/dist/core/blocks/base/ControlFlowBlock.js +17 -0
- package/dist/core/blocks/base/StatementBlock.d.ts +9 -0
- package/dist/core/blocks/base/StatementBlock.js +16 -0
- package/dist/core/blocks/base/ValueBlock.d.ts +12 -0
- package/dist/core/blocks/base/ValueBlock.js +16 -0
- package/dist/core/blocks/base/index.d.ts +5 -0
- package/dist/core/blocks/base/index.js +13 -0
- package/dist/core/blocks/data/DataCsvBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataCsvBlock.js +51 -0
- package/dist/core/blocks/data/DataDefineBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataDefineBlock.js +28 -0
- package/dist/core/blocks/data/DataForeachBlock.d.ts +13 -0
- package/dist/core/blocks/data/DataForeachBlock.js +37 -0
- package/dist/core/blocks/data/DataFromVariableBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataFromVariableBlock.js +27 -0
- package/dist/core/blocks/data/DataGetCurrentBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataGetCurrentBlock.js +34 -0
- package/dist/core/blocks/data/DataGetIndexBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataGetIndexBlock.js +24 -0
- package/dist/core/blocks/data/DataGetNameBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataGetNameBlock.js +24 -0
- package/dist/core/blocks/data/DataRangeBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataRangeBlock.js +40 -0
- package/dist/core/blocks/data/DataRowBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataRowBlock.js +33 -0
- package/dist/core/blocks/data/DataTableBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataTableBlock.js +51 -0
- package/dist/core/blocks/data/index.d.ts +20 -0
- package/dist/core/blocks/data/index.js +57 -0
- package/dist/core/blocks/index.d.ts +66 -5
- package/dist/core/blocks/index.js +134 -35
- package/dist/core/blocks/lifecycle/LifecycleAfterAllBlock.d.ts +15 -0
- package/dist/core/blocks/lifecycle/LifecycleAfterAllBlock.js +27 -0
- package/dist/core/blocks/lifecycle/LifecycleAfterEachBlock.d.ts +15 -0
- package/dist/core/blocks/lifecycle/LifecycleAfterEachBlock.js +27 -0
- package/dist/core/blocks/lifecycle/LifecycleBeforeAllBlock.d.ts +15 -0
- package/dist/core/blocks/lifecycle/LifecycleBeforeAllBlock.js +28 -0
- package/dist/core/blocks/lifecycle/LifecycleBeforeEachBlock.d.ts +15 -0
- package/dist/core/blocks/lifecycle/LifecycleBeforeEachBlock.js +27 -0
- package/dist/core/blocks/lifecycle/LifecycleOnFailureBlock.d.ts +13 -0
- package/dist/core/blocks/lifecycle/LifecycleOnFailureBlock.js +25 -0
- package/dist/core/blocks/lifecycle/LifecycleRetryBlock.d.ts +13 -0
- package/dist/core/blocks/lifecycle/LifecycleRetryBlock.js +29 -0
- package/dist/core/blocks/lifecycle/LifecycleSetupBlock.d.ts +13 -0
- package/dist/core/blocks/lifecycle/LifecycleSetupBlock.js +27 -0
- package/dist/core/blocks/lifecycle/LifecycleSkipIfBlock.d.ts +13 -0
- package/dist/core/blocks/lifecycle/LifecycleSkipIfBlock.js +31 -0
- package/dist/core/blocks/lifecycle/LifecycleTeardownBlock.d.ts +13 -0
- package/dist/core/blocks/lifecycle/LifecycleTeardownBlock.js +27 -0
- package/dist/core/blocks/lifecycle/TestCaseBlock.d.ts +21 -0
- package/dist/core/blocks/lifecycle/TestCaseBlock.js +72 -0
- package/dist/core/blocks/lifecycle/TestCaseDataDrivenBlock.d.ts +21 -0
- package/dist/core/blocks/lifecycle/TestCaseDataDrivenBlock.js +102 -0
- package/dist/core/blocks/lifecycle/index.d.ts +21 -0
- package/dist/core/blocks/lifecycle/index.js +63 -0
- package/dist/core/blocks/logic/LogicArrayBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicArrayBlock.js +28 -0
- package/dist/core/blocks/logic/LogicAssertBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicAssertBlock.js +32 -0
- package/dist/core/blocks/logic/LogicBooleanBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicBooleanBlock.js +26 -0
- package/dist/core/blocks/logic/LogicBooleanOpBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicBooleanOpBlock.js +31 -0
- package/dist/core/blocks/logic/LogicCommentBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicCommentBlock.js +26 -0
- package/dist/core/blocks/logic/LogicCompareBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicCompareBlock.js +52 -0
- package/dist/core/blocks/logic/LogicFailBlock.d.ts +16 -0
- package/dist/core/blocks/logic/LogicFailBlock.js +30 -0
- package/dist/core/blocks/logic/LogicForeachBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicForeachBlock.js +29 -0
- package/dist/core/blocks/logic/LogicGetVariableBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicGetVariableBlock.js +27 -0
- package/dist/core/blocks/logic/LogicIfBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicIfBlock.js +36 -0
- package/dist/core/blocks/logic/LogicLogBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicLogBlock.js +30 -0
- package/dist/core/blocks/logic/LogicNotBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicNotBlock.js +26 -0
- package/dist/core/blocks/logic/LogicNumberBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicNumberBlock.js +26 -0
- package/dist/core/blocks/logic/LogicObjectBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicObjectBlock.js +28 -0
- package/dist/core/blocks/logic/LogicRepeatBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicRepeatBlock.js +27 -0
- package/dist/core/blocks/logic/LogicSetVariableBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicSetVariableBlock.js +34 -0
- package/dist/core/blocks/logic/LogicTextBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicTextBlock.js +27 -0
- package/dist/core/blocks/logic/LogicTryCatchBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicTryCatchBlock.js +26 -0
- package/dist/core/blocks/logic/index.d.ts +28 -0
- package/dist/core/blocks/logic/index.js +95 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAccessibleDescriptionBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAccessibleDescriptionBlock.js +41 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAccessibleNameBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAccessibleNameBlock.js +41 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAttachedBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAttachedBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAttributeBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAttributeBlock.js +44 -0
- package/dist/core/blocks/playwright/assertions/WebAssertCheckedBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertCheckedBlock.js +48 -0
- package/dist/core/blocks/playwright/assertions/WebAssertClassBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertClassBlock.js +43 -0
- package/dist/core/blocks/playwright/assertions/WebAssertCountBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertCountBlock.js +41 -0
- package/dist/core/blocks/playwright/assertions/WebAssertCssBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertCssBlock.js +44 -0
- package/dist/core/blocks/playwright/assertions/WebAssertDisabledBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertDisabledBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertEditableBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertEditableBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertEmptyBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertEmptyBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertEnabledBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertEnabledBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertFocusedBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertFocusedBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertIdBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertIdBlock.js +41 -0
- package/dist/core/blocks/playwright/assertions/WebAssertInViewportBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertInViewportBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertNotVisibleBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertNotVisibleBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertRoleBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertRoleBlock.js +69 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTextContainsBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTextContainsBlock.js +41 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTextEqualsBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTextEqualsBlock.js +41 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTitleContainsBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTitleContainsBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTitleEqualsBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTitleEqualsBlock.js +36 -0
- package/dist/core/blocks/playwright/assertions/WebAssertUrlContainsBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertUrlContainsBlock.js +40 -0
- package/dist/core/blocks/playwright/assertions/WebAssertUrlEqualsBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertUrlEqualsBlock.js +37 -0
- package/dist/core/blocks/playwright/assertions/WebAssertValueBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertValueBlock.js +43 -0
- package/dist/core/blocks/playwright/assertions/WebAssertValueContainsBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertValueContainsBlock.js +43 -0
- package/dist/core/blocks/playwright/assertions/WebAssertVisibleBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertVisibleBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/index.d.ts +36 -0
- package/dist/core/blocks/playwright/assertions/index.js +127 -0
- package/dist/core/blocks/playwright/index.d.ts +16 -0
- package/dist/core/blocks/playwright/index.js +28 -3
- package/dist/core/blocks/playwright/interactions/WebCheckboxBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebCheckboxBlock.js +43 -0
- package/dist/core/blocks/playwright/interactions/WebClickBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebClickBlock.js +34 -0
- package/dist/core/blocks/playwright/interactions/WebDragAndDropBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebDragAndDropBlock.js +37 -0
- package/dist/core/blocks/playwright/interactions/WebFillBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebFillBlock.js +38 -0
- package/dist/core/blocks/playwright/interactions/WebFocusBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebFocusBlock.js +34 -0
- package/dist/core/blocks/playwright/interactions/WebHoverBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebHoverBlock.js +34 -0
- package/dist/core/blocks/playwright/interactions/WebPressKeyBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebPressKeyBlock.js +37 -0
- package/dist/core/blocks/playwright/interactions/WebScrollIntoViewBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebScrollIntoViewBlock.js +34 -0
- package/dist/core/blocks/playwright/interactions/WebSelectBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebSelectBlock.js +37 -0
- package/dist/core/blocks/playwright/interactions/WebTypeBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebTypeBlock.js +41 -0
- package/dist/core/blocks/playwright/interactions/WebUploadFileBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebUploadFileBlock.js +39 -0
- package/dist/core/blocks/playwright/interactions/index.d.ts +21 -0
- package/dist/core/blocks/playwright/interactions/index.js +56 -0
- package/dist/core/blocks/playwright/navigation/WebNavigateBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/navigation/WebNavigateBlock.js +36 -0
- package/dist/core/blocks/playwright/navigation/WebScreenshotBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/navigation/WebScreenshotBlock.js +36 -0
- package/dist/core/blocks/playwright/navigation/WebWaitBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/navigation/WebWaitBlock.js +32 -0
- package/dist/core/blocks/playwright/navigation/WebWaitForElementBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/navigation/WebWaitForElementBlock.js +37 -0
- package/dist/core/blocks/playwright/navigation/WebWaitForUrlBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/navigation/WebWaitForUrlBlock.js +34 -0
- package/dist/core/blocks/playwright/navigation/index.d.ts +15 -0
- package/dist/core/blocks/playwright/navigation/index.js +32 -0
- package/dist/core/blocks/playwright/retrieval/WebCountElementsBlock.d.ts +16 -0
- package/dist/core/blocks/playwright/retrieval/WebCountElementsBlock.js +36 -0
- package/dist/core/blocks/playwright/retrieval/WebGetAttributeBlock.d.ts +16 -0
- package/dist/core/blocks/playwright/retrieval/WebGetAttributeBlock.js +42 -0
- package/dist/core/blocks/playwright/retrieval/WebGetInputValueBlock.d.ts +16 -0
- package/dist/core/blocks/playwright/retrieval/WebGetInputValueBlock.js +40 -0
- package/dist/core/blocks/playwright/retrieval/WebGetTextBlock.d.ts +16 -0
- package/dist/core/blocks/playwright/retrieval/WebGetTextBlock.js +40 -0
- package/dist/core/blocks/playwright/retrieval/WebGetTitleBlock.d.ts +16 -0
- package/dist/core/blocks/playwright/retrieval/WebGetTitleBlock.js +31 -0
- package/dist/core/blocks/playwright/retrieval/WebGetUrlBlock.d.ts +16 -0
- package/dist/core/blocks/playwright/retrieval/WebGetUrlBlock.js +31 -0
- package/dist/core/blocks/playwright/retrieval/index.d.ts +16 -0
- package/dist/core/blocks/playwright/retrieval/index.js +36 -0
- package/dist/core/blocks/playwright/types.d.ts +14 -0
- package/dist/core/blocks/procedures/ProcedureCallBlock.d.ts +13 -0
- package/dist/core/blocks/procedures/ProcedureCallBlock.js +66 -0
- package/dist/core/blocks/procedures/ProcedureCallWithReturnBlock.d.ts +14 -0
- package/dist/core/blocks/procedures/ProcedureCallWithReturnBlock.js +51 -0
- package/dist/core/blocks/procedures/ProcedureDefineBlock.d.ts +15 -0
- package/dist/core/blocks/procedures/ProcedureDefineBlock.js +59 -0
- package/dist/core/blocks/procedures/ProcedureFillFormBlock.d.ts +13 -0
- package/dist/core/blocks/procedures/ProcedureFillFormBlock.js +30 -0
- package/dist/core/blocks/procedures/ProcedureGetParamBlock.d.ts +14 -0
- package/dist/core/blocks/procedures/ProcedureGetParamBlock.js +33 -0
- package/dist/core/blocks/procedures/ProcedureInlineBlock.d.ts +14 -0
- package/dist/core/blocks/procedures/ProcedureInlineBlock.js +31 -0
- package/dist/core/blocks/procedures/ProcedureLoginBlock.d.ts +13 -0
- package/dist/core/blocks/procedures/ProcedureLoginBlock.js +37 -0
- package/dist/core/blocks/procedures/ProcedureMapBlock.d.ts +14 -0
- package/dist/core/blocks/procedures/ProcedureMapBlock.js +36 -0
- package/dist/core/blocks/procedures/ProcedureReturnBlock.d.ts +15 -0
- package/dist/core/blocks/procedures/ProcedureReturnBlock.js +28 -0
- package/dist/core/blocks/procedures/ProcedureWaitAndClickBlock.d.ts +13 -0
- package/dist/core/blocks/procedures/ProcedureWaitAndClickBlock.js +32 -0
- package/dist/core/blocks/procedures/index.d.ts +21 -0
- package/dist/core/blocks/procedures/index.js +62 -0
- package/dist/core/blocks/{procedures.d.ts → procedures/procedureRegistry.d.ts} +10 -2
- package/dist/core/blocks/procedures/procedureRegistry.js +27 -0
- package/dist/core/blocks/utils/apiUtils.d.ts +81 -0
- package/dist/core/blocks/utils/apiUtils.js +176 -0
- package/dist/core/blocks/utils/index.d.ts +2 -0
- package/dist/core/blocks/utils/index.js +16 -0
- package/dist/core/blocks/utils/variableUtils.d.ts +19 -0
- package/dist/core/blocks/utils/variableUtils.js +69 -0
- package/dist/server/index.js +117 -11
- package/dist/server/openApiParser.d.ts +82 -0
- package/dist/server/openApiParser.js +495 -0
- package/dist/server/startServer.d.ts +1 -0
- package/dist/server/startServer.js +164 -0
- package/package.json +4 -2
- package/dist/client/assets/index-BLBBQ6Rn.js +0 -2195
- package/dist/client/assets/index-BLBBQ6Rn.js.map +0 -1
- package/dist/client/assets/index-qjoPPl9y.css +0 -1
- package/dist/core/blocks/api.d.ts +0 -2
- package/dist/core/blocks/api.js +0 -607
- package/dist/core/blocks/data-driven.d.ts +0 -2
- package/dist/core/blocks/data-driven.js +0 -245
- package/dist/core/blocks/lifecycle.d.ts +0 -2
- package/dist/core/blocks/lifecycle.js +0 -201
- package/dist/core/blocks/logic.d.ts +0 -2
- package/dist/core/blocks/logic.js +0 -360
- package/dist/core/blocks/playwright/assertions.d.ts +0 -5
- package/dist/core/blocks/playwright/assertions.js +0 -311
- package/dist/core/blocks/playwright/interactions.d.ts +0 -5
- package/dist/core/blocks/playwright/interactions.js +0 -208
- package/dist/core/blocks/playwright/navigation.d.ts +0 -5
- package/dist/core/blocks/playwright/navigation.js +0 -131
- package/dist/core/blocks/playwright/retrieval.d.ts +0 -5
- package/dist/core/blocks/playwright/retrieval.js +0 -153
- package/dist/core/blocks/playwright.d.ts +0 -13
- package/dist/core/blocks/playwright.js +0 -17
- 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,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
|
-
];
|