bito-code-review[bot] commented on PR #42596:
URL: https://github.com/apache/superset/pull/42596#issuecomment-5125078243
<!-- Bito Reply -->
The flagged issue is correct. The test fails because the current
implementation sorts options lexicographically using `localeCompare` on the
formatted labels, while the test expects numeric sorting. To resolve this, the
`propertyComparator` used by `SelectFilterPlugin` needs to be updated to handle
numeric values correctly when the data type is numeric.
Since I do not have access to the production code (`SelectFilterPlugin.tsx`)
to implement the fix, I recommend updating the comparator logic to check if the
values are numeric before applying `localeCompare`.
Regarding other comments on this PR, there are no additional comments in the
provided review data. Would you like me to assist with any other aspects of
this PR?
**superset-frontend/src/filters/components/Select/SelectFilterPlugin.test.tsx**
```
// Options should appear in ascending numeric order (2, 10, 100), not
// ascending lexicographic order of their formatted labels (10, 100, 2).
const options = screen.getAllByRole('option');
expect(options[0]).toHaveTextContent('2');
expect(options[1]).toHaveTextContent('10');
expect(options[2]).toHaveTextContent('100');
```
--
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]