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):

View File

@@ -39,30 +39,11 @@ class TestEventSeriesJourney:
iframe.locator('text=/45\\.00/').first
).to_be_visible(timeout=15000)
# Close iframe and go back to list view
widget_page.close_iframe()
page.locator('a[rel="back"]').click()
# widget_page.goto(
# live_server_url,
# organizer.slug,
# event.slug,
# **{'list-type': 'list'}
# )
page.locator('.pretix-widget-event-list-entry').nth(1).click()
# expect(
# page.locator('.pretix-widget-item:has-text("Concert Ticket")')
# ).to_be_visible(timeout=15000)
# widget_page.select_item_quantity('Concert Ticket', 1)
# Dispatch change event so the widget detects items are selected
# (calcItemsSelected listens for 'change', not 'input')
# page.locator(
# '.pretix-widget-item:has-text("Concert Ticket") '
# 'input[type=number]'
# ).dispatch_event('change')
page.pause()
widget_page.click_buy_button()
iframe = widget_page.wait_for_iframe_checkout()