feat: provide reusable UI and state galleries
This commit is contained in:
@@ -59,8 +59,14 @@ describe("async UI state matrix", () => {
|
||||
const state = deriveAsyncState({ failure });
|
||||
render(<AsyncSurface state={state} />);
|
||||
|
||||
expect(screen.getByRole("alert")).toHaveTextContent(failure.userMessageKey);
|
||||
expect(screen.getByRole("button")).toHaveTextContent("retry");
|
||||
expect(screen.getByRole("alert")).toHaveTextContent(
|
||||
"요청을 완료하지 못했습니다.",
|
||||
);
|
||||
expect(screen.getByRole("alert")).toHaveAttribute(
|
||||
"data-message-key",
|
||||
failure.userMessageKey,
|
||||
);
|
||||
expect(screen.getByRole("button")).toHaveTextContent("다시 시도");
|
||||
expect(screen.getByRole("alert")).not.toHaveTextContent("stack");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user