Merge remote-tracking branch 'origin/sub_laptop_2' into main_laptop_1
This commit is contained in:
@@ -312,7 +312,7 @@ async function build(list) {
|
||||
profile.line = null;
|
||||
panel = panelModule.createB06StructuresPanel({
|
||||
projectId: PID,
|
||||
shared: { view: () => "cross" },
|
||||
shared: { view: () => "cross", lane: { set() {}, setTypes() {}, setStored() {} } }, // 시설 줄(462)
|
||||
detail: () => ({ cross_sections: CARDS }),
|
||||
stationInterval: () => 20,
|
||||
focusChainage: (at, revealOnly) => {
|
||||
|
||||
@@ -309,7 +309,7 @@ async function build(list, keep = false) {
|
||||
profile.pill = null;
|
||||
panel = panelModule.createB06StructuresPanel({
|
||||
projectId: PID,
|
||||
shared: { view: () => "cross" },
|
||||
shared: { view: () => "cross", lane: { set() {}, setTypes() {}, setStored() {} } }, // 시설 줄(462)
|
||||
detail: () => ({ cross_sections: CARDS }),
|
||||
stationInterval: () => 20,
|
||||
focusChainage: (at, revealOnly) => focusStationAt(at, revealOnly),
|
||||
|
||||
@@ -0,0 +1,224 @@
|
||||
/* 462 B05 · B06 한 페이지 시설 줄 한 벌(요구 271-5) — 진짜 `design_facility_lane` · 관 id 장부 · 측점 계획 ·
|
||||
* 관 따라감 · 가게를 Node 로 돌려 JSON 한 줄(`test_271_facility_lane.py` 가 판정). 종단도는 가짜(받은 것 기록).
|
||||
* node helper_271_facility_lane.cjs
|
||||
*/
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const ROOT = path.join(__dirname, "..", "..");
|
||||
const ts = require(path.join(ROOT, "config", "node_modules", "typescript"));
|
||||
const CATALOG = require(path.join(__dirname, "helper_322_catalog_module.cjs"));
|
||||
|
||||
function memoryStorage() {
|
||||
const map = new Map();
|
||||
return {
|
||||
getItem: (k) => (map.has(k) ? map.get(k) : null),
|
||||
setItem: (k, v) => map.set(k, String(v)),
|
||||
removeItem: (k) => map.delete(k),
|
||||
key: (i) => [...map.keys()][i] ?? null,
|
||||
get length() {
|
||||
return map.size;
|
||||
},
|
||||
};
|
||||
}
|
||||
globalThis.window = { sessionStorage: memoryStorage(), localStorage: memoryStorage() };
|
||||
globalThis.sessionStorage = globalThis.window.sessionStorage;
|
||||
globalThis.localStorage = globalThis.window.localStorage;
|
||||
|
||||
const anyModule = (extra = {}) =>
|
||||
new Proxy(extra, { get: (t, key) => (key in t ? t[key] : () => undefined) });
|
||||
const STUBS = {
|
||||
"config_frontend.ts": anyModule({
|
||||
CURRENT_PROJECT_ID_KEY: "frd_current_project_id",
|
||||
API_BASE_URL: "",
|
||||
API_TIMEOUT_MS: 1000,
|
||||
PIPE_TYPES: [],
|
||||
}),
|
||||
"ui_template_elements.ts": anyModule(),
|
||||
"B04_PreProcess_Api_Fetch.ts": anyModule(),
|
||||
};
|
||||
|
||||
const cache = new Map();
|
||||
const resolve = (base) =>
|
||||
[base, `${base}.ts`, path.join(base, "index.ts")].find(
|
||||
(p) => fs.existsSync(p) && fs.statSync(p).isFile(),
|
||||
) ?? `${base}.ts`;
|
||||
function loadTs(full) {
|
||||
const stub = STUBS[path.basename(full)];
|
||||
if (stub) return stub;
|
||||
if (cache.has(full)) return cache.get(full);
|
||||
const js = ts.transpileModule(fs.readFileSync(full, "utf8"), {
|
||||
compilerOptions: {
|
||||
module: ts.ModuleKind.CommonJS,
|
||||
target: ts.ScriptTarget.ES2020,
|
||||
esModuleInterop: true,
|
||||
},
|
||||
}).outputText;
|
||||
const box = { exports: {} };
|
||||
cache.set(full, box.exports);
|
||||
const near = (request) => {
|
||||
if (CATALOG.isCatalogRequest(request)) return CATALOG;
|
||||
if (request.endsWith(".json"))
|
||||
return JSON.parse(fs.readFileSync(path.join(path.dirname(full), request), "utf8"));
|
||||
const alias = { "@util/": "common_util", "@ui/": "ui_template", "@config/": "config" };
|
||||
for (const [prefix, dir] of Object.entries(alias))
|
||||
if (request.startsWith(prefix))
|
||||
return loadTs(resolve(path.join(ROOT, dir, request.slice(prefix.length))));
|
||||
return loadTs(resolve(path.join(path.dirname(full), request)));
|
||||
};
|
||||
new Function("exports", "module", "require", js)(box.exports, box, near);
|
||||
return box.exports;
|
||||
}
|
||||
|
||||
const design = path.join(ROOT, "A00_Common", "design");
|
||||
const { createFacilityLane } = loadTs(path.join(design, "design_facility_lane.ts"));
|
||||
const ids = loadTs(path.join(design, "design_pipe_ids.ts"));
|
||||
const { useDesignStore } = loadTs(path.join(design, "design_store.ts"));
|
||||
const { readState } = loadTs(path.join(ROOT, "A00_Common", "b_page_state.ts"));
|
||||
const TYPES = JSON.parse(
|
||||
fs.readFileSync(path.join(ROOT, "resources", "master_template", "구조물정의.json"), "utf8"),
|
||||
).types;
|
||||
|
||||
/** 가짜 종단도 — 받은 것 · 편집 옮김 기록. */
|
||||
function fakeProfile() {
|
||||
const got = {
|
||||
structures: null,
|
||||
stations: null,
|
||||
minCover: null,
|
||||
types: 0,
|
||||
resets: [],
|
||||
stationWrites: 0,
|
||||
};
|
||||
return {
|
||||
got,
|
||||
setStructureTypes: (types) => (got.types = types.length),
|
||||
setStructures: (next) => (got.structures = next),
|
||||
setIrregularStations: (stations) => ((got.stations = stations), (got.stationWrites += 1)),
|
||||
setMinCoverPipes: (pipes) => (got.minCover = pipes.map((p) => p.chainage_m)),
|
||||
resetStationEdit: (from, to) => got.resets.push([from, to ?? null]),
|
||||
};
|
||||
}
|
||||
const book = (projectId) => readState("pipe-ids", projectId) ?? { next: 1, ids: [] };
|
||||
const wall = (id, at) => ({
|
||||
structure_id: id,
|
||||
type_id: "retaining_wall",
|
||||
placement: "interval",
|
||||
chainage_m: at,
|
||||
start_m: at - 5,
|
||||
end_m: at + 5,
|
||||
options: {},
|
||||
});
|
||||
const markView = (lane) => lane.marks().map((m) => [m.structure_id, m.type_id, m.chainage_m]);
|
||||
const stationView = (lane) => lane.stations().map((s) => [s.chainage_m, s.id]);
|
||||
|
||||
const out = {};
|
||||
|
||||
// ① R3 뒤집기 — B06 만 연 채 351 관 → 360 옮김 → 버림 → 카드가 351 관 id 를 물음 → 다시 실음
|
||||
{
|
||||
const P = "P271-r3";
|
||||
ids.usePipeIds(P);
|
||||
const profile = fakeProfile();
|
||||
const lane = createFacilityLane(P, () => profile);
|
||||
lane.setTypes(TYPES);
|
||||
lane.set({ structures: [], pipes: [{ id: "X", chainage_m: 351, facility: "pipe" }] }, false);
|
||||
const first = ids.pipeIdAt(351, P);
|
||||
ids.followMovedPipe(P, 351, 360); // B06 movePipeTo
|
||||
lane.set({ pipes: [{ id: "X", chainage_m: 360, facility: "pipe" }] });
|
||||
const moved = ids.pipeIdAt(360, P);
|
||||
const ghost = ids.pipeIdAt(351, P); // 버린 뒤 다시 받기 전 카드가 물음(헛 id)
|
||||
lane.set({ pipes: [{ id: "X", chainage_m: 351, facility: "pipe" }] }, false); // 목록 다시 실음
|
||||
out.r3 = {
|
||||
first,
|
||||
moved,
|
||||
ghostBeforeReload: ghost !== first,
|
||||
after: book(P).ids,
|
||||
afterId: ids.pipeIdAt(351, P),
|
||||
marks: markView(lane),
|
||||
};
|
||||
}
|
||||
|
||||
// ② 같은 조작 — B05 먼저 듣는 중(listener 처음부터) 대 B06 먼저(끝에 B05 가 읽음)
|
||||
function scenario(P, listenFromStart) {
|
||||
ids.usePipeIds(P);
|
||||
const profile = fakeProfile();
|
||||
const lane = createFacilityLane(P, () => profile);
|
||||
const heard = [];
|
||||
const listen = () => lane.onChange(() => heard.push(stationView(lane).length));
|
||||
if (listenFromStart) listen();
|
||||
lane.setTypes(TYPES);
|
||||
lane.setStored([wall("w1", 100)]);
|
||||
lane.set(
|
||||
{
|
||||
structures: [wall("w1", 100)],
|
||||
pipes: [
|
||||
{ id: "A", chainage_m: 60, facility: "pipe" },
|
||||
{ id: "B", chainage_m: 200, facility: "pipe" },
|
||||
],
|
||||
},
|
||||
false,
|
||||
);
|
||||
// B06 폼 — 구조물 옮김 · 관 하나 넣음(새 관 id 없음) · 관 옮김
|
||||
lane.set({ structures: [wall("w1", 140)] });
|
||||
lane.set({
|
||||
pipes: [
|
||||
{ id: "A", chainage_m: 60, facility: "pipe" },
|
||||
{ chainage_m: 120, facility: "pipe" },
|
||||
{ id: "B", chainage_m: 200, facility: "pipe" },
|
||||
],
|
||||
});
|
||||
ids.followMovedPipe(P, 200, 230);
|
||||
lane.set({
|
||||
pipes: [
|
||||
{ id: "A", chainage_m: 60, facility: "pipe" },
|
||||
{ chainage_m: 120, facility: "pipe" },
|
||||
{ id: "B", chainage_m: 230, facility: "pipe" },
|
||||
],
|
||||
});
|
||||
// 배수유역도가 뒤늦게 같은 목록을 알림(B05 판)
|
||||
lane.set({
|
||||
pipes: [
|
||||
{ id: "A", chainage_m: 60, facility: "pipe" },
|
||||
{ chainage_m: 120, facility: "pipe" },
|
||||
{ id: "B", chainage_m: 230, facility: "pipe" },
|
||||
],
|
||||
});
|
||||
if (!listenFromStart) listen();
|
||||
const ledger = book(P).ids;
|
||||
const markIds = lane.marks().map((m) => m.structure_id);
|
||||
return {
|
||||
marks: markView(lane).map(([id, type, at]) => [id.startsWith("pipe-") ? "pipe" : id, type, at]),
|
||||
stations: stationView(lane).map(([at]) => at),
|
||||
minCover: profile.got.minCover,
|
||||
profileMarks: profile.got.structures.length === lane.marks().length,
|
||||
profileStations: JSON.stringify(profile.got.stations) === JSON.stringify(lane.stations()),
|
||||
ghostIds: ledger.filter((entry) => !markIds.includes(entry.id)).length,
|
||||
resets: profile.got.resets,
|
||||
heardB05: listenFromStart ? heard.length : null,
|
||||
};
|
||||
}
|
||||
out.b05First = scenario("P271-b05", true);
|
||||
out.b06First = scenario("P271-b06", false);
|
||||
|
||||
// ③ 노선 따라감(가게 씀 + follow) = 편집 안 옮김 · 다시 실음(같은 목록) = 안 옮김 · 측점 다시 안 씀
|
||||
{
|
||||
const P = "P271-follow";
|
||||
ids.usePipeIds(P);
|
||||
const profile = fakeProfile();
|
||||
const lane = createFacilityLane(P, () => profile);
|
||||
const store = useDesignStore(P, null);
|
||||
lane.setTypes(TYPES);
|
||||
lane.set({ structures: [], pipes: [{ id: "A", chainage_m: 80, facility: "pipe" }] }, false);
|
||||
store.set("pipes", [{ id: "A", chainage_m: 95, source: "user", facility: "pipe" }]);
|
||||
store.set("structures", [wall("w9", 150)]);
|
||||
lane.follow();
|
||||
const followed = {
|
||||
stations: stationView(lane).map(([at]) => at),
|
||||
resets: [...profile.got.resets],
|
||||
};
|
||||
const writes = profile.got.stationWrites;
|
||||
lane.set({ structures: [wall("w9", 150)] }, false); // 숨었던 B05 가 다시 보이며 같은 목록을 실음
|
||||
const reshown = { resets: profile.got.resets.length, writes: profile.got.stationWrites - writes };
|
||||
lane.set({ structures: [wall("w9", 170)] }); // 사용자 옮김 = 옮김
|
||||
out.follow = { followed, reshown, userMove: profile.got.resets };
|
||||
}
|
||||
|
||||
console.log(JSON.stringify(out));
|
||||
@@ -57,8 +57,7 @@ async function run() {
|
||||
const bridge = bridgeMod.createStructuresBridge({
|
||||
projectId: "p1",
|
||||
panel: () => ({ structures: quiet, values: () => ({}) }),
|
||||
profilePanel: () => quiet,
|
||||
renderStationLines: () => undefined,
|
||||
lane: quiet, // 시설 줄 한 벌(462)
|
||||
isRestoring: () => false,
|
||||
});
|
||||
out.conflict = await settle(bridge.saveStructuresIfDirty());
|
||||
|
||||
@@ -180,8 +180,7 @@ def test_move_sites_follow_edits():
|
||||
b06 = (PROJECT_ROOT / "B06_Section/B06_Section_UI_Page_Structures_Panel.ts").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
b05 = (PROJECT_ROOT / "B05_Profile/B05_Profile_UI_Page_Structures.ts").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
# B05 측점 갱신 = 페이지 시설 줄 한 벌(462 · 어느 보기 고침이든)
|
||||
lane = (PROJECT_ROOT / "A00_Common/design/design_facility_lane.ts").read_text(encoding="utf-8")
|
||||
assert "deps.shared.profile?.resetStationEdit(hit.chainage_m, to)" in b06
|
||||
assert "followedStation(station, gone, born)" in b05
|
||||
assert "followedStation(station, gone, born)" in lane
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
"""462 B05 · B06 한 페이지 — 시설 줄 페이지 한 벌(요구 271-5 · 분석 4장 (A) · (E)).
|
||||
|
||||
① R3 뒤집기 — B06 만 연 채 351 관 → 360 → 버림 → 카드가 351 관 id 를 물어 헛 id → 목록 다시 실음 =
|
||||
장부 한 줄(처음 id · 351) · 옛 코드 = {s1@360 헛 · s2@351}(장부 맞춤이 B05 보기에만)
|
||||
② 같은 조작 — B05 먼저 듣는 중 = B06 먼저(끝에 B05 가 읽음) · 알약 · 측점 · 흙덮기 관 · 종단도 받은 것 같음 · 헛 id 0
|
||||
③ 노선 따라감 = 편집 안 옮김 · 숨었던 보기가 같은 목록을 다시 실음 = 안 옮김 · 측점 다시 안 씀 · 사용자 옮김 = 옮김
|
||||
④ 이음 — 관 알림 · 노선 따라감 · B06 목록이 페이지 한 벌로 · 보기는 읽기만 · B05 → B06 관 옵션 = 세션 칸
|
||||
TS 셈은 `helper_271_facility_lane.cjs`.
|
||||
|
||||
./venv/Scripts/python.exe -m pytest resources/tester/test_271_facility_lane.py -q
|
||||
"""
|
||||
|
||||
import json
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
HELPER = Path(__file__).with_name("helper_271_facility_lane.cjs")
|
||||
|
||||
pytestmark = pytest.mark.skipif(
|
||||
not (ROOT / "config" / "node_modules" / "typescript").is_dir(),
|
||||
reason="프론트엔드 의존성 미설치",
|
||||
)
|
||||
|
||||
|
||||
def src(*parts: str) -> str:
|
||||
return ROOT.joinpath(*parts).read_text(encoding="utf-8")
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def got() -> dict:
|
||||
run = subprocess.run( # noqa: S603 — 고정 실행 파일
|
||||
["node", str(HELPER)],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
encoding="utf-8",
|
||||
timeout=120,
|
||||
)
|
||||
assert run.returncode == 0, run.stderr
|
||||
return json.loads(run.stdout)
|
||||
|
||||
|
||||
def test_B06_만_열어도_장부_헛_id_없음(got) -> None:
|
||||
r3 = got["r3"]
|
||||
assert r3["first"] == r3["moved"] == "pipe-s1" # 옮겨도 그 id
|
||||
assert r3["ghostBeforeReload"] is True # 버린 사이 카드가 지은 헛 id(재현)
|
||||
assert r3["after"] == [{"id": "pipe-s1", "at": 351}] # 다시 실으면 처음 id 한 줄
|
||||
assert r3["afterId"] == "pipe-s1"
|
||||
assert r3["marks"] == [["pipe-s1", "pipe", 351]]
|
||||
|
||||
|
||||
def test_B06_먼저_B05_먼저_같음(got) -> None:
|
||||
first, late = got["b05First"], got["b06First"]
|
||||
for key in ("marks", "stations", "minCover", "resets"):
|
||||
assert first[key] == late[key], key
|
||||
assert first["stations"] == [60, 120, 135, 140, 145, 230]
|
||||
assert first["minCover"] == [60, 120, 230]
|
||||
for one in (first, late):
|
||||
assert one["profileMarks"] is True and one["profileStations"] is True
|
||||
assert one["ghostIds"] == 0
|
||||
assert first["heardB05"] == 6 # 숨은 보기도 바뀔 때마다 들음
|
||||
|
||||
|
||||
def test_노선_따라감은_편집_안_옮김(got) -> None:
|
||||
follow = got["follow"]
|
||||
assert follow["followed"] == {"stations": [95, 145, 150, 155], "resets": []}
|
||||
assert follow["reshown"] == {"resets": 0, "writes": 0}
|
||||
assert follow["userMove"] == [[145, 165], [150, 170], [155, 175]]
|
||||
|
||||
|
||||
def test_이음_페이지_한_벌() -> None:
|
||||
shared = src("A00_Common", "design", "design_shared.ts")
|
||||
changed = shared[shared.index("onPipesChanged: (pipes) => {") :]
|
||||
changed = changed[: changed.index("},")]
|
||||
assert changed.index("shared.lane.set({ pipes });") < changed.index("toAll(")
|
||||
assert "shared.lane.follow();" in shared[shared.index("onFacilitiesFollowed: (far)") :][:200]
|
||||
assert "shared.lane.paint();" in shared # 종단도가 막 섰을 때
|
||||
page = src("A00_Common", "design", "design_page.ts")
|
||||
assert "lane: createFacilityLane(projectId, () => shared.profile)," in page
|
||||
assert "shared.lane.dispose();" in page
|
||||
# 종단도에 알약 · 측점 · 흙덮기 관을 쓰는 자리 = 시설 줄 하나
|
||||
for parts in (
|
||||
("A00_Common", "design", "design_view_profile.ts"),
|
||||
("B05_Profile", "B05_Profile_UI_Page_Structures.ts"),
|
||||
("B06_Section", "B06_Section_UI_Section_View_Profile.ts"),
|
||||
):
|
||||
text = src(*parts)
|
||||
for call in (
|
||||
"setIrregularStations(",
|
||||
"setMinCoverPipes(",
|
||||
"placePipeIds(",
|
||||
"prunePipeIds(",
|
||||
):
|
||||
assert call not in text, (parts[-1], call)
|
||||
assert "planStations(" not in text, parts[-1]
|
||||
panel = src("B06_Section", "B06_Section_UI_Page_Structures_Panel.ts")
|
||||
push = panel[panel.index("const pushMarks") :]
|
||||
assert "deps.shared.lane.set({ structures, pipes: pipeFacilities }, carryEdits);" in push[:600]
|
||||
view = src("A00_Common", "design", "design_view_profile.ts")
|
||||
assert "marks: shared.lane.marks," in view and "types: shared.lane.types," in view
|
||||
|
||||
|
||||
def test_관_옵션_넘김은_세션_칸() -> None:
|
||||
shared = src("A00_Common", "design", "design_shared.ts")
|
||||
assert "pipeOptionQueue" not in shared
|
||||
assert 'writeState("pipe-option-queue"' in shared
|
||||
assert '"pipe-option-queue": { bucket: "draft", scope: "project" },' in src(
|
||||
"A00_Common", "b_page_state.ts"
|
||||
)
|
||||
@@ -80,7 +80,7 @@ def test_B06_알약_풂과_측점_없는_관():
|
||||
view = _read("B06_Section", "B06_Section_UI_Section_View_Profile.ts")
|
||||
assert "if (structureId === null) {" in view
|
||||
assert "selectDesign(shared.projectId, NO_SELECTION, { from: ESCAPE_FROM });" in view
|
||||
assert "if (edit?.selectPipe && !plantsStation(hit, types)) {" in view
|
||||
assert "if (edit?.selectPipe && !plantsStation(hit, lane.types())) {" in view
|
||||
cross = _read("A00_Common", "design", "design_view_cross.ts")
|
||||
assert "selectPipe: (chainageM) => structuresPanel.selectPipeAt(chainageM)," in cross
|
||||
panel = _read("B06_Section", "B06_Section_UI_Page_Structures_Panel.ts")
|
||||
|
||||
@@ -44,10 +44,12 @@ def test_마커_목록은_알약_목록(got) -> None:
|
||||
assert "const structures = laneStructures(options.structures);" in lane
|
||||
marks = _read("B05_Profile", "B05_Profile_UI_RouteEdit_StructureMarks.ts")
|
||||
assert "laneStructures(source.marks())" in marks
|
||||
bridge = _read("B05_Profile", "B05_Profile_UI_Page_Structures.ts")
|
||||
assert "setStructures([...ownStructures, ...pipeMarks]);" in bridge
|
||||
assert "marks: (): StructureInstance[] => [...ownStructures, ...pipeMarks]," in bridge
|
||||
assert "planMarksChanged(deps.projectId);" in bridge
|
||||
# 알약 · 평면 마커 = 시설 줄 한 벌(462) 같은 목록 · 바뀌면 평면 다시 그림
|
||||
lane = _read("A00_Common", "design", "design_facility_lane.ts")
|
||||
assert "to.setStructures(marks());" in lane
|
||||
view = _read("A00_Common", "design", "design_view_profile.ts")
|
||||
assert "marks: shared.lane.marks," in view
|
||||
assert "planMarksChanged(activeProjectId);" in view
|
||||
|
||||
|
||||
def test_고름_정보_창_법선(got) -> None:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
이 탭에서 고친 사용자 칸만 · [저장] patch 바탕도 서버 값 · 세션 = 서버 정본 그대로
|
||||
② 같은 판 · 서버 실패 = 세션 그대로(갈아끼움 · 알림 없음)
|
||||
③ 노선 초안이 옛 상세를 쥔 채 서버 판이 바뀜 — 초안을 버리면 새 판
|
||||
④ 숨은 종단 보기도 관 세션 id 장부를 돌림(평면 마커 누름 = 초안 자리) · 그리기는 보일 때
|
||||
④ 숨은 종단 보기도 관 세션 id 장부를 돌림(평면 마커 누름 = 초안 자리 · 장부 = 시설 줄 한 벌 462) · 그리기는 보일 때
|
||||
TS 셈은 `helper_451_session_canon.cjs`.
|
||||
|
||||
./venv/Scripts/python.exe -m pytest resources/tester/test_451_session_canon.py -q
|
||||
@@ -63,9 +63,10 @@ def test_초안_hold_는_버리면_새_판(got) -> None:
|
||||
|
||||
|
||||
def test_숨은_종단_보기도_관_id_장부() -> None:
|
||||
view = (ROOT / "A00_Common/design/design_view_profile.ts").read_text(encoding="utf-8")
|
||||
follow = view[view.index("const followFacilities") : view.index("const selectGraphAt")]
|
||||
assert "if (!host.visible()) return void (lastPipes && shownPipes(lastPipes));" in follow
|
||||
changed = view[view.index("onPipesChanged: (pipes) => {") :]
|
||||
changed = changed[: changed.index("},")]
|
||||
assert "else shownPipes(pipes);" in changed
|
||||
# 장부 맞춤 = 페이지 시설 줄 한 벌(462) — 관 알림 · 노선 따라감 모두 보기 숨김과 무관
|
||||
shared = (ROOT / "A00_Common/design/design_shared.ts").read_text(encoding="utf-8")
|
||||
changed = shared[shared.index("onPipesChanged: (pipes) => {") :]
|
||||
assert "shared.lane.set({ pipes });" in changed[: changed.index("},")]
|
||||
assert "shared.lane.follow();" in shared
|
||||
lane = (ROOT / "A00_Common/design/design_facility_lane.ts").read_text(encoding="utf-8")
|
||||
assert "placePipeIds(" in lane and "prunePipeIds(" in lane
|
||||
|
||||
@@ -46,6 +46,6 @@ def test_draft_pipe_options_are_replayed_onto_the_cache():
|
||||
shared = _read("A00_Common", "design", "design_shared.ts")
|
||||
assert "shared.lastPipes = pipes" in shared
|
||||
profile = _read("A00_Common", "design", "design_view_profile.ts")
|
||||
assert profile.index("if (lastPipes) applyPipes(lastPipes)") < profile.index(
|
||||
assert profile.index("if (lastPipes) applyPipes();") < profile.index(
|
||||
"await bridge.load();\n advanceLoading"
|
||||
)
|
||||
|
||||
@@ -62,7 +62,8 @@ def test_막기_규칙은_종단도_한_곳():
|
||||
assert profile.count("blocksMinCover(") == 1
|
||||
# 판이 없는 보기도 관 목록을 넘겨 최소 흙덮기를 판정한다.
|
||||
assert "setMinCoverPipes(" in profile
|
||||
assert "setMinCoverPipes(" in _read("B06_Section/B06_Section_UI_Section_View_Profile.ts")
|
||||
# 두 보기 = 시설 줄 한 벌이 넘김(462)
|
||||
assert "setMinCoverPipes(" in _read("A00_Common/design/design_facility_lane.ts")
|
||||
|
||||
|
||||
def test_크기_접기_키는_하나():
|
||||
|
||||
Reference in New Issue
Block a user