bito-code-review[bot] commented on PR #41438:
URL: https://github.com/apache/superset/pull/41438#issuecomment-5182528987
<!-- Bito Reply -->
The flagged issue is correct. Because the resize-stop handler updates the
layout asynchronously via React state, reading the bounding box immediately
after `mouse.up()` can capture the pre-resize dimensions. To resolve this, you
should wait for the component's geometry to update before taking the final
measurement.
In your test, you can replace the immediate measurement with a polling
assertion or a wait condition that verifies the height has changed, ensuring
the DOM has settled after the resize event.
**superset-frontend/playwright/pages/DashboardPage.ts**
```
// Instead of immediate measurement:
await expect(async () => {
const { heightAfter } = await dashboard.getComponentDimensions(editor);
expect(heightAfter).toBeGreaterThan(heightBefore);
}).toPass();
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]