비디오 태그 및 폼 블록 정리
This commit is contained in:
@@ -1064,7 +1064,7 @@ test("폼 체크박스 옵션 간격 px 입력이 프리뷰에서도 em 스케
|
||||
expect(gapStyles.inlineRowGap.endsWith("em")).toBeTruthy();
|
||||
});
|
||||
|
||||
test("폼 컨트롤러 고정 너비 px 입력이 프리뷰에서도 em 스케일로 반영되어야 한다", async ({ page }) => {
|
||||
test("FormBlock 은 프리뷰에서 별도 폼 컨트롤러 DOM 을 렌더하지 않아야 한다 (고정 너비 설정 시)", async ({ page }) => {
|
||||
await page.goto("/editor");
|
||||
|
||||
await page.getByRole("button", { name: "폼 블록 추가" }).click();
|
||||
@@ -1077,23 +1077,11 @@ test("폼 컨트롤러 고정 너비 px 입력이 프리뷰에서도 em 스케
|
||||
await page.getByRole("link", { name: "프리뷰 열기" }).click();
|
||||
await expect(page.getByRole("heading", { name: "Page Preview" })).toBeVisible();
|
||||
|
||||
const form = page.getByTestId("preview-form-controller").first();
|
||||
const inlineStyles = await form.evaluate((el) => {
|
||||
const element = el as HTMLElement;
|
||||
const s = window.getComputedStyle(element);
|
||||
return {
|
||||
computedWidth: s.width,
|
||||
inlineWidth: element.style.width,
|
||||
};
|
||||
});
|
||||
|
||||
const widthPx = parseFloat(inlineStyles.computedWidth);
|
||||
expect(widthPx).toBeGreaterThan(430);
|
||||
expect(widthPx).toBeLessThan(520);
|
||||
expect(inlineStyles.inlineWidth.endsWith("em")).toBeTruthy();
|
||||
const formLocator = page.getByTestId("preview-form-controller");
|
||||
await expect(formLocator).toHaveCount(0);
|
||||
});
|
||||
|
||||
test("폼 컨트롤러 상하 여백 px 입력이 프리뷰에서도 em 스케일로 반영되어야 한다", async ({ page }) => {
|
||||
test("FormBlock 은 프리뷰에서 별도 폼 컨트롤러 DOM 을 렌더하지 않아야 한다 (상하 여백 설정 시)", async ({ page }) => {
|
||||
await page.goto("/editor");
|
||||
|
||||
await page.getByRole("button", { name: "폼 블록 추가" }).click();
|
||||
@@ -1105,20 +1093,8 @@ test("폼 컨트롤러 상하 여백 px 입력이 프리뷰에서도 em 스케
|
||||
await page.getByRole("link", { name: "프리뷰 열기" }).click();
|
||||
await expect(page.getByRole("heading", { name: "Page Preview" })).toBeVisible();
|
||||
|
||||
const form = page.getByTestId("preview-form-controller").first();
|
||||
const inlineStyles = await form.evaluate((el) => {
|
||||
const element = el as HTMLElement;
|
||||
const s = window.getComputedStyle(element);
|
||||
return {
|
||||
marginTop: s.marginTop,
|
||||
inlineMarginTop: element.style.marginTop,
|
||||
};
|
||||
});
|
||||
|
||||
const marginPx = parseFloat(inlineStyles.marginTop);
|
||||
expect(marginPx).toBeGreaterThan(24);
|
||||
expect(marginPx).toBeLessThan(32);
|
||||
expect(inlineStyles.inlineMarginTop.endsWith("em")).toBeTruthy();
|
||||
const formLocator = page.getByTestId("preview-form-controller");
|
||||
await expect(formLocator).toHaveCount(0);
|
||||
});
|
||||
|
||||
test("폼 라디오 줄간격 px 입력이 프리뷰에서도 em 스케일로 반영되어야 한다", async ({ page }) => {
|
||||
|
||||
Reference in New Issue
Block a user