feat: add D601 dev backend path
This commit is contained in:
+5
-15
@@ -769,18 +769,9 @@ function runPsql(config: UniDeskConfig, sql: string): { ok: boolean; stdout: str
|
||||
}
|
||||
|
||||
function dockerCoreJson(path: string, init?: { method?: string; body?: unknown }): unknown {
|
||||
const code = `
|
||||
const res = await fetch(${JSON.stringify(`http://127.0.0.1:8080${path}`)}, ${JSON.stringify({
|
||||
method: init?.method ?? "GET",
|
||||
headers: init?.body === undefined ? undefined : { "content-type": "application/json" },
|
||||
body: init?.body === undefined ? undefined : JSON.stringify(init.body),
|
||||
})});
|
||||
const text = await res.text();
|
||||
let body = null;
|
||||
try { body = text ? JSON.parse(text) : null; } catch { body = { text }; }
|
||||
console.log(JSON.stringify({ ok: res.ok, status: res.status, body }));
|
||||
`;
|
||||
const result = runCommand(["docker", "exec", "unidesk-backend-core", "bun", "-e", code], repoRoot);
|
||||
const command = ["docker", "exec", "unidesk-backend-core", "backend-core", "--fetch-json", `http://127.0.0.1:8080${path}`, "--method", init?.method ?? "GET"];
|
||||
if (init?.body !== undefined) command.push("--body-json", JSON.stringify(init.body));
|
||||
const result = runCommand(command, repoRoot);
|
||||
if (result.exitCode !== 0) return { ok: false, exitCode: result.exitCode, stdout: result.stdout.slice(-1200), stderr: result.stderr.slice(-1200) };
|
||||
try {
|
||||
return JSON.parse(result.stdout.trim()) as unknown;
|
||||
@@ -1872,10 +1863,9 @@ async function frontendCheck(config: UniDeskConfig, urls: PublicUrls, checks: E2
|
||||
await page.waitForSelector('[data-testid="decision-center-record-table"]', { timeout: 30000 });
|
||||
await page.waitForFunction((title) => {
|
||||
const text = document.body.innerText;
|
||||
const lowerText = text.toLowerCase();
|
||||
return text.includes("Decision Center")
|
||||
&& text.includes("G0/G1 目标")
|
||||
&& lowerText.includes("p0/p1 blocker")
|
||||
&& text.includes("P0/P1 Blocker")
|
||||
&& text.includes("停放事项")
|
||||
&& text.includes("最近会议/决议")
|
||||
&& text.includes("查看原始JSON")
|
||||
@@ -2942,7 +2932,7 @@ async function frontendCheck(config: UniDeskConfig, urls: PublicUrls, checks: E2
|
||||
addSelectedCheck(checks, options, "frontend:decision-center-visible",
|
||||
decisionCenterTextLower.includes("decision center")
|
||||
&& decisionCenterText.includes("G0/G1 目标")
|
||||
&& decisionCenterTextLower.includes("p0/p1 blocker")
|
||||
&& decisionCenterText.includes("P0/P1 Blocker")
|
||||
&& decisionCenterText.includes("停放事项")
|
||||
&& decisionCenterText.includes("最近会议/决议")
|
||||
&& decisionCenterText.includes("全部记录")
|
||||
|
||||
Reference in New Issue
Block a user