bito-code-review[bot] commented on PR #43150:
URL: https://github.com/apache/superset/pull/43150#issuecomment-5289748283
<!-- Bito Reply -->
The flagged issue is correct. The `RenderErrorBoundary` component renders a
`div` with `data-test="render-error"` (line 266), but the tests attempt to
query it using `screen.queryByTestId('render-error')` (lines 301 and 312),
which looks for a `data-testid` attribute. Because of this mismatch, the
assertion will always return null, failing to detect actual render errors.
To resolve this, you should update the `RenderErrorBoundary` to use
`data-testid` instead of `data-test` to match the testing library's expectation.
Would you like me to implement this fix and check the rest of the comments
on this PR?
**superset-frontend/plugins/plugin-chart-table/test/DataTable/DataTable.test.tsx**
```
render() {
if (this.state.hasError) {
return <div data-testid="render-error">Render error</div>;
}
return this.props.children;
}
```
--
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]