@resolveio/server-lib 22.3.113 → 22.3.115
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
|
@@ -2313,7 +2313,10 @@ function buildResolveIORunnerQaWorkflowProbeScript() {
|
|
|
2313
2313
|
'const failScreenshotPath = path.join(artifactDir, "qa-workflow-route-blocked.jpg");',
|
|
2314
2314
|
'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"}`);',
|
|
2315
2315
|
'const serverUrl = stripTrailingSlash(process.env.RESOLVEIO_RUNNER_QA_SERVER_URL || process.env.RESOLVEIO_SUPPORT_QA_SERVER_URL || "http://localhost:8080");',
|
|
2316
|
-
'const
|
|
2316
|
+
'const explicitQaUsername = process.env.RESOLVEIO_RUNNER_QA_AFFECTED_USER_EMAIL || process.env.RESOLVEIO_SUPPORT_QA_AFFECTED_USER_EMAIL || process.env.RESOLVEIO_RUNNER_QA_TICKET_REPORTER_EMAIL || process.env.RESOLVEIO_SUPPORT_QA_TICKET_REPORTER_EMAIL || "";',
|
|
2317
|
+
'const envQaUsername = process.env.RESOLVEIO_RUNNER_QA_USERNAME || process.env.RESOLVEIO_SUPPORT_QA_USERNAME || "";',
|
|
2318
|
+
'const seededQaUsername = readSeededPreferredQaUsername();',
|
|
2319
|
+
'const username = explicitQaUsername || seededQaUsername || envQaUsername || "admin";',
|
|
2317
2320
|
'const password = process.env.RESOLVEIO_RUNNER_QA_PASSWORD || process.env.RESOLVEIO_SUPPORT_QA_PASSWORD || "";',
|
|
2318
2321
|
'const viewportWidth = Number(process.env.RESOLVEIO_RUNNER_QA_VIEWPORT_WIDTH || process.env.RESOLVEIO_SUPPORT_QA_VIEWPORT_WIDTH || 1920);',
|
|
2319
2322
|
'const viewportHeight = Number(process.env.RESOLVEIO_RUNNER_QA_VIEWPORT_HEIGHT || process.env.RESOLVEIO_SUPPORT_QA_VIEWPORT_HEIGHT || 1080);',
|
|
@@ -2340,6 +2343,16 @@ function buildResolveIORunnerQaWorkflowProbeScript() {
|
|
|
2340
2343
|
' }',
|
|
2341
2344
|
' return chunks.filter(Boolean).join("\\n");',
|
|
2342
2345
|
'}',
|
|
2346
|
+
'function readSeededPreferredQaUsername() {',
|
|
2347
|
+
' try {',
|
|
2348
|
+
' const seed = readJson(path.join(artifactDir, "qa-live-data-seed-result.json"));',
|
|
2349
|
+
' const context = seed && seed.selected && seed.selected.qa_user_context;',
|
|
2350
|
+
' const preferred = context && (context.preferred_username || context.preferred_email || context.affected_user_email || context.reporter_email);',
|
|
2351
|
+
' return String(preferred || "").trim();',
|
|
2352
|
+
' } catch (error) {',
|
|
2353
|
+
' return "";',
|
|
2354
|
+
' }',
|
|
2355
|
+
'}',
|
|
2343
2356
|
'function normalizeRoute(candidate) {',
|
|
2344
2357
|
' const value = String(candidate || "").trim();',
|
|
2345
2358
|
' if (!value) return "";',
|
|
@@ -2478,13 +2491,17 @@ function buildResolveIORunnerQaWorkflowProbeScript() {
|
|
|
2478
2491
|
' }',
|
|
2479
2492
|
' throw new Error(`QA auth warmup failed before target route. Page summary: ${JSON.stringify(summary).slice(0, 1000)}`);',
|
|
2480
2493
|
'}',
|
|
2494
|
+
'function isShellOnlySummary(summary) {',
|
|
2495
|
+
' const text = summary && summary.bodyTextSnippet || "";',
|
|
2496
|
+
' return !text || /^(Home|MENU|Logout|\\u00A9|The All-in-One Software)\\b/i.test(text);',
|
|
2497
|
+
'}',
|
|
2481
2498
|
'async function waitForHydratedTargetRoute(page) {',
|
|
2482
2499
|
' const deadline = Date.now() + Number(process.env.RESOLVEIO_RUNNER_QA_ROUTE_HYDRATION_TIMEOUT_MS || process.env.RESOLVEIO_SUPPORT_QA_ROUTE_HYDRATION_TIMEOUT_MS || 45000);',
|
|
2483
2500
|
' let summary = await pageSummary(page);',
|
|
2484
2501
|
' while (Date.now() < deadline) {',
|
|
2485
2502
|
' summary = await pageSummary(page);',
|
|
2486
2503
|
' const routeOk = pathMatchesRoute(summary.url, targetRoute);',
|
|
2487
|
-
' const shellOnly =
|
|
2504
|
+
' const shellOnly = isShellOnlySummary(summary);',
|
|
2488
2505
|
' if (routeOk && !summary.hasLoginText && !summary.hasOfflineModeText && !shellOnly) {',
|
|
2489
2506
|
' return summary;',
|
|
2490
2507
|
' }',
|
|
@@ -2567,6 +2584,16 @@ function buildResolveIORunnerQaWorkflowProbeScript() {
|
|
|
2567
2584
|
' } catch (error) {',
|
|
2568
2585
|
' let summary = null;',
|
|
2569
2586
|
' try { if (page) { await page.screenshot({ path: failScreenshotPath, type: "jpeg", quality: 82, fullPage: false }); summary = await pageSummary(page); } } catch (screenshotError) {}',
|
|
2587
|
+
' if (summary && pathMatchesRoute(summary.url, targetRoute) && !summary.hasLoginText && !summary.hasOfflineModeText && !isShellOnlySummary(summary)) {',
|
|
2588
|
+
' const caption = `Workflow route ready after late hydration: ${targetRoute} loaded in authenticated local QA with live seeded data available.`;',
|
|
2589
|
+
' try { if (page) await page.screenshot({ path: passScreenshotPath, type: "jpeg", quality: 82, fullPage: false }); } catch (screenshotError) {}',
|
|
2590
|
+
' updateMatrix("pass", passScreenshotPath, caption, "Authenticated customer workflow route loaded after transient offline/shell state; deeper row-specific UI/data proof still required.");',
|
|
2591
|
+
' const result = { status: "pass", clientUrl, serverUrl, targetRoute, screenshot: passScreenshotPath, caption, recoveredFromTransientError: error && (error.message || String(error)) || "late hydration", page: summary, matrix: matrixPath };',
|
|
2592
|
+
' writeJson(resultPath, result);',
|
|
2593
|
+
' console.log(JSON.stringify(result, null, 2));',
|
|
2594
|
+
' process.exitCode = 0;',
|
|
2595
|
+
' return;',
|
|
2596
|
+
' }',
|
|
2570
2597
|
' const caption = `Blocked before workflow QA: ${targetRoute} could not be reached in authenticated local QA.`;',
|
|
2571
2598
|
' updateMatrix("blocked", failScreenshotPath, caption, error && (error.message || String(error)) || "Workflow probe failed");',
|
|
2572
2599
|
' const result = { status: "blocked", clientUrl, serverUrl, targetRoute, screenshot: failScreenshotPath, caption, error: error && (error.stack || error.message) || String(error), page: summary, matrix: matrixPath };',
|