Skip to content

Commit 8d787e9

Browse files
FFQAHwangclaude
andcommitted
fix: CI 오버레이 팝업 처리 강화 (끈질기게 재시도)
- dismiss_overlay_if_exists: 최대 5회, 각 시도당 2초 대기 - force=True로 클릭 (다른 요소가 겹쳐있어도 클릭) - 각 Page Object goto_*에서 공통 메서드 사용 (중복 제거) - CI에서 오버레이 지연 렌더링 시에도 확실히 닫도록 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c1d4a4e commit 8d787e9

4 files changed

Lines changed: 18 additions & 33 deletions

File tree

fastfive-web-e2e/pages/base_page.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,23 @@ def close_today_popup_if_exists(self):
4444
except Exception:
4545
pass
4646

47-
def dismiss_overlay_if_exists(self, max_attempts: int = 3):
48-
"""전면 오버레이 팝업(tw-bg-v2-trans-black) 반복 닫기"""
49-
for _ in range(max_attempts):
47+
def dismiss_overlay_if_exists(self, max_attempts: int = 5, wait_each: int = 2000):
48+
"""전면 오버레이 팝업(tw-bg-v2-trans-black) 반복 닫기.
49+
50+
CI에서 로그인 후 오버레이가 지연 렌더링될 수 있으므로 재시도.
51+
"""
52+
overlay_selector = "div.tw-fixed.tw-cursor-pointer.tw-bg-v2-trans-black-70, div.tw-fixed.tw-cursor-pointer"
53+
for attempt in range(max_attempts):
5054
try:
51-
overlay = self.page.locator("div.tw-fixed.tw-cursor-pointer")
52-
overlay.wait_for(state="visible", timeout=2000)
53-
overlay.click()
55+
overlay = self.page.locator(overlay_selector).first
56+
overlay.wait_for(state="visible", timeout=wait_each)
57+
overlay.click(force=True)
5458
self.page.wait_for_timeout(500)
59+
print(f"[오버레이] 닫기 성공 ({attempt + 1}회)")
5560
except Exception:
61+
# 오버레이가 없으면 종료
62+
if attempt == 0:
63+
return
5664
break
5765

5866
# ── API 응답 수집 ──

fastfive-web-e2e/pages/community_page.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,7 @@ def __init__(self, page: Page):
1010

1111
def goto_community(self):
1212
"""커뮤니티 메뉴 클릭"""
13-
# 전면 오버레이 팝업 닫기
14-
try:
15-
overlay = self.page.locator("div.tw-fixed.tw-cursor-pointer")
16-
overlay.wait_for(state="visible", timeout=3000)
17-
overlay.click()
18-
self.page.wait_for_timeout(500)
19-
except Exception:
20-
pass
21-
13+
self.dismiss_overlay_if_exists()
2214
self.page.locator('a[href="/community"]').first.click()
2315
self.page.locator("div[class*='FeedPreview_container']").first.wait_for(
2416
state="visible", timeout=10_000
@@ -50,6 +42,7 @@ def click_first_feed(self):
5042

5143
def goto_benefits(self):
5244
"""제휴 혜택 메뉴 클릭"""
45+
self.dismiss_overlay_if_exists()
5346
self.page.locator('a[href="/benefits"]').first.click()
5447
self.page.locator("#app > div:first-child > div:nth-child(3)").wait_for(
5548
state="visible", timeout=10_000

fastfive-web-e2e/pages/request_page.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,7 @@ def __init__(self, page: Page):
1010

1111
def goto_request(self):
1212
"""1:1 문의하기 버튼 클릭"""
13-
# 전면 오버레이 팝업 닫기
14-
try:
15-
overlay = self.page.locator("div.tw-fixed.tw-cursor-pointer")
16-
overlay.wait_for(state="visible", timeout=3000)
17-
overlay.click()
18-
self.page.wait_for_timeout(500)
19-
except Exception:
20-
pass
21-
13+
self.dismiss_overlay_if_exists()
2214
btn = self.page.locator("button", has_text="1:1 문의하기")
2315
btn.scroll_into_view_if_needed()
2416
btn.click()

fastfive-web-e2e/pages/reservation_page.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,7 @@ def _dismiss_confirm_popups(self, max_attempts: int = 5):
2929

3030
def goto_reservation(self):
3131
"""예약하기 메뉴 클릭"""
32-
# 전면 오버레이 팝업 닫기 (배너/공지 등)
33-
try:
34-
overlay = self.page.locator("div.tw-fixed.tw-cursor-pointer")
35-
overlay.wait_for(state="visible", timeout=3000)
36-
overlay.click()
37-
self.page.wait_for_timeout(500)
38-
except Exception:
39-
pass
40-
32+
self.dismiss_overlay_if_exists()
4133
menu_btn = self.page.locator(
4234
'#app >> div >> a:has(span)', has_text="예약"
4335
).first

0 commit comments

Comments
 (0)