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 3 commits into
Conversation
e3a1a96 to
5728e28
Compare
This comment was marked as outdated.
This comment was marked as outdated.
22cba22 to
02eef70
Compare
…bility of multiple target tests
02eef70 to
b351f83
Compare
AI Code Review
What was reviewed
Skipped (out of scope): All CI checks: could not fetch — Findings
|
…ed-state assertions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Pull request type
Test related change (New E2E test, test automation, etc.)
Description
Fixes intermittent nightly failures in
video-player-webandaccessibility-helper-webE2E tests. Both share the same class of bug: actions fired before Mendix finishes re-rendering the DOM.video-player-web — 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.accessibility-helper-web — one root cause, three affected tests:
actionButton2— first click triggers a Mendix re-render that detaches the button from the DOM; second click immediately after races against re-attach and times out after 10s. AddedwaitForMendixAppbetween the two clicks in all threewith multiple targetstests that used this pattern.