Merge remote-tracking branch 'origin/dev' into sub_laptop_1
This commit is contained in:
@@ -82,3 +82,54 @@ def test_e02_parts():
|
||||
assert "createTable(" in tables and "createTHead" not in tables
|
||||
assert 'className: "ui-field e02-field"' in tables # 칸 이름 줄은 입력 부품의 ui-field
|
||||
assert ".e02-field" not in css and "border-collapse" not in css
|
||||
|
||||
|
||||
def test_e03_parts():
|
||||
names = [
|
||||
"List", "Page", "Plan", "Prob", "ProbChart", "Reinforce", "Result", "Section", "Support", "View3D",
|
||||
] # fmt: skip
|
||||
ts = {n: _src(f"E03_StabSection/E03_StabSection_UI_{n}.ts") for n in names}
|
||||
css = _src("E03_StabSection/E03_StabSection_UI_Style.css")
|
||||
for n, src in ts.items():
|
||||
assert 'el("table"' not in src, n # 표 = 표 부품(`E03_StabSection_UI_Table.ts`)
|
||||
assert 'el("input"' not in src and 'el("select"' not in src, n
|
||||
assert "e03-legend__item" not in src and "e03-legend__swatch" not in src, n
|
||||
assert "createTable(" in _src("E03_StabSection/E03_StabSection_UI_Table.ts")
|
||||
assert "dataset.role = role" in _src("E03_StabSection/E03_StabSection_UI_Table.ts")
|
||||
assert "createLegend(" in _src("E03_StabSection/E03_StabSection_UI_Parts.ts")
|
||||
assert "openModal(" in ts["View3D"] and 'className: "e03-view3d"' not in ts["View3D"]
|
||||
for key in ("station-list", "slice-table", "methods", "whatif-table", "support-table"):
|
||||
assert f'"{key}"' in "".join(ts.values()), key # 촬영 장면 · 시험이 잡는 data-role
|
||||
for dead in (
|
||||
".e03-legend__item", ".e03-legend__swatch", ".e03-table", ".e03-verdict", ".e03-kpi",
|
||||
".e03-view3d {", ".e03-swatch-none", ".e03-list table", ".e03-list th {",
|
||||
): # fmt: skip
|
||||
assert dead not in css, dead
|
||||
|
||||
|
||||
def test_e04_parts():
|
||||
page = _src("E04_Stab3D/E04_Stab3D_UI_Page.ts")
|
||||
view = _src("E04_Stab3D/E04_Stab3D_UI_View3D.ts")
|
||||
css = _src("E04_Stab3D/E04_Stab3D_UI_Style.css")
|
||||
assert 'el("progress"' not in page and "createProgressBar()" in page
|
||||
for part in (
|
||||
"createSegment(",
|
||||
"createListRow(",
|
||||
"createKv(",
|
||||
"createFloatPanel(",
|
||||
"createBanner(",
|
||||
):
|
||||
assert part in page, part
|
||||
assert 'el("input"' not in view and "createCheckbox(" in view
|
||||
assert (
|
||||
'classList.add("e04-toggle")' in page
|
||||
) # 촬영 장면이 `.e04-toggle button[data-value]` 로 잡음
|
||||
assert 'row.classList.add("e04-section")' in page
|
||||
for dead in (
|
||||
".e04-toggle .ui-btn",
|
||||
".e04-legend__row",
|
||||
".e04-legend__swatch",
|
||||
".e04-result__list",
|
||||
".e04-section:hover",
|
||||
):
|
||||
assert dead not in css, dead
|
||||
|
||||
@@ -81,7 +81,7 @@ const tabsMod = load("ui_template/cad_host/cad_host_tabs.ts", { "@ui/ui_template
|
||||
out.fixedX = tabNode("a").kids.length; // 고정 탭 = 글만(지우기 없음)
|
||||
// ③ 지우기 — 물음 뒤 · 지금 탭이면 다음 탭을 실음
|
||||
await tabs.select("c");
|
||||
const xc = tabNode("c").kids.find((k) => k.className === "cad-tabs__x");
|
||||
const xc = tabNode("c").kids.find((k) => k.className.split(" ").includes("cad-tabs__x"));
|
||||
await xc.on.click({ stopPropagation() {} });
|
||||
out.afterRemove = { ids: tabs.tabs().map((t) => t.id), active: tabs.active().id, confirms: confirms.length };
|
||||
// ④ [+] — create 없으면 아무것도 안 함 · 닫기 기능(B07) = 미저장 탭만 물음
|
||||
@@ -97,7 +97,7 @@ const tabsMod = load("ui_template/cad_host/cad_host_tabs.ts", { "@ui/ui_template
|
||||
await closer.open({ id: "d1", name: "종단" });
|
||||
const before = confirms.length;
|
||||
const d2 = closer.element.kids.find((k) => k.dataset.tabId === "d2");
|
||||
await d2.kids.find((k) => k.className === "cad-tabs__x").on.click({ stopPropagation() {} });
|
||||
await d2.kids.find((k) => k.className.split(" ").includes("cad-tabs__x")).on.click({ stopPropagation() {} });
|
||||
const last = closer.element.kids.find((k) => k.dataset.tabId === "d1").kids.length; // 마지막 탭 = 닫기 없음
|
||||
out.b07 = { log: b07, asked: confirms.length - before, ids: closer.tabs().map((t) => t.id), last };
|
||||
|
||||
@@ -137,7 +137,7 @@ const tabsMod = load("ui_template/cad_host/cad_host_tabs.ts", { "@ui/ui_template
|
||||
});
|
||||
await new Promise((r) => setTimeout(r, 5));
|
||||
const bar = host.kids[0].kids.find((k) => k.className === "cad-tabs");
|
||||
const plus = bar.kids.find((k) => k.className === "cad-tabs__add");
|
||||
const plus = bar.kids.find((k) => k.className.split(" ").includes("cad-tabs__add"));
|
||||
await plus.on.click();
|
||||
await new Promise((r) => setTimeout(r, 5));
|
||||
inCad = { ...inCad, entities: [...inCad.entities, { type: "Circle" }] }; // 새 장에 하나 그림
|
||||
|
||||
Reference in New Issue
Block a user