intellitester 0.2.16 → 0.2.18
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/{chunk-VPJNNQKB.js → chunk-EQJQS4RD.js} +133 -2
- package/dist/chunk-EQJQS4RD.js.map +1 -0
- package/dist/{chunk-LRXAHJTM.cjs → chunk-PL3IQXLK.cjs} +133 -2
- package/dist/chunk-PL3IQXLK.cjs.map +1 -0
- package/dist/cli/index.cjs +34 -34
- package/dist/cli/index.js +1 -1
- package/dist/index.cjs +28 -28
- package/dist/index.d.cts +158 -0
- package/dist/index.d.ts +158 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-LRXAHJTM.cjs.map +0 -1
- package/dist/chunk-VPJNNQKB.js.map +0 -1
|
@@ -41,6 +41,36 @@ var inputActionSchema = z.object({
|
|
|
41
41
|
target: LocatorSchema,
|
|
42
42
|
value: z.string().describe("Text to input (can reference variables with ${VAR_NAME})")
|
|
43
43
|
}).describe("Input text into a field");
|
|
44
|
+
var clearActionSchema = z.object({
|
|
45
|
+
type: z.literal("clear"),
|
|
46
|
+
target: LocatorSchema
|
|
47
|
+
}).describe("Clear the contents of an input field");
|
|
48
|
+
var hoverActionSchema = z.object({
|
|
49
|
+
type: z.literal("hover"),
|
|
50
|
+
target: LocatorSchema
|
|
51
|
+
}).describe("Hover over an element");
|
|
52
|
+
var selectActionSchema = z.object({
|
|
53
|
+
type: z.literal("select"),
|
|
54
|
+
target: LocatorSchema,
|
|
55
|
+
value: z.string().describe("Option value, label, or index to select")
|
|
56
|
+
}).describe("Select an option from a dropdown");
|
|
57
|
+
var checkActionSchema = z.object({
|
|
58
|
+
type: z.literal("check"),
|
|
59
|
+
target: LocatorSchema
|
|
60
|
+
}).describe("Check a checkbox");
|
|
61
|
+
var uncheckActionSchema = z.object({
|
|
62
|
+
type: z.literal("uncheck"),
|
|
63
|
+
target: LocatorSchema
|
|
64
|
+
}).describe("Uncheck a checkbox");
|
|
65
|
+
var pressActionSchema = z.object({
|
|
66
|
+
type: z.literal("press"),
|
|
67
|
+
key: nonEmptyString.describe("Key to press (e.g., Enter, Tab, Escape, ArrowDown)"),
|
|
68
|
+
target: LocatorSchema.optional().describe("Element to focus before pressing key")
|
|
69
|
+
}).describe("Press a keyboard key");
|
|
70
|
+
var focusActionSchema = z.object({
|
|
71
|
+
type: z.literal("focus"),
|
|
72
|
+
target: LocatorSchema
|
|
73
|
+
}).describe("Focus an element");
|
|
44
74
|
var assertActionSchema = z.object({
|
|
45
75
|
type: z.literal("assert"),
|
|
46
76
|
target: LocatorSchema,
|
|
@@ -101,6 +131,13 @@ var ActionSchema = z.discriminatedUnion("type", [
|
|
|
101
131
|
navigateActionSchema,
|
|
102
132
|
tapActionSchema,
|
|
103
133
|
inputActionSchema,
|
|
134
|
+
clearActionSchema,
|
|
135
|
+
hoverActionSchema,
|
|
136
|
+
selectActionSchema,
|
|
137
|
+
checkActionSchema,
|
|
138
|
+
uncheckActionSchema,
|
|
139
|
+
pressActionSchema,
|
|
140
|
+
focusActionSchema,
|
|
104
141
|
assertActionSchema,
|
|
105
142
|
waitActionSchema,
|
|
106
143
|
scrollActionSchema,
|
|
@@ -1323,6 +1360,53 @@ async function executeActionWithRetry(page, action, index, options) {
|
|
|
1323
1360
|
await runInput(page, action.target, action.value, context);
|
|
1324
1361
|
break;
|
|
1325
1362
|
}
|
|
1363
|
+
case "clear": {
|
|
1364
|
+
if (debugMode) console.log(`[DEBUG] Clearing element:`, action.target);
|
|
1365
|
+
const handle = resolveLocator(page, action.target);
|
|
1366
|
+
await handle.clear();
|
|
1367
|
+
break;
|
|
1368
|
+
}
|
|
1369
|
+
case "hover": {
|
|
1370
|
+
if (debugMode) console.log(`[DEBUG] Hovering element:`, action.target);
|
|
1371
|
+
const handle = resolveLocator(page, action.target);
|
|
1372
|
+
await handle.hover();
|
|
1373
|
+
break;
|
|
1374
|
+
}
|
|
1375
|
+
case "select": {
|
|
1376
|
+
const interpolated = interpolateVariables(action.value, context.variables);
|
|
1377
|
+
if (debugMode) console.log(`[DEBUG] Selecting: ${interpolated}`);
|
|
1378
|
+
const handle = resolveLocator(page, action.target);
|
|
1379
|
+
await handle.selectOption(interpolated);
|
|
1380
|
+
break;
|
|
1381
|
+
}
|
|
1382
|
+
case "check": {
|
|
1383
|
+
if (debugMode) console.log(`[DEBUG] Checking:`, action.target);
|
|
1384
|
+
const handle = resolveLocator(page, action.target);
|
|
1385
|
+
await handle.check();
|
|
1386
|
+
break;
|
|
1387
|
+
}
|
|
1388
|
+
case "uncheck": {
|
|
1389
|
+
if (debugMode) console.log(`[DEBUG] Unchecking:`, action.target);
|
|
1390
|
+
const handle = resolveLocator(page, action.target);
|
|
1391
|
+
await handle.uncheck();
|
|
1392
|
+
break;
|
|
1393
|
+
}
|
|
1394
|
+
case "press": {
|
|
1395
|
+
if (debugMode) console.log(`[DEBUG] Pressing key: ${action.key}`);
|
|
1396
|
+
if (action.target) {
|
|
1397
|
+
const handle = resolveLocator(page, action.target);
|
|
1398
|
+
await handle.press(action.key);
|
|
1399
|
+
} else {
|
|
1400
|
+
await page.keyboard.press(action.key);
|
|
1401
|
+
}
|
|
1402
|
+
break;
|
|
1403
|
+
}
|
|
1404
|
+
case "focus": {
|
|
1405
|
+
if (debugMode) console.log(`[DEBUG] Focusing:`, action.target);
|
|
1406
|
+
const handle = resolveLocator(page, action.target);
|
|
1407
|
+
await handle.focus();
|
|
1408
|
+
break;
|
|
1409
|
+
}
|
|
1326
1410
|
case "assert": {
|
|
1327
1411
|
if (debugMode) {
|
|
1328
1412
|
console.log(`[DEBUG] Asserting element:`, action.target);
|
|
@@ -1854,6 +1938,53 @@ async function runTestInWorkflow(test, page, context, options, _workflowDir, wor
|
|
|
1854
1938
|
await handle.fill(interpolated);
|
|
1855
1939
|
break;
|
|
1856
1940
|
}
|
|
1941
|
+
case "clear": {
|
|
1942
|
+
if (debugMode) console.log(` [DEBUG] Clearing element:`, action.target);
|
|
1943
|
+
const handle = resolveLocator2(action.target);
|
|
1944
|
+
await handle.clear();
|
|
1945
|
+
break;
|
|
1946
|
+
}
|
|
1947
|
+
case "hover": {
|
|
1948
|
+
if (debugMode) console.log(` [DEBUG] Hovering element:`, action.target);
|
|
1949
|
+
const handle = resolveLocator2(action.target);
|
|
1950
|
+
await handle.hover();
|
|
1951
|
+
break;
|
|
1952
|
+
}
|
|
1953
|
+
case "select": {
|
|
1954
|
+
const interpolated = interpolateVariables2(action.value);
|
|
1955
|
+
if (debugMode) console.log(` [DEBUG] Selecting: ${interpolated}`);
|
|
1956
|
+
const handle = resolveLocator2(action.target);
|
|
1957
|
+
await handle.selectOption(interpolated);
|
|
1958
|
+
break;
|
|
1959
|
+
}
|
|
1960
|
+
case "check": {
|
|
1961
|
+
if (debugMode) console.log(` [DEBUG] Checking:`, action.target);
|
|
1962
|
+
const handle = resolveLocator2(action.target);
|
|
1963
|
+
await handle.check();
|
|
1964
|
+
break;
|
|
1965
|
+
}
|
|
1966
|
+
case "uncheck": {
|
|
1967
|
+
if (debugMode) console.log(` [DEBUG] Unchecking:`, action.target);
|
|
1968
|
+
const handle = resolveLocator2(action.target);
|
|
1969
|
+
await handle.uncheck();
|
|
1970
|
+
break;
|
|
1971
|
+
}
|
|
1972
|
+
case "press": {
|
|
1973
|
+
if (debugMode) console.log(` [DEBUG] Pressing key: ${action.key}`);
|
|
1974
|
+
if (action.target) {
|
|
1975
|
+
const handle = resolveLocator2(action.target);
|
|
1976
|
+
await handle.press(action.key);
|
|
1977
|
+
} else {
|
|
1978
|
+
await page.keyboard.press(action.key);
|
|
1979
|
+
}
|
|
1980
|
+
break;
|
|
1981
|
+
}
|
|
1982
|
+
case "focus": {
|
|
1983
|
+
if (debugMode) console.log(` [DEBUG] Focusing:`, action.target);
|
|
1984
|
+
const handle = resolveLocator2(action.target);
|
|
1985
|
+
await handle.focus();
|
|
1986
|
+
break;
|
|
1987
|
+
}
|
|
1857
1988
|
case "assert": {
|
|
1858
1989
|
if (debugMode) console.log(` [DEBUG] Assert:`, action.target);
|
|
1859
1990
|
const handle = resolveLocator2(action.target);
|
|
@@ -2559,5 +2690,5 @@ Collected ${serverResources.length} server-tracked resources`);
|
|
|
2559
2690
|
}
|
|
2560
2691
|
|
|
2561
2692
|
export { ActionSchema, IntellitesterConfigSchema, LocatorSchema, TestConfigSchema, TestDefinitionSchema, cleanupConfigSchema, cleanupDiscoverSchema, collectMissingEnvVars, createAIProvider, createTestContext, isPipelineContent, isPipelineFile, isWorkflowContent, isWorkflowFile, killServer, loadIntellitesterConfig, loadPipelineDefinition, loadTestDefinition, loadWorkflowDefinition, parseIntellitesterConfig, parsePipelineDefinition, parseTestDefinition, parseWorkflowDefinition, previewConfigSchema, runWebTest, runWorkflow, runWorkflowWithContext, setupAppwriteTracking, startTrackingServer, startWebServer };
|
|
2562
|
-
//# sourceMappingURL=chunk-
|
|
2563
|
-
//# sourceMappingURL=chunk-
|
|
2693
|
+
//# sourceMappingURL=chunk-EQJQS4RD.js.map
|
|
2694
|
+
//# sourceMappingURL=chunk-EQJQS4RD.js.map
|