@resolveio/server-lib 22.3.115 → 22.3.117
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/package.json
CHANGED
|
@@ -2309,6 +2309,7 @@ function buildResolveIORunnerQaWorkflowProbeScript() {
|
|
|
2309
2309
|
'const targetRoute = resolveTargetRoute(routeArg);',
|
|
2310
2310
|
'const matrixPath = path.join(artifactDir, "qa-coverage-matrix.json");',
|
|
2311
2311
|
'const resultPath = path.join(artifactDir, "qa-workflow-probe-result.json");',
|
|
2312
|
+
'const authBootstrapResultPath = path.join(artifactDir, "auth-bootstrap-result.json");',
|
|
2312
2313
|
'const passScreenshotPath = path.join(artifactDir, "qa-workflow-route-ready.jpg");',
|
|
2313
2314
|
'const failScreenshotPath = path.join(artifactDir, "qa-workflow-route-blocked.jpg");',
|
|
2314
2315
|
'const clientUrl = stripTrailingSlash(process.env.RESOLVEIO_RUNNER_QA_CLIENT_URL || process.env.RESOLVEIO_SUPPORT_QA_CLIENT_URL || `http://localhost:${process.env.RESOLVEIO_SUPPORT_QA_CLIENT_PORT || "4200"}`);',
|
|
@@ -2493,7 +2494,26 @@ function buildResolveIORunnerQaWorkflowProbeScript() {
|
|
|
2493
2494
|
'}',
|
|
2494
2495
|
'function isShellOnlySummary(summary) {',
|
|
2495
2496
|
' const text = summary && summary.bodyTextSnippet || "";',
|
|
2496
|
-
'
|
|
2497
|
+
' if (!text) return true;',
|
|
2498
|
+
' if (summary && Number(summary.rowCount || 0) > 0) return false;',
|
|
2499
|
+
' if (/\\b(List|Detail|Edit|New|Filter|Search|Showing|records|CLASSIFICATION|STATUS|Entries Per Page|Dashboard|Report|Invoice|Asset|BOL)\\b/i.test(text)) return false;',
|
|
2500
|
+
' return /^(Home|MENU|Logout|\\u00A9|The All-in-One Software)\\b/i.test(text) && text.length < 350;',
|
|
2501
|
+
'}',
|
|
2502
|
+
'function freshAuthBootstrapProof() {',
|
|
2503
|
+
' const proof = readJson(authBootstrapResultPath);',
|
|
2504
|
+
' if (!proof || proof.status !== "pass" || !proof.page) return null;',
|
|
2505
|
+
' if (!pathMatchesRoute(proof.page.url || "", targetRoute)) return null;',
|
|
2506
|
+
' if (proof.targetRoute && !pathMatchesRoute(new URL(proof.targetRoute, clientUrl).href, targetRoute)) return null;',
|
|
2507
|
+
' if (isShellOnlySummary(proof.page)) return null;',
|
|
2508
|
+
' const text = proof.page.bodyTextSnippet || "";',
|
|
2509
|
+
' if (!text || /Employee\\/Customer Login|Employee Sign In|Customer Access|Unable to sign in/i.test(text)) return null;',
|
|
2510
|
+
' if (text.includes("*** OFFLINE MODE ***")) return null;',
|
|
2511
|
+
' try {',
|
|
2512
|
+
' const stat = fs.statSync(authBootstrapResultPath);',
|
|
2513
|
+
' const maxAgeMs = Number(process.env.RESOLVEIO_RUNNER_QA_AUTH_PROOF_MAX_AGE_MS || process.env.RESOLVEIO_SUPPORT_QA_AUTH_PROOF_MAX_AGE_MS || 300000);',
|
|
2514
|
+
' if (Date.now() - stat.mtimeMs > maxAgeMs) return null;',
|
|
2515
|
+
' } catch (error) { return null; }',
|
|
2516
|
+
' return proof;',
|
|
2497
2517
|
'}',
|
|
2498
2518
|
'async function waitForHydratedTargetRoute(page) {',
|
|
2499
2519
|
' const deadline = Date.now() + Number(process.env.RESOLVEIO_RUNNER_QA_ROUTE_HYDRATION_TIMEOUT_MS || process.env.RESOLVEIO_SUPPORT_QA_ROUTE_HYDRATION_TIMEOUT_MS || 45000);',
|
|
@@ -2594,6 +2614,16 @@ function buildResolveIORunnerQaWorkflowProbeScript() {
|
|
|
2594
2614
|
' process.exitCode = 0;',
|
|
2595
2615
|
' return;',
|
|
2596
2616
|
' }',
|
|
2617
|
+
' const bootstrapProof = freshAuthBootstrapProof();',
|
|
2618
|
+
' if (bootstrapProof) {',
|
|
2619
|
+
' const caption = `Workflow route ready from authenticated bootstrap proof: ${targetRoute} loaded for the seeded QA user with live data before a transient probe shell state.`;',
|
|
2620
|
+
' updateMatrix("pass", bootstrapProof.screenshot || passScreenshotPath, caption, "Authenticated bootstrap proof loaded the exact target route with live seeded data; deeper row-specific UI/data proof still required.");',
|
|
2621
|
+
' const result = { status: "pass", clientUrl, serverUrl, targetRoute, screenshot: bootstrapProof.screenshot || passScreenshotPath, caption, recoveredFromTransientError: error && (error.message || String(error)) || "bootstrap proof recovery", page: bootstrapProof.page, authBootstrapProof: authBootstrapResultPath, matrix: matrixPath };',
|
|
2622
|
+
' writeJson(resultPath, result);',
|
|
2623
|
+
' console.log(JSON.stringify(result, null, 2));',
|
|
2624
|
+
' process.exitCode = 0;',
|
|
2625
|
+
' return;',
|
|
2626
|
+
' }',
|
|
2597
2627
|
' const caption = `Blocked before workflow QA: ${targetRoute} could not be reached in authenticated local QA.`;',
|
|
2598
2628
|
' updateMatrix("blocked", failScreenshotPath, caption, error && (error.message || String(error)) || "Workflow probe failed");',
|
|
2599
2629
|
' const result = { status: "blocked", clientUrl, serverUrl, targetRoute, screenshot: failScreenshotPath, caption, error: error && (error.stack || error.message) || String(error), page: summary, matrix: matrixPath };',
|