-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ADO-2220-agent-assistant-poc
* master: fix(editor): Fix type errors for various utils files (no-changelog) (#9480) fix(editor): Fix design system typecheck errors (no-changelog) (#9447) fix(core): Fix 431 for large dynamic node parameters (#9384) fix(editor): Fix project settings layout (#9475) refactor: Fix type issues for parameter input components (#9449) fix(editor): Fix rundata type errors (no-changelog) (#9443) refactor(editor): Refactor code completions mixins to composables (no-changelog) (#9459) fix(Telegram Node): Revert typo introduced in #8437 (no-changelog) (#9472) refactor(editor): Fix type errors in ResourcesListLayout.vue (no-changelog) (#9461) feat(Telegram Node): Add support for local bot api server (#8437) fix: Init license properly with multi main (no-changelog) (#9467)
- Loading branch information
Showing
118 changed files
with
2,906 additions
and
1,849 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
packages/cli/test/integration/controllers/dynamic-node-parameters.controller.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import type { SuperTest, Test } from 'supertest'; | ||
import { createOwner } from '../shared/db/users'; | ||
import { setupTestServer } from '../shared/utils'; | ||
import * as AdditionalData from '@/WorkflowExecuteAdditionalData'; | ||
import type { | ||
INodeListSearchResult, | ||
IWorkflowExecuteAdditionalData, | ||
ResourceMapperFields, | ||
} from 'n8n-workflow'; | ||
import { mock } from 'jest-mock-extended'; | ||
import { DynamicNodeParametersService } from '@/services/dynamicNodeParameters.service'; | ||
|
||
describe('DynamicNodeParametersController', () => { | ||
const testServer = setupTestServer({ endpointGroups: ['dynamic-node-parameters'] }); | ||
let ownerAgent: SuperTest<Test>; | ||
|
||
beforeAll(async () => { | ||
const owner = await createOwner(); | ||
ownerAgent = testServer.authAgentFor(owner); | ||
}); | ||
|
||
const commonRequestParams = { | ||
credentials: {}, | ||
currentNodeParameters: {}, | ||
nodeTypeAndVersion: {}, | ||
path: 'path', | ||
methodName: 'methodName', | ||
}; | ||
|
||
describe('POST /dynamic-node-parameters/options', () => { | ||
jest.spyOn(AdditionalData, 'getBase').mockResolvedValue(mock<IWorkflowExecuteAdditionalData>()); | ||
|
||
it('should take params via body', async () => { | ||
jest | ||
.spyOn(DynamicNodeParametersService.prototype, 'getOptionsViaMethodName') | ||
.mockResolvedValue([]); | ||
|
||
await ownerAgent | ||
.post('/dynamic-node-parameters/options') | ||
.send({ | ||
...commonRequestParams, | ||
loadOptions: 'loadOptions', | ||
}) | ||
.expect(200); | ||
}); | ||
}); | ||
|
||
describe('POST /dynamic-node-parameters/resource-locator-results', () => { | ||
it('should take params via body', async () => { | ||
jest | ||
.spyOn(DynamicNodeParametersService.prototype, 'getResourceLocatorResults') | ||
.mockResolvedValue(mock<INodeListSearchResult>()); | ||
|
||
await ownerAgent | ||
.post('/dynamic-node-parameters/resource-locator-results') | ||
.send({ | ||
...commonRequestParams, | ||
filter: 'filter', | ||
paginationToken: 'paginationToken', | ||
}) | ||
.expect(200); | ||
}); | ||
}); | ||
|
||
describe('POST /dynamic-node-parameters/resource-mapper-fields', () => { | ||
it('should take params via body', async () => { | ||
jest | ||
.spyOn(DynamicNodeParametersService.prototype, 'getResourceMappingFields') | ||
.mockResolvedValue(mock<ResourceMapperFields>()); | ||
|
||
await ownerAgent | ||
.post('/dynamic-node-parameters/resource-mapper-fields') | ||
.send({ | ||
...commonRequestParams, | ||
loadOptions: 'loadOptions', | ||
}) | ||
.expect(200); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.