fix: 오류 수정
This commit is contained in:
@@ -104,18 +104,15 @@ describe("TechLog Studio document editor", () => {
|
||||
expect(screen.getByRole("complementary", { name: "작업 상태" })).toHaveTextContent(
|
||||
"저장 버전4종류CASE",
|
||||
);
|
||||
// 편집기는 다음 한 칸이 아니라 게시까지의 길을 보여 준다. 예전에는 "저장본 검증" 하나뿐이라,
|
||||
// 작성자가 그 단계를 밟아 본 뒤에야 뒤에 미리보기와 게시가 있다는 것을 알 수 있었다.
|
||||
const flow = screen.getByRole("navigation", { name: "게시까지의 단계" });
|
||||
expect(
|
||||
within(flow)
|
||||
.getAllByRole("link")
|
||||
.map((link) => [link.textContent, link.getAttribute("href")]),
|
||||
).toEqual([
|
||||
["검증", `/studio/documents/${FIXTURE_IDS.redisAdapterCase}/validation`],
|
||||
["미리보기", `/studio/documents/${FIXTURE_IDS.redisAdapterCase}/preview`],
|
||||
["게시", `/studio/documents/${FIXTURE_IDS.redisAdapterCase}/publish`],
|
||||
// 작성자가 밟는 단계는 저장과 게시 둘뿐이다. 예전에는 검증 → 미리보기 → 게시 세 화면을
|
||||
// 차례로 거쳐야 했는데, 그 셋은 백엔드가 게시 요청에 요구하는 값을 만들기 위한 것이지
|
||||
// 작성자에게 물어볼 것이 아니었다 — 지금은 게시 버튼 뒤에서 잇달아 부른다.
|
||||
const rail = screen.getByRole("complementary", { name: "작업 상태" });
|
||||
expect(within(rail).getAllByRole("button").map((button) => button.textContent)).toEqual([
|
||||
"저장",
|
||||
"게시",
|
||||
]);
|
||||
expect(within(rail).queryAllByRole("link")).toHaveLength(0);
|
||||
|
||||
const editTab = screen.getByRole("tab", { name: "편집" });
|
||||
const previewTab = screen.getByRole("tab", { name: "즉시 미리보기" });
|
||||
|
||||
Reference in New Issue
Block a user