bito-code-review[bot] commented on code in PR #37880:
URL: https://github.com/apache/superset/pull/37880#discussion_r2791934103
##########
superset-frontend/src/explore/components/controls/OptionControls/OptionControls.test.tsx:
##########
@@ -101,15 +96,11 @@ test('triggers onMoveLabel on drop', async () => {
index={2}
label={<span>Label 2</span>}
/>
- ,
</>,
- { useDnd: true },
+ { useDndKit: true },
);
- await waitFor(() => {
- fireEvent.dragStart(screen.getByText('Label 1'));
- fireEvent.drop(screen.getByText('Label 2'));
- expect(defaultProps.onMoveLabel).toHaveBeenCalled();
- });
+ expect(await screen.findByText('Label 1')).toBeInTheDocument();
+ expect(await screen.findByText('Label 2')).toBeInTheDocument();
});
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Missing drag behavior test</b></div>
<div id="fix">
The new 'renders multiple labels' test only checks that components render,
but the removed 'triggers onMoveLabel on drop' test verified core drag behavior
by asserting onMoveLabel is called on drop. Per BITO.md adaptive_rules [6262],
tests should assert actual business logic, not just rendering. Drag
functionality is key to OptionControlLabel, so behavior testing should be
restored.
</div>
</div>
<small><i>Code Review Run #1a0248</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]