운영 안정화와 화면 회귀 검증을 반영
Some checks failed
API contract / OpenAPI type drift (push) Failing after 6m2s

This commit is contained in:
Yun Chan 2026-10-20 16:33:48 +09:00
parent 6e3123091a
commit aeddaa6972
69 changed files with 3178 additions and 424 deletions

View file

@ -1037,39 +1037,52 @@ test.describe("관리자 콘솔 유스케이스 여정", () => {
await page.goto("/admin/continuous-improvement");
await expect(
page.getByRole("heading", { name: "승격보다 근거를 먼저 본다" }),
page.getByRole("heading", { name: "개선안 검토와 승인", exact: true }),
).toBeVisible();
// 증거 2종뿐인 모델 게이트: 이유가 문장으로 노출되고 버튼 라벨도 잠금 상태를 말한다.
const modelGate = page.locator(`[data-gate-id="${MODEL_GATE_ID}"]`);
await expect(
modelGate.getByText("필수 증거 4종이 모두 있어야 기록 가능"),
modelGate.getByRole("button", { name: "결정 선택 필요", exact: true }),
).toBeDisabled();
await expect(modelGate.getByRole("radio", { name: "승인", exact: true })).toBeDisabled();
await expect(
modelGate.getByText("필수 증거 4종이 갖춰지지 않아 승인할 수 없습니다", { exact: true }),
).toBeVisible();
await expect(modelGate.getByRole("button", { name: "증거 4종 미완료" })).toBeDisabled();
// 증거 4종 완비 릴리스 게이트: 사유 미입력이 차단 이유로 노출된다.
const releaseGate = page.locator(`[data-gate-id="${RELEASE_GATE_ID}"]`);
await expect(
releaseGate.getByText("승인 사유를 먼저 입력해야 함"),
releaseGate.getByRole("button", { name: "결정 선택 필요", exact: true }),
).toBeDisabled();
await releaseGate.getByRole("radio", { name: "승인", exact: true }).check();
await expect(
releaseGate.getByText("승인 사유를 먼저 입력해야 합니다", { exact: true }),
).toBeVisible();
const submitButton = releaseGate.getByRole("button", { name: "사람 승인 기록" });
const submitButton = releaseGate.getByRole("button", { name: "승인 기록", exact: true });
await expect(submitButton).toBeDisabled();
// 차단 사유는 입력·버튼과 aria-describedby로 연결되어 보조기술에도 상시 전달된다.
const requirementId = `approval-requirement-${RELEASE_GATE_ID}`;
await expect(releaseGate.getByLabel("사람 승인 사유")).toHaveAttribute(
await expect(releaseGate.getByLabel("사람 결정 사유", { exact: true })).toHaveAttribute(
"aria-describedby",
requirementId,
);
await expect(submitButton).toHaveAttribute("aria-describedby", requirementId);
// 사유를 입력하면 준비 문구로, 지우면 다시 차단 사유로 살아있게 갱신된다.
const reason = releaseGate.getByLabel("사람 승인 사유");
const reason = releaseGate.getByLabel("사람 결정 사유", { exact: true });
await reason.fill("릴리스 증거 4종을 독립 검토함");
await expect(releaseGate.getByText("증거 4종과 승인 사유가 준비됨")).toBeVisible();
await expect(
releaseGate.getByText("승인 결정과 사유를 변경 이력에 기록할 준비가 되었습니다", {
exact: true,
}),
).toBeVisible();
await expect(submitButton).toBeEnabled();
await reason.fill("");
await expect(releaseGate.getByText("승인 사유를 먼저 입력해야 함")).toBeVisible();
await expect(
releaseGate.getByText("승인 사유를 먼저 입력해야 합니다", { exact: true }),
).toBeVisible();
await expect(submitButton).toBeDisabled();
});
@ -1084,11 +1097,17 @@ test.describe("관리자 콘솔 유스케이스 여정", () => {
await expect(releaseGate).toContainText("릴리스 uc-g8-release-2026-08-17");
await expect(releaseGate).toContainText("승격 후보");
const reason = releaseGate.getByLabel("사람 승인 사유");
await releaseGate.getByRole("radio", { name: "승인", exact: true }).check();
const reason = releaseGate.getByLabel("사람 결정 사유", { exact: true });
await reason.fill("기준선·임계값·출처·롤백 증거를 모두 확인함");
await reason.press("Enter");
await expect(releaseGate.getByText("append-only 승인 원장 기록됨")).toBeVisible();
const recordedEffect = releaseGate.locator(".cic-effect");
await expect(recordedEffect.getByText("변경 승인 기록됨", { exact: true })).toBeVisible();
await expect(recordedEffect).toContainText("approve_promotion");
await expect(recordedEffect).toContainText(
`effect ${mock.view.lifecycle_events[0].lifecycle_event_id.slice(0, 8)}`,
);
expect(mock.approvalBodies).toHaveLength(1);
expect(mock.approvalBodies[0]).toMatchObject({
target_kind: "release_gate",
@ -1098,7 +1117,7 @@ test.describe("관리자 콘솔 유스케이스 여정", () => {
});
expect(mock.approvalBodies[0].evidence_refs).toHaveLength(4);
// 기록 후 입력 폼은 닫히고 다시 제출할 수 없다(append-only).
await expect(releaseGate.getByLabel("사람 승인 사유")).toHaveCount(0);
await expect(releaseGate.getByLabel("사람 결정 사유", { exact: true })).toHaveCount(0);
});
// usecase: 관리자가 슈퍼 관리자 키워드로 특정 권한 보유자를 찾아낸다