diff --git a/tests/e2e/editor.spec.ts b/tests/e2e/editor.spec.ts index 18285b7..ba8d911 100644 --- a/tests/e2e/editor.spec.ts +++ b/tests/e2e/editor.spec.ts @@ -86,13 +86,17 @@ test("프로젝트 설정 패널에서 캔버스 프리셋을 변경하면 에 }; await presetSelect.selectOption("mobile"); + await expect + .poll(async () => parseFloat(await getMaxWidth()), { timeout: 5000 }) + .toBeLessThan(400); const mobileMaxWidth = parseFloat(await getMaxWidth()); expect(mobileMaxWidth).toBeGreaterThan(380); - expect(mobileMaxWidth).toBeLessThan(400); await presetSelect.selectOption("desktop"); + await expect + .poll(async () => parseFloat(await getMaxWidth()), { timeout: 5000 }) + .toBeGreaterThan(1180); const desktopMaxWidth = parseFloat(await getMaxWidth()); - expect(desktopMaxWidth).toBeGreaterThan(1180); expect(desktopMaxWidth).toBeLessThan(1220); });