test align runtime path smoke with compact dialog
This commit is contained in:
@@ -4325,9 +4325,18 @@ async function inspectJourneyUi(page) {
|
||||
const failedText = [...document.querySelectorAll(".message-card.status-failed")]
|
||||
.map((element) => element.textContent ?? "")
|
||||
.join("\n");
|
||||
const runtimePathText = [...document.querySelectorAll(".message-card.message-agent .message-runtime-path")]
|
||||
.map((element) => element.textContent ?? "")
|
||||
.join("\n");
|
||||
const runtimePathPanel = document.querySelector(".message-card.message-agent .message-runtime-path");
|
||||
const runtimePathTrigger = runtimePathPanel?.querySelector(".message-compact-summary");
|
||||
const runtimePathText = runtimePathPanel?.textContent ?? "";
|
||||
let runtimePathDialogText = "";
|
||||
let runtimePathDialogLabel = "";
|
||||
if (runtimePathTrigger instanceof HTMLElement) {
|
||||
runtimePathTrigger.click();
|
||||
const runtimePathDialog = document.querySelector('.workbench-dialog[role="dialog"][aria-modal="true"]');
|
||||
runtimePathDialogText = runtimePathDialog?.textContent ?? "";
|
||||
runtimePathDialogLabel = runtimePathDialog?.getAttribute("aria-label") ?? "";
|
||||
runtimePathDialog?.querySelector(".workbench-dialog-close")?.click();
|
||||
}
|
||||
const pendingText = [...document.querySelectorAll(".message-card.status-running")]
|
||||
.map((element) => element.textContent ?? "")
|
||||
.join("\n");
|
||||
@@ -4425,8 +4434,12 @@ async function inspectJourneyUi(page) {
|
||||
traceAllModeVisible: tracePanelMetrics.some((metric) => metric.allTraceVisible && metric.fixedAllMode),
|
||||
traceCopyJsonVisible: tracePanelMetrics.some((metric) => metric.copyJsonVisible),
|
||||
traceDownloadVisible: tracePanelMetrics.some((metric) => metric.downloadTraceVisible),
|
||||
runtimePathVisible: Boolean(document.querySelector(".message-card.message-agent .message-runtime-path")),
|
||||
runtimePathShowsProviderFields: /provider|runnerKind|protocol|implementationType|providerTrace\.command|providerTrace\.terminalStatus/u.test(runtimePathText),
|
||||
runtimePathVisible: Boolean(runtimePathPanel),
|
||||
runtimePathCompactSummaryVisible: Boolean(runtimePathTrigger),
|
||||
runtimePathUsesCompactDialog: runtimePathTrigger?.getAttribute("aria-haspopup") === "dialog" &&
|
||||
/运行路径明细/u.test(`${runtimePathDialogLabel} ${runtimePathDialogText}`),
|
||||
runtimePathShowsProviderFields: /provider|runnerKind|protocol|implementationType|providerTrace\.command|providerTrace\.terminalStatus/u.test(runtimePathDialogText),
|
||||
runtimePathSummaryStaysCompact: !/providerTrace\.command|providerTrace\.terminalStatus|protocol/u.test(runtimePathText),
|
||||
runtimePathFallbackNotFull: !/(OpenAI text fallback|source-fixture|SOURCE)[\s\S]{0,120}(真实 runner|repo-owned Codex app-server stdio)/u.test(runtimePathText),
|
||||
runtimePathMcpNotFull: !/(MCP|codex-mcp-stdio-runner|mcp-jsonrpc-stdio)/u.test(runtimePathText) ||
|
||||
(/DEGRADED:MCP|MCP\/其他 runner/u.test(runtimePathText) && !/使用 Responses wire API|wire_api=responses|真实 runner:Codex app-server stdio/u.test(runtimePathText)),
|
||||
@@ -5070,7 +5083,10 @@ async function runLocalAgentFixtureSmoke({
|
||||
ui.failedTraceActionVisible &&
|
||||
ui.failedActionPanelContained &&
|
||||
ui.runtimePathVisible &&
|
||||
ui.runtimePathCompactSummaryVisible &&
|
||||
ui.runtimePathUsesCompactDialog &&
|
||||
ui.runtimePathShowsProviderFields &&
|
||||
ui.runtimePathSummaryStaysCompact &&
|
||||
ui.runtimePathMcpNotFull &&
|
||||
!ui.completedMessageVisible
|
||||
)
|
||||
@@ -5104,7 +5120,10 @@ async function runLocalAgentFixtureSmoke({
|
||||
ui.traceCopyJsonVisible &&
|
||||
ui.traceDownloadVisible &&
|
||||
ui.runtimePathVisible &&
|
||||
ui.runtimePathCompactSummaryVisible &&
|
||||
ui.runtimePathUsesCompactDialog &&
|
||||
ui.runtimePathShowsProviderFields &&
|
||||
ui.runtimePathSummaryStaysCompact &&
|
||||
ui.runtimePathFallbackNotFull &&
|
||||
ui.noMainAttributionNoise &&
|
||||
ui.attributionFallbackNotRunnerControl &&
|
||||
|
||||
Reference in New Issue
Block a user