intellitester 0.2.12 → 0.2.14
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-LVWIFM33.js → chunk-MRTD4FLN.js} +12 -7
- package/dist/chunk-MRTD4FLN.js.map +1 -0
- package/dist/{chunk-H34IO3AV.cjs → chunk-UYGFHRPT.cjs} +12 -7
- package/dist/chunk-UYGFHRPT.cjs.map +1 -0
- package/dist/cli/index.cjs +50 -38
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +17 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +28 -28
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-H34IO3AV.cjs.map +0 -1
- package/dist/chunk-LVWIFM33.js.map +0 -1
|
@@ -1470,7 +1470,7 @@ var runWebTest = async (test, options = {}) => {
|
|
|
1470
1470
|
throw new Error(`runWebTest only supports web platform, received ${test.platform}`);
|
|
1471
1471
|
}
|
|
1472
1472
|
const browserName = options.browser ?? "chromium";
|
|
1473
|
-
const headless = options.headed
|
|
1473
|
+
const headless = !(options.headed ?? false);
|
|
1474
1474
|
const screenshotDir = options.screenshotDir ?? defaultScreenshotDir;
|
|
1475
1475
|
const defaultTimeout = options.defaultTimeoutMs ?? 3e4;
|
|
1476
1476
|
const sessionId = crypto2.randomUUID();
|
|
@@ -1489,7 +1489,9 @@ var runWebTest = async (test, options = {}) => {
|
|
|
1489
1489
|
};
|
|
1490
1490
|
process.on("SIGINT", cleanup);
|
|
1491
1491
|
process.on("SIGTERM", cleanup);
|
|
1492
|
+
console.log(`Launching ${browserName}${headless ? " (headless)" : " (visible)"}...`);
|
|
1492
1493
|
const browser = await getBrowser(browserName).launch({ headless });
|
|
1494
|
+
console.log(`Browser launched successfully`);
|
|
1493
1495
|
const browserContext = await browser.newContext();
|
|
1494
1496
|
const page = await browserContext.newPage();
|
|
1495
1497
|
page.setDefaultTimeout(defaultTimeout);
|
|
@@ -1789,7 +1791,7 @@ function interpolateWorkflowVariables(value, currentVariables, testResults) {
|
|
|
1789
1791
|
return currentVariables.get(path3) ?? match;
|
|
1790
1792
|
});
|
|
1791
1793
|
}
|
|
1792
|
-
async function runTestInWorkflow(test, page, context, options, _workflowDir) {
|
|
1794
|
+
async function runTestInWorkflow(test, page, context, options, _workflowDir, workflowBaseUrl) {
|
|
1793
1795
|
const results = [];
|
|
1794
1796
|
const debugMode = options.debug ?? false;
|
|
1795
1797
|
const screenshotDir = defaultScreenshotDir2;
|
|
@@ -1832,7 +1834,8 @@ async function runTestInWorkflow(test, page, context, options, _workflowDir) {
|
|
|
1832
1834
|
switch (action.type) {
|
|
1833
1835
|
case "navigate": {
|
|
1834
1836
|
const interpolated = interpolateVariables2(action.value);
|
|
1835
|
-
const
|
|
1837
|
+
const baseUrl = test.config?.web?.baseUrl ?? workflowBaseUrl;
|
|
1838
|
+
const target = resolveUrl2(interpolated, baseUrl);
|
|
1836
1839
|
if (debugMode) console.log(` [DEBUG] Navigating to: ${target}`);
|
|
1837
1840
|
await page.goto(target);
|
|
1838
1841
|
break;
|
|
@@ -2229,7 +2232,7 @@ Starting workflow: ${workflow.name}`);
|
|
|
2229
2232
|
executionContext.variables.set(key, interpolated);
|
|
2230
2233
|
}
|
|
2231
2234
|
}
|
|
2232
|
-
const result = await runTestInWorkflow(test, page, executionContext, options, workflowDir);
|
|
2235
|
+
const result = await runTestInWorkflow(test, page, executionContext, options, workflowDir, workflow.config?.web?.baseUrl);
|
|
2233
2236
|
const testResult = {
|
|
2234
2237
|
id: testRef.id,
|
|
2235
2238
|
file: testRef.file,
|
|
@@ -2399,8 +2402,10 @@ async function runWorkflow(workflow, workflowFilePath, options = {}) {
|
|
|
2399
2402
|
process.on("SIGINT", signalCleanup);
|
|
2400
2403
|
process.on("SIGTERM", signalCleanup);
|
|
2401
2404
|
const browserName = options.browser ?? workflow.config?.web?.browser ?? "chromium";
|
|
2402
|
-
const headless = options.headed ? false : workflow.config?.web?.headless ?? true;
|
|
2405
|
+
const headless = options.headed === true ? false : workflow.config?.web?.headless ?? true;
|
|
2406
|
+
console.log(`Launching ${browserName}${headless ? " (headless)" : " (visible)"}...`);
|
|
2403
2407
|
const browser = await getBrowser2(browserName).launch({ headless });
|
|
2408
|
+
console.log(`Browser launched successfully`);
|
|
2404
2409
|
const browserContext = await browser.newContext();
|
|
2405
2410
|
const page = await browserContext.newPage();
|
|
2406
2411
|
page.setDefaultTimeout(3e4);
|
|
@@ -2531,5 +2536,5 @@ Collected ${serverResources.length} server-tracked resources`);
|
|
|
2531
2536
|
}
|
|
2532
2537
|
|
|
2533
2538
|
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 };
|
|
2534
|
-
//# sourceMappingURL=chunk-
|
|
2535
|
-
//# sourceMappingURL=chunk-
|
|
2539
|
+
//# sourceMappingURL=chunk-MRTD4FLN.js.map
|
|
2540
|
+
//# sourceMappingURL=chunk-MRTD4FLN.js.map
|