simplify e2e test iframe check

This commit is contained in:
rash
2026-02-22 19:10:11 +01:00
parent b1b2a688a8
commit d9b691690e
2 changed files with 1 additions and 27 deletions

View File

@@ -874,14 +874,7 @@ def widget_page(page):
"""Close the checkout iframe."""
close_btn = self.page.locator('.pretix-widget-frame-close button')
close_btn.click()
# Wait for iframe to close
self.page.wait_for_function(
"""() => {
const frame = document.querySelector('.pretix-widget-frame-shown');
return !frame || !frame.classList.contains('pretix-widget-frame-shown');
}""",
timeout=5000
)
self.page.locator('.pretix-widget-frame-shown').wait_for(state='detached', timeout=5000)
return self
def expand_variations(self, item_name: str):