.
This commit is contained in:
@@ -78,11 +78,22 @@ test("프로젝트 설정 패널에서 캔버스 프리셋을 변경하면 에
|
||||
const inner = page.getByTestId("editor-canvas-inner");
|
||||
const presetSelect = page.getByRole("combobox", { name: "Canvas width 프리셋" });
|
||||
|
||||
await presetSelect.selectOption("mobile");
|
||||
await expect(inner).toHaveCSS("max-width", "390px");
|
||||
const getMaxWidth = async () => {
|
||||
return inner.evaluate((el) => {
|
||||
const s = window.getComputedStyle(el as HTMLElement);
|
||||
return s.maxWidth;
|
||||
});
|
||||
};
|
||||
|
||||
await presetSelect.selectOption("desktop");
|
||||
await expect(inner).toHaveCSS("max-width", "1200px");
|
||||
await presetSelect.selectOption("mobile");
|
||||
const mobileMaxWidth = parseFloat(await getMaxWidth());
|
||||
expect(mobileMaxWidth).toBeGreaterThan(380);
|
||||
expect(mobileMaxWidth).toBeLessThan(400);
|
||||
|
||||
await presetSelect.selectOption("desktop");
|
||||
const desktopMaxWidth = parseFloat(await getMaxWidth());
|
||||
expect(desktopMaxWidth).toBeGreaterThan(1180);
|
||||
expect(desktopMaxWidth).toBeLessThan(1220);
|
||||
});
|
||||
|
||||
test("텍스트 블록을 더블클릭해서 내용을 수정할 수 있어야 한다", async ({ page }) => {
|
||||
|
||||
Reference in New Issue
Block a user