diff --git a/packages/frontend/editor-ui/src/components/NodeCredentials.test.ts b/packages/frontend/editor-ui/src/components/NodeCredentials.test.ts index 831b175975..6c6526ea5f 100644 --- a/packages/frontend/editor-ui/src/components/NodeCredentials.test.ts +++ b/packages/frontend/editor-ui/src/components/NodeCredentials.test.ts @@ -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 () => { diff --git a/packages/frontend/editor-ui/src/components/NodeCredentials.vue b/packages/frontend/editor-ui/src/components/NodeCredentials.vue index f546d1cce8..1b4a6a77af 100644 --- a/packages/frontend/editor-ui/src/components/NodeCredentials.vue +++ b/packages/frontend/editor-ui/src/components/NodeCredentials.vue @@ -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) {