test(video-player): wait for widget after tab clicks, fix poster race#2232
test(video-player): wait for widget after tab clicks, fix poster race#2232samuelreichert wants to merge 1 commit into
Conversation
e3a1a96 to
5728e28
Compare
AI Code Review
What was reviewed
Skipped (out of scope): CI checks were unavailable during this review (command required manual approval). No failing checks were observed based on available information. Findings
|
Pull request type
Test related change (New E2E test, test automation, etc.)
Description
Fixes intermittent nightly failures in
video-player-webE2E tests introduced after thee2e-reliability-and-performancemerge.Three root causes:
Tab page tests — after
.click()on a tab, tests assertedtoBeVisible()on iframes immediately. Mendix renders tab content asynchronously; the fixture'swaitForMendixApponly patchespage.goto, not tab navigation clicks. AddedwaitForWidgetafter each tab click.Aspect ratio test — same tab-click race:
boundingBox()called on elements in tabs 2 and 3 without waiting for them to be present in the DOM.Poster screenshot —
page.evaluatewith a standalonenew Image()resolves when the image loads into memory, not when the<video>element has painted the poster frame. Switched tovideoLocator.evaluate(el => ...)to tie the wait to the actual element. Also addedscrollIntoViewIfNeededso the widget is in viewport before screenshotting.