sadpandajoe commented on code in PR #45591:
URL: https://github.com/apache/superset/pull/45591#discussion_r4356540387
##########
superset-frontend/packages/superset-ui-core/src/components/Select/AsyncSelect.test.tsx:
##########
@@ -1681,6 +1681,42 @@ test('onChange is called with the value property when
pasting an option that was
);
});
+test('pasting matches the title of options with a React label', async () => {
Review Comment:
This test never reaches the remote branch of `getPastedTextValue`: both
users are in the first page and `totalCount` equals `data.length`, so
`allValuesLoaded` is true and the match comes from the already-loaded options.
If the `findByText(data)` change on the fetched page were reverted, this test
and the existing string-label remote paste test would both still pass, while
pasting the name of a user who hasn't been loaded yet would silently select
nothing.
Could you add a case where the initial page excludes Bob (with `totalCount`
larger than the page) and the pasted text is `Bob Jones`, asserting `onChange`
receives value 2?
--
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]