Files
Aislo/resources/tester/helper_717_1_logic_api_paths.cjs
T
eomsangdonandClaude Opus 5.5 9c78072971 refactor(855-E 2-E1): M01 화면 옛 시험 계산 · 옛 상세 몸 부품 걷음
- 지움(부르는 곳 0 — 저장소 TS · cjs · py · html 다시 찾음): UI_Logic_Drive.ts(driveRun · autoFill) · UI_Logic_CalcPick.ts · UI_LogicLab_Pill.ts · .css
- Logic_Api: runCalc · runText · fetchAuto · searchPrice · CalcAnswer · TextAnswer · TextLine · TextPiece 걷음
- LogicLab_Modal: 옛 재료 · 표 · 참조 · 글 모달 걷음 — 로직 열기 · headWord 만 남김(−550 줄)
- Logic_Note.explain · Side.hasMasterJump · 죽은 CSS 다섯 · 글 키 29(옛 시험 계산 · 모달 · 알약) 걷음
- 시험: 지운 파일 글자만 보던 test_750_2(빈 파일 됨) · test_799_2 구동 시험 · test_734 알약 · 풍선 시험 지움 · helper_717_1 · test_717_1 의 /calc · /text · /logic/auto 화면 길 줄 걷음
- typecheck 0 · 관련 50 통과

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 03:12:11 +09:00

45 lines
1.5 KiB
JavaScript

/* 717-1 헬퍼 — 상세 부품 길 주입 · 가짜 fetch 로 부른 주소만 모음. 짝 = `test_717_1_logic_lib.py`. */
const path = require("path");
const { makeLoader } = require("./helper_ts_stub_loader.cjs");
const ROOT = path.join(__dirname, "..", "..");
const { load } = makeLoader({
root: ROOT,
stubs: { M01_MasterData_UI_Logic_Text: {} },
});
const urls = [];
global.fetch = async (url) => {
urls.push(String(url).replace("http://fake", ""));
return {
ok: true,
status: 200,
statusText: "",
json: async () => ({ logics: [], subs: [], items: [], rows: [] }),
};
};
const api = load("M01_MasterData", "M01_MasterData_UI_Logic_Api.ts");
const rows = load("M01_MasterData", "M01_MasterData_Api_Fetch.ts");
const note = load("M01_MasterData", "M01_MasterData_UI_Logic_Note.ts");
async function round(tag) {
await api.fetchLogic("K");
await api.searchElements("재료", "q");
await api.fetchMaterials({ sub: "s" });
await rows.fetchRows("기계.json", 1, 5, "q");
await rows.fetchPick("price", "q");
await note.loadTable(`T-${tag}`);
await rows.fetchFiles("g"); // 관리자 길 — 늘 /m01
await api.saveFiles([]); // 저장 — 늘 /m01
return urls.splice(0).map((u) => u.split("?")[0]);
}
(async () => {
const out = { before: await round("a") };
api.setLogicApiPaths({ read: "/m02/logic-lib", calc: "/m02/calc-x" });
out.injected = await round("b");
api.setLogicApiPaths();
out.after = await round("c");
process.stdout.write(JSON.stringify(out));
})();