mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-30 16:26:59 +02:00
fix(editor): Load credentials when opening node credential picker (#30463)
This commit is contained in:
parent
90b215939f
commit
cec8238b64
|
|
@ -220,6 +220,15 @@ describe('NodeCredentials', () => {
|
|||
expect(screen.queryByText('OpenAi account')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('should refresh credentials from the server when mounted on an existing node', () => {
|
||||
ndvStore.activeNode = httpNode;
|
||||
credentialsStore.state.credentials = {};
|
||||
|
||||
renderComponent();
|
||||
|
||||
expect(credentialsStore.fetchAllCredentials).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should ignore managed credentials in the dropdown if active node is the HTTP node', async () => {
|
||||
ndvStore.activeNode = httpNode;
|
||||
credentialsStore.state.credentials = {
|
||||
|
|
|
|||
|
|
@ -316,6 +316,10 @@ onMounted(() => {
|
|||
|
||||
ndvEventBus.on('credential.createNew', onCreateAndAssignNewCredential);
|
||||
|
||||
void credentialsStore.fetchAllCredentials({
|
||||
projectId: projectsStore.currentProject?.id,
|
||||
});
|
||||
|
||||
void aiGateway.fetchConfig();
|
||||
|
||||
// Clear stale AI Gateway managed credentials if the feature is disabled
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user