diff --git a/public/robots.txt b/public/robots.txt
new file mode 100644
index 0000000..5b53265
--- /dev/null
+++ b/public/robots.txt
@@ -0,0 +1,7 @@
+# Tech Log — 공개 기록은 읽히라고 있는 것이고, Studio 는 아니다.
+User-agent: *
+Allow: /
+Disallow: /studio
+Disallow: /api/
+
+Sitemap: https://hyeonworks.com/sitemap.xml
diff --git a/src/features/tech-log/presentation/public/components/public-document-header.tsx b/src/features/tech-log/presentation/public/components/public-document-header.tsx
index 1b43122..e1e4663 100644
--- a/src/features/tech-log/presentation/public/components/public-document-header.tsx
+++ b/src/features/tech-log/presentation/public/components/public-document-header.tsx
@@ -5,49 +5,6 @@ import type { components } from "../../../contracts/studio/generated.ts";
import { ProseText } from "../../shared/public-render/prose-text.tsx";
import { DOCUMENT_KIND_LABELS } from "../../shared/document-kind-labels.ts";
-export function PublicDocumentHeader({ record }: { record: PublicRecord }) {
- return (
-
- );
-}
-
export function publicRenderModelBase(
record: PublicRecord,
): components["schemas"]["PublicRenderModelBase"] {
diff --git a/src/features/tech-log/presentation/shared/public-render/public-record-renderer.tsx b/src/features/tech-log/presentation/shared/public-render/public-record-renderer.tsx
index 3be152f..659b3a9 100644
--- a/src/features/tech-log/presentation/shared/public-render/public-record-renderer.tsx
+++ b/src/features/tech-log/presentation/shared/public-render/public-record-renderer.tsx
@@ -14,6 +14,7 @@ import {
type PublicRelation,
} from "./public-document-relations.tsx";
import { DOCUMENT_KIND_LABELS } from "../document-kind-labels.ts";
+import { useDocumentMetadata } from "../use-document-metadata.ts";
type PublicRenderModel = components["schemas"]["PublicRenderModel"];
type PublicRenderModelBase = components["schemas"]["PublicRenderModelBase"];
@@ -562,6 +563,15 @@ export function PublicRecordRenderer({
model: PublicRenderModel;
embedded?: boolean;
} & RenderDependencies) {
+ /*
+ 탭 제목과 설명에 지금 보는 문서를 반영한다. 라우터는 라우트마다 고정된 이름만 넣어서
+ 공개 문서가 전부 "Reference · Tech Log" 였고, 설명은 모든 화면이 "Tech Log frontend"
+ 하나였다 — 탭을 여럿 띄우거나 링크를 공유하면 어느 글인지 알 수 없었다.
+
+ 미리보기(embedded)는 Studio 안의 한 조각이므로 탭 이름을 건드리지 않는다.
+ */
+ useDocumentMetadata(embedded ? undefined : model.title, model.summary);
+
switch (model.kind) {
case "CASE":
return (
diff --git a/src/features/tech-log/presentation/shared/use-document-metadata.ts b/src/features/tech-log/presentation/shared/use-document-metadata.ts
new file mode 100644
index 0000000..db37bf4
--- /dev/null
+++ b/src/features/tech-log/presentation/shared/use-document-metadata.ts
@@ -0,0 +1,32 @@
+import { useEffect } from "react";
+
+/**
+ * 열려 있는 문서를 탭 제목과 설명에 반영한다.
+ *
+ *
라우터는 라우트마다 고정된 제목만 넣는다. 그래서 공개 문서가 전부 "Reference · Tech Log"
+ * 같은 같은 이름이었고, 탭을 여럿 띄우거나 링크를 공유하면 어느 문서인지 알 수 없었다.
+ * 설명(`meta[name=description]`)은 모든 화면이 "Tech Log frontend" 하나였다.
+ *
+ *
라우터가 라우트 전환 시점에 제목을 넣고, 이 훅은 문서를 받은 뒤에 덮어쓴다 — 순서가
+ * 그러하므로 서로 다투지 않는다. 화면을 떠날 때는 되돌려, 다음 라우트가 자기 제목을 넣기 전
+ * 잠깐 남는 이름이 이전 문서의 것이 되지 않게 한다.
+ */
+export function useDocumentMetadata(title: string | undefined, description?: string): void {
+ useEffect(() => {
+ if (!title) return undefined;
+ const previousTitle = document.title;
+ const element = document.querySelector('meta[name="description"]');
+ const previousDescription = element?.content;
+
+ document.title = `${title} · Tech Log`;
+ if (element && description) {
+ // 설명은 한 줄이어야 한다 — 요약에 문단이 있으면 줄바꿈을 공백으로 접는다.
+ element.content = description.replace(/\s+/gu, " ").trim().slice(0, 200);
+ }
+
+ return () => {
+ document.title = previousTitle;
+ if (element && previousDescription !== undefined) element.content = previousDescription;
+ };
+ }, [title, description]);
+}
diff --git a/src/features/tech-log/presentation/studio/components/common-document-fields.tsx b/src/features/tech-log/presentation/studio/components/common-document-fields.tsx
index 6903216..9f33de4 100644
--- a/src/features/tech-log/presentation/studio/components/common-document-fields.tsx
+++ b/src/features/tech-log/presentation/studio/components/common-document-fields.tsx
@@ -11,6 +11,13 @@ type CatalogEntry = components["schemas"]["CatalogEntry"];
*/
const SUMMARY_MAX = 2000;
+/**
+ * 목록·검색 카드는 요약을 세 줄에서 자른다. 작성자에게는 그 경계가 보이지 않아서, 500자를 써도
+ * 독자가 받는 것은 앞 세 줄뿐이라는 사실을 알 방법이 없었다. 정확한 글자 수는 글자 폭에 따라
+ * 달라지므로 어림수로 알린다 — 여기서 필요한 것은 정밀도가 아니라 경계가 있다는 사실이다.
+ */
+const SUMMARY_CARD_PREVIEW = 90;
+
/** 이 화면이 자기 칸 아래에 보여 줄 수 있는 경로. 나머지는 게시 버튼 옆에 남는다. */
export const COMMON_FIELD_PATHS = [
"/title",
@@ -48,7 +55,7 @@ export function CommonDocumentFields({
이름이 되어 "요약 412 / 600" 처럼 타자마다 이름이 바뀐다 — 이름은 「요약」로 두고
남은 자리는 그 옆에 따로 보여 준다.
*/}
- 요약
+ 요약
Topic onUpdate({ topicId: event.currentTarget.value || null })}>선택하지 않음 {topics.map((entry) => {entry.label} )}
Project onUpdate({ projectId: event.currentTarget.value || null })}>미지정 {projects.map((entry) => {entry.label} )}
diff --git a/src/features/tech-log/presentation/studio/components/document-list.tsx b/src/features/tech-log/presentation/studio/components/document-list.tsx
index 2b7eeb2..3e9054a 100644
--- a/src/features/tech-log/presentation/studio/components/document-list.tsx
+++ b/src/features/tech-log/presentation/studio/components/document-list.tsx
@@ -294,14 +294,26 @@ export function DocumentList() {
- void removeDocument(item)}
- >
- 삭제
-
+ {/*
+ 편집은 제목 링크였고 삭제만 버튼이라, 행에서 눈에 띄는 단 하나가 되돌릴 수
+ 없는 동작이었다. 편집을 같은 격의 버튼으로 올리고 삭제는 그 옆에 둔다.
+ */}
+
+
+ 편집
+
+ void removeDocument(item)}
+ >
+ 삭제
+
+
))}
diff --git a/src/features/tech-log/presentation/studio/components/new-document-form.tsx b/src/features/tech-log/presentation/studio/components/new-document-form.tsx
index 0dcffa9..abd2c68 100644
--- a/src/features/tech-log/presentation/studio/components/new-document-form.tsx
+++ b/src/features/tech-log/presentation/studio/components/new-document-form.tsx
@@ -178,7 +178,13 @@ export function NewDocumentForm() {
{pending ? "만드는 중…" : "작업본 만들기"}
- 이 화면의 작업본은 현재 Studio 세션에서만 유지됩니다.
+ {/*
+ 세션이 끊기면 쓴 것이 사라진다. 그 사실이 버튼 옆 작은 회색 글씨로만 있었다 —
+ 잃을 수 있는 것을 알리는 문구는 잃기 전에 눈에 들어와야 한다.
+ */}
+
+ 이 화면의 작업본은 현재 Studio 세션에서만 유지됩니다. 세션이 끝나면 사라집니다.
+
{error ? (
diff --git a/src/features/tech-log/presentation/studio/components/question-fields.tsx b/src/features/tech-log/presentation/studio/components/question-fields.tsx
index fa6ee3b..dac141c 100644
--- a/src/features/tech-log/presentation/studio/components/question-fields.tsx
+++ b/src/features/tech-log/presentation/studio/components/question-fields.tsx
@@ -40,15 +40,15 @@ export function QuestionFields({ draft, evidence, issues, onChange }: { draft: Q
if (value === "RESOLVED") update({ questionStatus: "RESOLVED", resolution: draft.resolution ?? { summary: "", evidenceTargetId: null, linkLabel: "" } });
else update({ questionStatus: value === "OPEN" ? "OPEN" : null, resolution: null });
}}>아직 정하지 않음 OPEN RESOLVED
- update({ facts })} />
+ update({ facts })} />
update({ assumptions })} />
- update({ unknowns })} />
+ update({ unknowns })} />
update({ constraints })} />
- 선택지
+ 검토한 선택지
{draft.options.length === 0 ? 아직 입력한 선택지가 없습니다.
: null}
{draft.options.map((option, index) =>
diff --git a/src/features/tech-log/presentation/studio/components/reference-fields.tsx b/src/features/tech-log/presentation/studio/components/reference-fields.tsx
index fa93f5d..b512571 100644
--- a/src/features/tech-log/presentation/studio/components/reference-fields.tsx
+++ b/src/features/tech-log/presentation/studio/components/reference-fields.tsx
@@ -32,20 +32,20 @@ export function ReferenceFields({ draft, issues, onChange }: { draft: ReferenceI
return (
- 목적
- 규칙
+ 이 기준을 쓰는 이유
+ 판단 기준
- {draft.rules.length === 0 ? 아직 입력한 규칙이 없습니다.
: null}
+ {draft.rules.length === 0 ? 아직 입력한 판단 기준이 없습니다.
: null}
{draft.rules.map((rule, index) => )}
- = 50} onClick={() => { if (draft.rules.length < 50) update({ rules: orderedRules([...draft.rules, { id: createNewItemId(), title: "", body: "", order: draft.rules.length }]) }); }}>규칙 추가
+ = 50} onClick={() => { if (draft.rules.length < 50) update({ rules: orderedRules([...draft.rules, { id: createNewItemId(), title: "", body: "", order: draft.rules.length }]) }); }}>판단 기준 추가
- update({ applyWhen })} />
+ update({ applyWhen })} />
- update({ exceptions })} />
+ update({ exceptions })} />
update({ examples })} />
diff --git a/src/features/tech-log/presentation/studio/components/release-manager.tsx b/src/features/tech-log/presentation/studio/components/release-manager.tsx
index 7e129d8..fea2877 100644
--- a/src/features/tech-log/presentation/studio/components/release-manager.tsx
+++ b/src/features/tech-log/presentation/studio/components/release-manager.tsx
@@ -208,7 +208,14 @@ export function ReleaseManager() {
RELEASE
{release.title}
-
{release.publication.canonicalPath ?? "아직 공개하지 않음"}
+ {/*
+ 경로가 비었다고 미공개는 아니다. 예전에는 한 줄 안에서 「상태 공개 · 공개일
+ 2026-08-22」 옆에 「아직 공개하지 않음」 이 같이 나왔다 — 공개 사이트에는
+ 실제로 올라가 있었으므로 뒤쪽이 틀렸다. 공개 여부는 아래 「상태」가 말한다.
+ */}
+ {release.publication.canonicalPath ? (
+
{release.publication.canonicalPath}
+ ) : null}
@@ -232,7 +239,7 @@ export function ReleaseManager() {
편집
void remove(release)}
diff --git a/src/features/tech-log/presentation/studio/components/studio-dashboard.tsx b/src/features/tech-log/presentation/studio/components/studio-dashboard.tsx
index 91c1e61..6c8c26f 100644
--- a/src/features/tech-log/presentation/studio/components/studio-dashboard.tsx
+++ b/src/features/tech-log/presentation/studio/components/studio-dashboard.tsx
@@ -89,10 +89,23 @@ export function StudioDashboard() {
return () => controller.abort();
}, [gateway]);
- const validationItems =
- dashboard?.continueWriting.filter((item) =>
- ["VALIDATE", "FIX_VALIDATION", "CREATE_PREVIEW"].includes(item.nextAction),
- ) ?? [];
+ /*
+ 세 칸은 한 줄기의 서로 다른 구간이다. 예전에는 「검증과 미리보기」와 「게시 준비」가
+ 「이어서 작성」을 걸러 낸 부분집합이면서 「이어서 작성」이 전체를 그대로 그렸다. 그래서 모든
+ 문서가 같은 단계에 있으면 세 칸이 같은 목록을 세 번 반복했다 — 대시보드의 60%가 같은 제목
+ 다섯 개였고, 두 칸은 구분조차 되지 않았다.
+
+ 각 문서는 지금 서 있는 구간 한 곳에만 나온다.
+ */
+ const VALIDATION_ACTIONS = ["VALIDATE", "FIX_VALIDATION", "CREATE_PREVIEW"];
+ const continueWriting = dashboard?.continueWriting ?? [];
+ const validationItems = continueWriting.filter((item) =>
+ VALIDATION_ACTIONS.includes(item.nextAction),
+ );
+ const readyIds = new Set((dashboard?.readyToPublish ?? []).map((item) => item.id));
+ const writingItems = continueWriting.filter(
+ (item) => !VALIDATION_ACTIONS.includes(item.nextAction) && !readyIds.has(item.id),
+ );
return (
@@ -138,7 +151,7 @@ export function StudioDashboard() {
diff --git a/src/features/tech-log/presentation/studio/components/taxonomy-manager.tsx b/src/features/tech-log/presentation/studio/components/taxonomy-manager.tsx
index 56b9413..e3aa253 100644
--- a/src/features/tech-log/presentation/studio/components/taxonomy-manager.tsx
+++ b/src/features/tech-log/presentation/studio/components/taxonomy-manager.tsx
@@ -292,14 +292,16 @@ export function TaxonomyManager() {
{topic.status === "ARCHIVED" ? "보관" : "활성"}
- void removeTopic(topic)}
- >
- 삭제
-
+
+ void removeTopic(topic)}
+ >
+ 삭제
+
+
))}
@@ -349,6 +351,17 @@ export function TaxonomyManager() {
+ {/*
+ 「다음: 내용 편집」 을 안내하면서 정작 그 줄의 버튼은 게시 취소와 삭제뿐이라,
+ 편집 진입점이 작은 텍스트 링크로만 있었다. 공개 프로젝트 화면이 비어 있던
+ 이유가 여기다 — 쓰라고 안내하고 쓸 자리를 눈에 띄게 주지 않았다.
+ */}
+
+ 내용 편집
+
void removeProject(project)}
diff --git a/src/features/tech-log/presentation/styles/studio.css b/src/features/tech-log/presentation/styles/studio.css
index dfc2030..432c576 100644
--- a/src/features/tech-log/presentation/styles/studio.css
+++ b/src/features/tech-log/presentation/styles/studio.css
@@ -98,7 +98,17 @@
.studio-app .studio-document-tools input,
.studio-app .studio-asset-tools input { flex: 1; }
.studio-app .studio-result-count { margin: 24px 0 10px; color: var(--muted); font-size: 13px; }
-.studio-app .studio-document-row { display: grid; grid-template-columns: 105px minmax(240px, 1fr) minmax(360px, 0.9fr); gap: 24px; align-items: start; padding-block: 26px; border-top: 1px solid var(--line); }
+/*
+ 동작 열을 행 안에 둔다. 예전에는 격자에 자리가 없어 버튼이 다음 줄 왼쪽으로 떨어졌고,
+ 릴리스·주제처럼 버튼이 둘인 목록은 그 줄이 세로로 쌓여 행마다 110px 를 먹었다.
+ 게시 기록은 이미 행 안 오른쪽에 버튼을 두고 있었다 — 그쪽에 맞춘다.
+*/
+.studio-app .studio-document-row { display: grid; grid-template-columns: 105px minmax(240px, 1fr) minmax(300px, 0.8fr) auto; gap: 24px; align-items: start; padding-block: 26px; border-top: 1px solid var(--line); }
+.studio-app .studio-document-row .studio-row-actions { margin-top: 0; flex-wrap: nowrap; }
+
+/* 되돌릴 수 없는 동작. 눈에 띄어야 하지만 주 동작보다 앞서면 안 된다. */
+.studio-app .studio-danger-button { border-color: var(--line-strong); background: var(--paper); color: var(--danger, #b4232a); }
+.studio-app .studio-danger-button:hover:not(:disabled) { border-color: var(--danger, #b4232a); }
.studio-app .studio-document-list > :first-child { border-top: 0; }
.studio-app .studio-document-title h2 { margin: 0; font-size: 17px; line-height: 1.5; overflow-wrap: anywhere; }
.studio-app .studio-document-title h2 a { display: inline-flex; min-height: 44px; align-items: flex-start; }
@@ -112,8 +122,15 @@
값이라, 묶음 안에서는 묶음이 여백을 갖고 버튼은 나란히 선다.
*/
.studio-app .studio-row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
+@media (max-width: 900px) {
+ .studio-app .studio-document-row { grid-template-columns: 105px minmax(0, 1fr); }
+ .studio-app .studio-document-row .studio-row-actions { grid-column: 1 / -1; margin-top: 16px; }
+}
.studio-app .studio-field-note { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
+
+/* 잃을 수 있는 것을 알리는 문구. 안내(note)보다 한 격 위에 둔다. */
+.studio-app .studio-field-warning { margin: 10px 0 0; padding: 10px 14px; border-left: 3px solid var(--warning, #b8791f); border-radius: 0 4px 4px 0; background: var(--warning-soft, #fdf6e9); color: var(--ink); font-size: 13px; line-height: 1.6; }
.studio-app .studio-row-actions .studio-primary-button,
.studio-app .studio-row-actions .studio-secondary-button { margin: 0; }
.studio-app .studio-empty-state { padding-block: 56px; border-bottom: 1px solid var(--line); }
diff --git a/tests/component/inline-line-breaks.test.tsx b/tests/component/inline-line-breaks.test.tsx
index 0b40838..58e02e1 100644
--- a/tests/component/inline-line-breaks.test.tsx
+++ b/tests/component/inline-line-breaks.test.tsx
@@ -4,8 +4,7 @@ import { render } from "@testing-library/react";
import { MemoryRouter } from "react-router-dom";
import { describe, expect, it } from "vitest";
-import { PublicDocumentHeader } from "../../src/features/tech-log/presentation/public/components/public-document-header.tsx";
-import type { QuestionRecord } from "../../src/features/tech-log/application/ports/public-content-queries.ts";
+import { PublicRecordRenderer } from "../../src/features/tech-log/presentation/shared/public-render/public-record-renderer.tsx";
import {
InlineRenderer,
@@ -60,46 +59,48 @@ describe("Markdown 을 거치지 않는 평문 칸", () => {
/**
* 문서 머리말의 요약. 상한이 2000자가 되면서 요약은 한 문장이 아니라 여러 문단이 되었고,
- * 여기만 `PlainText` 를 거치지 않아 그 문단들이 한 덩어리로 이어져 보였다.
+ * 예전에는 빈 줄까지 로 나가 문단 사이 여백이 없었다.
+ *
+ * 이 가드는 한동안 엉뚱한 것을 지키고 있었다 — `PublicDocumentHeader` 라는 컴포넌트를 세웠는데
+ * 화면을 실제로 그리는 것은 `PublicRecordRenderer` 였고, 그 컴포넌트는 아무도 부르지 않는 죽은
+ * 코드였다. 지금은 진짜로 그려지는 쪽을 본다.
*/
describe("문서 머리말의 요약", () => {
- const record: QuestionRecord = {
+ const model = {
kind: "QUESTION",
slug: "session-store-boundary",
title: "세션 저장소 경계",
summary: "Mediator와 BFF는 서로 다른 저장소를 쓴다.\n둘 다 메모리에 있다.\n\n인스턴스를 늘리면 설계가 필요하다.",
- path: "/questions/session-store-boundary",
- topic: "인증",
- topicSlug: "auth",
- projectSlug: "keycloak",
- projectTitle: "Keycloak",
- publishedAt: "2026-08-29T00:00:00Z",
- publishedLabel: "2026.08.29",
- visibility: "PUBLIC",
+ publicPath: "/questions/session-store-boundary",
+ topic: { label: "인증", publicPath: "/explore?topic=auth" },
+ project: { label: "Keycloak", publicPath: "/projects/keycloak" },
relations: [],
- questionStatus: "OPEN",
+ renderContext: { generatedAt: "2026-08-31T00:00:00Z", dependencyRevision: "r1" },
+ status: "OPEN",
facts: [],
assumptions: [],
unknowns: [],
constraints: [],
options: [],
nextValidation: "",
- };
+ resolution: null,
+ } as never;
it("빈 줄은 문단으로, 문단 안 줄바꿈은 줄바꿈으로 그린다", () => {
const { container } = render(
-
+ undefined}
+ resolveEvidenceAsset={() => {
+ throw new Error("이 문서에는 도식이 없다");
+ }}
+ />
,
);
- /*
- 요약은 "두 줄 + 빈 줄 + 한 줄" 이다. 예전에는 셋 다 로 나가서 문단 사이 여백이
- 없었다. 지금은 빈 줄이 문단을 가르고, 문단 안의 줄바꿈만 로 남는다.
- */
const paragraphs = container.querySelectorAll(".public-document-header p");
expect(paragraphs).toHaveLength(2);
expect(container.querySelectorAll(".public-document-header p br")).toHaveLength(1);
- // 그대로 넣으면 문단 하나에 0개가 되어 전부 한 덩어리로 읽힌다.
expect(paragraphs[0]).toHaveTextContent("둘 다 메모리에 있다.");
expect(paragraphs[1]).toHaveTextContent("인스턴스를 늘리면 설계가 필요하다.");
});
diff --git a/tests/features/tech-log/studio-editor-smoke.test.tsx b/tests/features/tech-log/studio-editor-smoke.test.tsx
index 7dc0606..8cb67c6 100644
--- a/tests/features/tech-log/studio-editor-smoke.test.tsx
+++ b/tests/features/tech-log/studio-editor-smoke.test.tsx
@@ -175,43 +175,49 @@ describe("TechLog Studio document editor", () => {
const user = userEvent.setup();
renderEditor(FIXTURE_IDS.stateNonceReference);
- expect(await screen.findByLabelText("목적")).toHaveValue(
+ /*
+ 에디터 라벨이 공개 화면의 절 제목과 같아졌으므로(작성자가 매핑을 외우지 않도록), 미리보기의
+ `` 와 이름이 겹친다. 여기서 보려는 것은 입력 칸이다.
+ */
+ expect(
+ await screen.findByRole("textbox", { name: "이 기준을 쓰는 이유" }),
+ ).toHaveValue(
"각 검증값의 책임을 다시 찾는 기준입니다.",
);
- expect(screen.getByLabelText("규칙 1 제목")).toHaveValue("state는 요청을 연결합니다");
- expect(screen.getByLabelText("적용 조건 1")).toHaveValue("Code Flow를 구성할 때");
+ expect(screen.getByLabelText("판단 기준 1 제목")).toHaveValue("state는 요청을 연결합니다");
+ expect(screen.getByLabelText("적용할 때 1")).toHaveValue("Code Flow를 구성할 때");
expect(screen.getByLabelText("마지막 검증일")).toHaveValue("2026-08-13");
expect(screen.getByText("아직 입력한 항목이 없습니다.")).toBeVisible();
- await user.click(screen.getByRole("button", { name: "규칙 추가" }));
- await user.type(screen.getByLabelText("규칙 2 제목"), "nonce는 Token을 연결합니다");
- const secondRule = screen.getByLabelText("규칙 2 제목").closest(
+ await user.click(screen.getByRole("button", { name: "판단 기준 추가" }));
+ await user.type(screen.getByLabelText("판단 기준 2 제목"), "nonce는 Token을 연결합니다");
+ const secondRule = screen.getByLabelText("판단 기준 2 제목").closest(
".studio-ordered-item",
) as HTMLElement;
await user.click(within(secondRule).getByRole("button", { name: "위로" }));
- expect(screen.getByLabelText("규칙 1 제목")).toHaveValue(
+ expect(screen.getByLabelText("판단 기준 1 제목")).toHaveValue(
"nonce는 Token을 연결합니다",
);
await user.click(
within(
- screen.getByLabelText("규칙 1 제목").closest(".studio-ordered-item") as HTMLElement,
+ screen.getByLabelText("판단 기준 1 제목").closest(".studio-ordered-item") as HTMLElement,
).getByRole("button", { name: "삭제" }),
);
- expect(screen.getByLabelText("규칙 1 제목")).toHaveValue("state는 요청을 연결합니다");
+ expect(screen.getByLabelText("판단 기준 1 제목")).toHaveValue("state는 요청을 연결합니다");
- await user.click(screen.getByRole("button", { name: "적용 조건 추가" }));
- await user.type(screen.getByLabelText("적용 조건 2"), "두 번째 적용 조건");
- const secondApplyWhen = screen.getByLabelText("적용 조건 2").closest(
+ await user.click(screen.getByRole("button", { name: "적용할 때 추가" }));
+ await user.type(screen.getByLabelText("적용할 때 2"), "두 번째 적용 조건");
+ const secondApplyWhen = screen.getByLabelText("적용할 때 2").closest(
".studio-ordered-item",
) as HTMLElement;
await user.click(within(secondApplyWhen).getByRole("button", { name: "위로" }));
- expect(screen.getByLabelText("적용 조건 1")).toHaveValue("두 번째 적용 조건");
+ expect(screen.getByLabelText("적용할 때 1")).toHaveValue("두 번째 적용 조건");
await user.click(
within(
- screen.getByLabelText("적용 조건 1").closest(".studio-ordered-item") as HTMLElement,
+ screen.getByLabelText("적용할 때 1").closest(".studio-ordered-item") as HTMLElement,
).getByRole("button", { name: "삭제" }),
);
- expect(screen.getByLabelText("적용 조건 1")).toHaveValue("Code Flow를 구성할 때");
+ expect(screen.getByLabelText("적용할 때 1")).toHaveValue("Code Flow를 구성할 때");
expect(screen.getByRole("status", { name: "편집 상태" })).toHaveTextContent(
"저장되지 않음",
);
@@ -222,14 +228,14 @@ describe("TechLog Studio document editor", () => {
renderEditor(FIXTURE_IDS.edgeTokenQuestion);
expect(await screen.findByLabelText("질문 상태")).toHaveValue("OPEN");
- expect(screen.getByLabelText("미지수 1")).toHaveValue("신뢰 헤더 위조 가능성");
+ expect(screen.getByLabelText("남은 미지수 1")).toHaveValue("신뢰 헤더 위조 가능성");
expect(screen.getByRole("textbox", { name: "다음 검증" })).toHaveValue(
"위협 모델을 비교합니다.",
);
expect(screen.queryByLabelText("해결 요약")).not.toBeInTheDocument();
- await user.click(screen.getByRole("button", { name: "사실 추가" }));
- await user.type(screen.getByLabelText("사실 1"), "Edge가 서명을 검증합니다");
+ await user.click(screen.getByRole("button", { name: "확인한 사실 추가" }));
+ await user.type(screen.getByLabelText("확인한 사실 1"), "Edge가 서명을 검증합니다");
await user.click(screen.getByRole("button", { name: "선택지 추가" }));
expect(screen.getByLabelText("선택지 1 제목")).toHaveValue("");
expect(screen.getByLabelText("선택지 1 설명")).toHaveValue("");
@@ -252,15 +258,17 @@ describe("TechLog Studio document editor", () => {
중간에서 말없이 입력을 멈췄고, 쓰는 사람에게는 키보드가 고장 난 것처럼 보였다.
*/
expect(summary).toHaveAttribute("maxlength", "2000");
+ // 목록 카드는 요약을 세 줄에서 자른다 — 작성자에게 그 경계를 알린다.
+ expect(screen.getByText(/목록 카드에는 약 90자까지 보입니다/u)).toBeInTheDocument();
fireEvent.change(summary, { target: { value: "가".repeat(412) } });
- expect(screen.getByText("412 / 2000")).toBeInTheDocument();
+ expect(screen.getByText(/412 \/ 2000/u)).toBeInTheDocument();
expect(
screen.queryByText(/2000자까지 모두 썼습니다/),
).not.toBeInTheDocument();
fireEvent.change(summary, { target: { value: "가".repeat(2000) } });
- expect(screen.getByText("2000 / 2000")).toBeInTheDocument();
+ expect(screen.getByText(/2000 \/ 2000/u)).toBeInTheDocument();
// 한계에 닿았을 때만 알린다 — 글자마다 읽어 주면 받아쓰기가 된다.
expect(screen.getByText(/2000자까지 모두 썼습니다/)).toBeInTheDocument();