diff --git a/tests/operator_gui/pages/workbench_page.py b/tests/operator_gui/pages/workbench_page.py index 4fc5f48..f049a25 100644 --- a/tests/operator_gui/pages/workbench_page.py +++ b/tests/operator_gui/pages/workbench_page.py @@ -20,6 +20,12 @@ SUGGESTED_QUERY_LOADED_STATUS = "추천 쿼리를 입력했습니다. 실행 버 # Client-side guard message when a reject/correct decision is missing its memo. MEMO_REQUIRED_ERROR = "반려 또는 보정 결정에는 메모가 필요합니다." +# Uploading runs the real analysis pipeline server-side (decode, fingerprints, +# YuNet face detection) before the case appears in the queue, so this path needs +# far more headroom than a mocked-bootstrap wait. At 10s it passed standalone but +# failed inside the full suite, where the other specs contend for the same CPU. +UPLOAD_ANALYSIS_TIMEOUT_MS = 30000 + class OperatorWorkbench: """Drives the operator GUI for browser-level (E2E) assertions.""" @@ -123,7 +129,9 @@ class OperatorWorkbench: self.page.get_by_role("button", name="사진 넣기").click() return self - def upload_and_open(self, file_path: str, case_id: str, timeout: int = 10000) -> "OperatorWorkbench": + def upload_and_open( + self, file_path: str, case_id: str, timeout: int = UPLOAD_ANALYSIS_TIMEOUT_MS + ) -> "OperatorWorkbench": """Upload an image and wait until its new case is queued and the workbench opens.""" self.upload_submission(file_path) self.confirm_upload() diff --git a/tests/operator_gui/test_browser_smoke.py b/tests/operator_gui/test_browser_smoke.py index e74ddc4..d232f10 100644 --- a/tests/operator_gui/test_browser_smoke.py +++ b/tests/operator_gui/test_browser_smoke.py @@ -3,7 +3,7 @@ from __future__ import annotations import pytest from .pages import OperatorWorkbench -from .pages.workbench_page import SUGGESTED_QUERY_LOADED_STATUS +from .pages.workbench_page import SUGGESTED_QUERY_LOADED_STATUS, UPLOAD_ANALYSIS_TIMEOUT_MS def _bootstrap_payload(): @@ -104,8 +104,8 @@ def test_browser_uploads_image_and_selects_new_submission(operator_server, opera assert workbench.submission_image_name.inner_text() == "smoke upload.svg" workbench.confirm_upload() - workbench.wait_for_case("smoke-upload", state="attached", timeout=10000) - workbench.workbench_view.wait_for(state="visible", timeout=10000) + workbench.wait_for_case("smoke-upload", state="attached", timeout=UPLOAD_ANALYSIS_TIMEOUT_MS) + workbench.workbench_view.wait_for(state="visible", timeout=UPLOAD_ANALYSIS_TIMEOUT_MS) assert (operator_server.image_root / "images" / "smoke-upload.svg").exists() assert (