Skip to content

Commit e5e4f16

Browse files
RicardoE105despairblue
authored andcommitted
fix(editor): Case-sensitive credential search in NodeCredentials component (#17564)
1 parent 9b37261 commit e5e4f16

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

packages/frontend/editor-ui/src/components/NodeCredentials.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,15 @@ describe('NodeCredentials', () => {
232232

233233
expect(screen.queryByText('OpenAi account')).not.toBeInTheDocument();
234234
expect(screen.queryByText('Test OpenAi account')).toBeInTheDocument();
235+
236+
await userEvent.keyboard('{Escape}');
237+
238+
await userEvent.click(credentialsSelect);
239+
240+
await userEvent.type(credentialSearch, 'Test');
241+
242+
expect(screen.queryByText('OpenAi account')).not.toBeInTheDocument();
243+
expect(screen.queryByText('Test OpenAi account')).toBeInTheDocument();
235244
});
236245

237246
it('should open the new credential modal when clicked', async () => {

packages/frontend/editor-ui/src/components/NodeCredentials.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ function setFilter(newFilter = '') {
500500
}
501501
502502
function matches(needle: string, haystack: string) {
503-
return haystack.toLocaleLowerCase().includes(needle);
503+
return haystack.toLocaleLowerCase().includes(needle.toLocaleLowerCase());
504504
}
505505
506506
async function onClickCreateCredential(type: ICredentialType | INodeCredentialDescription) {

0 commit comments

Comments
 (0)