fix(editor): Case-sensitive credential search in NodeCredentials component (#17564)

This commit is contained in:
Ricardo Espinoza
2025-07-28 09:14:11 -04:00
committed by GitHub
parent cebb1f6566
commit 3ce9a998ae
2 changed files with 10 additions and 1 deletions

View File

@@ -232,6 +232,15 @@ describe('NodeCredentials', () => {
expect(screen.queryByText('OpenAi account')).not.toBeInTheDocument();
expect(screen.queryByText('Test OpenAi account')).toBeInTheDocument();
await userEvent.keyboard('{Escape}');
await userEvent.click(credentialsSelect);
await userEvent.type(credentialSearch, 'Test');
expect(screen.queryByText('OpenAi account')).not.toBeInTheDocument();
expect(screen.queryByText('Test OpenAi account')).toBeInTheDocument();
});
it('should open the new credential modal when clicked', async () => {

View File

@@ -500,7 +500,7 @@ function setFilter(newFilter = '') {
}
function matches(needle: string, haystack: string) {
return haystack.toLocaleLowerCase().includes(needle);
return haystack.toLocaleLowerCase().includes(needle.toLocaleLowerCase());
}
async function onClickCreateCredential(type: ICredentialType | INodeCredentialDescription) {