bito-code-review[bot] commented on code in PR #37975:
URL: https://github.com/apache/superset/pull/37975#discussion_r2808580754
##########
superset-frontend/src/components/Chart/DrillDetail/DrillDetailPane.test.tsx:
##########
@@ -189,6 +189,22 @@ test('should render the error', async () => {
expect(screen.getByText('Error: Something went wrong')).toBeInTheDocument();
});
+test('should only allow page size of 50 in pagination', async () => {
+ fetchWithData();
+ await waitForRender();
+ // The page size selector should only show 50 as an option
+ const pageSizeSelector = document.querySelector(
+ '.ant-pagination-options .ant-select-selection-item',
+ );
+ expect(pageSizeSelector).toBeTruthy();
+ expect(pageSizeSelector!.textContent).toContain('50');
+ // Ensure smaller page size options (5, 15, 25) are not available
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Test logic error causing failure</b></div>
<div id="fix">
The test now unconditionally expects the pageSizeSelector to be present, but
with the mock data (total_count: 3), pagination is hidden due to
hideOnSinglePage: true in the Table component. This will cause the test to fail
when pagination is not rendered. If the intent is to test pagination behavior,
update the mock to include more data; otherwise, restore the conditional check.
</div>
</div>
<small><i>Code Review Run #6aa573</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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]