- 새 부품 파일: ui_template_table · setting_row · drop · createRowMenu(context_menu) · 모달 폭 단 · askConfirm · askText(window.prompt 대신) · confirmPanel - 단추 = 552-2 단추 부품(⋯ 아이콘 단추 28 · 띠 알림 닫기 20 · 놓기 칸 [파일 고르기] 28) - 대시보드 PageKit 의 dataTable · tableShell · tableRow · rowMenu · settingRow · settingCard · valueText = 부품을 다시 내보냄(한 벌 · 부름 꼴 그대로) · B01 옛 CSS 걷음 - showConfirmDialog 는 모달 부품으로 옮기고 본체가 다시 내보냄 · 모달 가림막 옛 보라 → --color-scrim - 시험: test_552_3_* 다섯 더함 · 옮긴 함수 자리를 읽던 test_290_1 · test_505_2 고침 · 부품 CSS import 를 못 읽던 시험 도우미 넷(130 · 153 · 280_5 · 311)이 .css 를 건너뜀 - 전후 촬영: B01 여덟 화면 자리 같음 · ⋯ 아이콘만 1 px 왼쪽(단추 부품 가운데 맞춤) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
67 lines
2.6 KiB
Python
67 lines
2.6 KiB
Python
"""290-1 다른 프로젝트 열면 그 밖 프로젝트 캐시 지움(요구 183-1).
|
|
|
|
- 들어갈 때(공용 `goToWorkflowStage`) 다른 프로젝트 세션 칸(초안 · 결과 · 옛 키 · 페이지 칸) · 3D 보관함 지움
|
|
- 다른 프로젝트에 저장 안 한 고침이 있으면 확인창(지우고 열기 / 남기기) · 남기기 = 그 초안만 둠
|
|
- 같은 프로젝트로 다시 들어오면 아무것도 안 지움 · 지금 프로젝트 · 계정 취향(pref) 그대로
|
|
`helper_290_1_project_purge.cjs` 가 진짜 TS 를 가짜 저장소 위에서 돌림.
|
|
"""
|
|
|
|
import json
|
|
import os
|
|
import subprocess
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
HERE = os.path.dirname(os.path.abspath(__file__))
|
|
A, B, C = "aaaa1111", "bbbb2222", "cccc3333"
|
|
MINE = [f"aislo:draft:structures:{B}", f"aislo:result:section-detail:{B}:7"]
|
|
UNRELATED = ["aislo.otp-pending", "aislo:entered-project"]
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
def out():
|
|
proc = subprocess.run(
|
|
["node", os.path.join(HERE, "helper_290_1_project_purge.cjs")],
|
|
capture_output=True,
|
|
text=True,
|
|
encoding="utf-8",
|
|
timeout=60,
|
|
)
|
|
assert proc.returncode == 0, proc.stderr
|
|
return json.loads(proc.stdout)
|
|
|
|
|
|
def test_지우고_열기_다른_프로젝트_모두_지움(out):
|
|
assert out["drop"]["keys"] == sorted(MINE + UNRELATED)
|
|
assert out["drop"]["purged"] == [B] # 3D 보관함도
|
|
assert out["drop"]["asked"] == [
|
|
[f"「이름-{A}」에 저장 안 한 고침이 있음 — 지우고 열기 / 남기기", "지우고 열기", "남기기"]
|
|
]
|
|
|
|
|
|
def test_남기기_그_프로젝트_초안만_둠(out):
|
|
kept = [f"aislo:draft:crossw:{A}:12", f"aislo:draft:structures:{A}", f"b06:culvertopt:{A}:12"]
|
|
assert out["keep"]["keys"] == sorted(MINE + UNRELATED + kept)
|
|
assert out["keep"]["asked"] == 1
|
|
|
|
|
|
def test_같은_프로젝트_다시_들어오면_안_지움(out):
|
|
assert out["same"]["asked"] == 0 and out["same"]["purged"] == 0
|
|
assert len(out["same"]["keys"]) == 11
|
|
|
|
|
|
def test_빈_초안은_고침_아님_취향은_둠(out):
|
|
assert out["plan"] == [A] # C 의 빈 초안({})은 묻지 않음
|
|
assert out["pref"] == "{}"
|
|
|
|
|
|
def test_공용_이동_한_곳에서_부름():
|
|
nav = (ROOT / "A00_Common/b_workflow_nav.ts").read_text(encoding="utf-8")
|
|
assert "return enterProject(" in nav and "./b_project_switch" in nav
|
|
ui = (ROOT / "ui_template/ui_template_modal.ts").read_text(
|
|
encoding="utf-8"
|
|
) # 확인창 = 부품(552-3)
|
|
assert 'cancelLabel = "취소"' in ui and "okLabel: confirmLabel, cancelLabel" in ui
|