TDD,E2E 개선, 미적용 스타일 개선
This commit is contained in:
@@ -25,17 +25,17 @@ describe("PublicPageRenderer - 텍스트 블록 스타일", () => {
|
||||
} as any;
|
||||
};
|
||||
|
||||
it("기본 텍스트 블록은 text-left / text-base 및 기본 색상으로 렌더되어야 한다", () => {
|
||||
it("기본 텍스트 블록은 pb-text-left / pb-text-base 및 기본 색상(pb-text-color-strong)으로 렌더되어야 한다", () => {
|
||||
const blocks: Block[] = [makeTextBlock()];
|
||||
|
||||
render(<PublicPageRenderer blocks={blocks} />);
|
||||
|
||||
const el = screen.getByText("퍼블릭 텍스트 스타일 테스트") as HTMLParagraphElement;
|
||||
|
||||
expect(el.className).toContain("text-left");
|
||||
expect(el.className).toContain("text-base");
|
||||
// 기본 색상은 Tailwind text-slate-50 클래스로 고정되어 있다.
|
||||
expect(el.className).toContain("text-slate-50");
|
||||
expect(el.className).toContain("pb-text-left");
|
||||
expect(el.className).toContain("pb-text-base");
|
||||
// 기본 색상은 builder.css 의 pb-text-color-strong 클래스로 표현된다.
|
||||
expect(el.className).toContain("pb-text-color-strong");
|
||||
});
|
||||
|
||||
it("fontSizeMode=custom, fontSizeCustom, colorCustom, backgroundColorCustom 이 설정되면 스타일이 인라인으로 반영되어야 한다", () => {
|
||||
@@ -53,8 +53,8 @@ describe("PublicPageRenderer - 텍스트 블록 스타일", () => {
|
||||
|
||||
const el = screen.getByText("퍼블릭 텍스트 스타일 테스트") as HTMLParagraphElement;
|
||||
|
||||
// 정렬 클래스
|
||||
expect(el.className).toContain("text-center");
|
||||
// 정렬 클래스는 pb-text-center 로 반영된다.
|
||||
expect(el.className).toContain("pb-text-center");
|
||||
// 커스텀 폰트 크기: sizeClass 는 비워지고, 인라인 스타일로 설정된다.
|
||||
expect(el.style.fontSize).toBe("1.5em");
|
||||
// 커스텀 색상/배경색
|
||||
|
||||
Reference in New Issue
Block a user