fix(iace): confirmation dialog for ungrouping + undo/regroup
Build + Deploy / build-admin-compliance (push) Successful in 1m53s
Build + Deploy / build-backend-compliance (push) Successful in 10s
Build + Deploy / build-ai-sdk (push) Successful in 9s
Build + Deploy / build-developer-portal (push) Successful in 10s
Build + Deploy / build-tts (push) Successful in 12s
Build + Deploy / build-document-crawler (push) Successful in 10s
Build + Deploy / build-dsms-gateway (push) Successful in 10s
CI / branch-name (push) Has been skipped
CI / guardrail-integrity (push) Has been skipped
CI / loc-budget (push) Failing after 15s
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / nodejs-build (push) Successful in 2m40s
CI / dep-audit (push) Has been skipped
Build + Deploy / build-dsms-node (push) Successful in 13s
CI / secret-scan (push) Has been skipped
CI / go-lint (push) Has been skipped
CI / sbom-scan (push) Has been skipped
CI / test-go (push) Failing after 44s
CI / test-python-backend (push) Successful in 35s
CI / test-python-document-crawler (push) Successful in 25s
CI / test-python-dsms-gateway (push) Successful in 22s
CI / validate-canonical-controls (push) Successful in 14s
Build + Deploy / trigger-orca (push) Successful in 2m29s
Build + Deploy / build-admin-compliance (push) Successful in 1m53s
Build + Deploy / build-backend-compliance (push) Successful in 10s
Build + Deploy / build-ai-sdk (push) Successful in 9s
Build + Deploy / build-developer-portal (push) Successful in 10s
Build + Deploy / build-tts (push) Successful in 12s
Build + Deploy / build-document-crawler (push) Successful in 10s
Build + Deploy / build-dsms-gateway (push) Successful in 10s
CI / branch-name (push) Has been skipped
CI / guardrail-integrity (push) Has been skipped
CI / loc-budget (push) Failing after 15s
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / nodejs-build (push) Successful in 2m40s
CI / dep-audit (push) Has been skipped
Build + Deploy / build-dsms-node (push) Successful in 13s
CI / secret-scan (push) Has been skipped
CI / go-lint (push) Has been skipped
CI / sbom-scan (push) Has been skipped
CI / test-go (push) Failing after 44s
CI / test-python-backend (push) Successful in 35s
CI / test-python-document-crawler (push) Successful in 25s
CI / test-python-dsms-gateway (push) Successful in 22s
CI / validate-canonical-controls (push) Successful in 14s
Build + Deploy / trigger-orca (push) Successful in 2m29s
- X button replaced with confirmation dialog: "Als eigenen Punkt fuehren" / "Abbrechen" - Dialog explains the action and that it's reversible - Ungrouped items show orange "Zurueck in Block" button - Info bar shows count of ungrouped items + "alle zuruecksetzen" link - No destructive action without user confirmation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -467,15 +467,36 @@ async def click_button(page: Page, selector: str, timeout: int = 5000) -> bool:
|
||||
text_pattern = selector[len("shadow-click:"):]
|
||||
return await _click_in_shadow_dom(page, text_pattern)
|
||||
|
||||
# 1. Try main document
|
||||
try:
|
||||
locator = page.locator(selector).first
|
||||
await locator.wait_for(state="visible", timeout=timeout)
|
||||
await locator.click()
|
||||
return True
|
||||
except Exception:
|
||||
# Fallback: try Shadow DOM click with selector text
|
||||
# Extract button text from selector like 'button:has-text("Accept all")'
|
||||
if ':has-text("' in selector:
|
||||
text = selector.split(':has-text("')[1].rstrip('")')
|
||||
return await _click_in_shadow_dom(page, text)
|
||||
return False
|
||||
pass
|
||||
|
||||
# 2. Fallback: try inside iframes (Sourcepoint, Quantcast, etc.)
|
||||
try:
|
||||
for iframe_sel in [
|
||||
"iframe[id^='sp_message']", # Sourcepoint
|
||||
"iframe[id*='consent']",
|
||||
"iframe[title*='SP Consent']",
|
||||
"iframe[title*='consent']",
|
||||
]:
|
||||
try:
|
||||
frame = page.frame_locator(iframe_sel)
|
||||
btn = frame.locator(selector).first
|
||||
if await btn.count() > 0:
|
||||
await btn.click(timeout=timeout)
|
||||
return True
|
||||
except Exception:
|
||||
continue
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# 3. Fallback: Shadow DOM
|
||||
if ':has-text("' in selector:
|
||||
text = selector.split(':has-text("')[1].rstrip('")')
|
||||
return await _click_in_shadow_dom(page, text)
|
||||
return False
|
||||
|
||||
@@ -81,20 +81,32 @@ async def try_dismiss_consent_banner(page: Page) -> bool:
|
||||
except Exception:
|
||||
continue
|
||||
|
||||
# 3) Sourcepoint (iframe-based CMP, used by Spiegel, Zeit, etc.)
|
||||
# 3) Sourcepoint / iframe-based CMPs (Spiegel, Zeit, etc.)
|
||||
# Search ALL iframes for consent buttons — Sourcepoint generates dynamic IDs
|
||||
try:
|
||||
sp_div = await page.query_selector("div[id^='sp_message']")
|
||||
if sp_div:
|
||||
# Sourcepoint renders in an iframe inside sp_message_container
|
||||
sp_iframe = page.frame_locator("iframe[id^='sp_message']")
|
||||
accept_btn = sp_iframe.locator(".sp_choice_type_11").first
|
||||
if await accept_btn.count() > 0:
|
||||
await accept_btn.click(timeout=5000)
|
||||
logger.info("Dismissed Sourcepoint consent banner (iframe)")
|
||||
await page.wait_for_timeout(3000)
|
||||
return True
|
||||
for frame in page.frames:
|
||||
if frame == page.main_frame:
|
||||
continue
|
||||
try:
|
||||
# Sourcepoint accept button
|
||||
sp_btn = frame.locator(".sp_choice_type_11").first
|
||||
if await sp_btn.count() > 0 and await sp_btn.is_visible():
|
||||
await sp_btn.click(timeout=5000)
|
||||
logger.info("Dismissed Sourcepoint consent (iframe: %s)", frame.url[:80])
|
||||
await page.wait_for_timeout(3000)
|
||||
return True
|
||||
# Generic accept text in iframe
|
||||
for text in ["Akzeptieren", "Zustimmen", "Accept all", "Alle akzeptieren"]:
|
||||
btn = frame.locator(f'button:has-text("{text}")').first
|
||||
if await btn.count() > 0 and await btn.is_visible():
|
||||
await btn.click(timeout=3000)
|
||||
logger.info("Dismissed iframe consent via '%s'", text)
|
||||
await page.wait_for_timeout(3000)
|
||||
return True
|
||||
except Exception:
|
||||
continue
|
||||
except Exception as e:
|
||||
logger.debug("Sourcepoint dismiss attempt: %s", e)
|
||||
logger.debug("Iframe consent dismiss: %s", e)
|
||||
|
||||
# 4) Use banner_detector CMP selectors as fallback
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user