-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
144 changed files
with
9,121 additions
and
2,031 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ jobs: | |
|
||
- uses: pnpm/[email protected] | ||
with: | ||
version: 7.18.1 | ||
version: 7.27.0 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
|
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 |
---|---|---|
@@ -1,13 +1,18 @@ | ||
## [0.214.3](https://github.com/n8n-io/n8n/compare/[email protected]@0.214.3) (2023-02-09) | ||
|
||
* **editor:** Prevent creation of input connections for nodes without input slot ([#5425](https://github.com/n8n-io/n8n/issues/5425)) ([b57ec1d](https://github.com/n8n-io/n8n/commit/b57ec1d6abbae9e23ae5f473d70674aa14701bce)) | ||
|
||
|
||
## [0.214.2](https://github.com/n8n-io/n8n/compare/[email protected]@0.214.2) (2023-02-06) | ||
|
||
|
||
### Bug Fixes | ||
|
||
|
||
* **editor:** Correctly show OAuth reconnect button ([#5384](https://github.com/n8n-io/n8n/issues/5384)) ([6482688](https://github.com/n8n-io/n8n/commit/6482688ee04621744451c67f6d6e3292e925bb8d)) | ||
* **editor:** Fix resolvable highlighting for HTML editor ([#5379](https://github.com/n8n-io/n8n/issues/5379)) ([31130d5](https://github.com/n8n-io/n8n/commit/31130d5257f253d9be21fe62d668231e27ecbd52)) | ||
|
||
|
||
|
||
## [0.214.1](https://github.com/n8n-io/n8n/compare/[email protected]@0.214.1) (2023-02-06) | ||
|
||
|
||
|
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 |
---|---|---|
|
@@ -4,9 +4,13 @@ export const DEFAULT_USER_EMAIL = '[email protected]'; | |
export const DEFAULT_USER_PASSWORD = 'CypressTest123'; | ||
|
||
export const MANUAL_TRIGGER_NODE_NAME = 'Manual Trigger'; | ||
export const MANUAL_TRIGGER_NODE_DISPLAY_NAME = 'When clicking "Execute Workflow"'; | ||
export const SCHEDULE_TRIGGER_NODE_NAME = 'Schedule Trigger'; | ||
export const CODE_NODE_NAME = 'Code'; | ||
export const SET_NODE_NAME = 'Set'; | ||
export const IF_NODE_NAME = 'IF'; | ||
export const MERGE_NODE_NAME = 'Merge'; | ||
export const SWITCH_NODE_NAME = 'Switch'; | ||
export const GMAIL_NODE_NAME = 'Gmail'; | ||
export const TRELLO_NODE_NAME = 'Trello'; | ||
export const NOTION_NODE_NAME = 'Notion'; | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
import { WorkflowPage, NDV } from '../pages'; | ||
|
||
const wf = new WorkflowPage(); | ||
const ndv = new NDV(); | ||
|
||
describe('Data transformation expressions', () => { | ||
beforeEach(() => { | ||
cy.resetAll(); | ||
cy.skipSetup(); | ||
wf.actions.visit(); | ||
cy.waitForLoad(); | ||
|
||
cy.window() | ||
// @ts-ignore | ||
.then(win => win.onBeforeUnload && win.removeEventListener('beforeunload', win.onBeforeUnload)); | ||
}); | ||
|
||
it('$json + native string methods', () => { | ||
wf.actions.addInitialNodeToCanvas('Schedule Trigger', { keepNdvOpen: true }); | ||
ndv.actions.setPinnedData([{ myStr: 'Monday' }]); | ||
ndv.actions.close(); | ||
addSet(); | ||
|
||
const input = '{{$json.myStr.toLowerCase() + " is " + "today".toUpperCase()'; | ||
const output = 'monday is TODAY'; | ||
|
||
ndv.getters.inlineExpressionEditorInput().clear().type(input); | ||
ndv.actions.execute(); | ||
ndv.getters.outputDataContainer().should('be.visible').contains(output); | ||
}); | ||
|
||
it('$json + n8n string methods', () => { | ||
wf.actions.addInitialNodeToCanvas('Schedule Trigger', { keepNdvOpen: true }); | ||
ndv.actions.setPinnedData([{ myStr: '[email protected] is an email' }]); | ||
ndv.actions.close(); | ||
addSet(); | ||
|
||
const input = '{{$json.myStr.extractEmail() + " " + $json.myStr.isEmpty()'; | ||
const output = '[email protected] false'; | ||
|
||
ndv.getters.inlineExpressionEditorInput().clear().type(input); | ||
ndv.actions.execute(); | ||
ndv.getters.outputDataContainer().should('be.visible').contains(output); | ||
}); | ||
|
||
it('$json + native numeric methods', () => { | ||
wf.actions.addInitialNodeToCanvas('Schedule Trigger', { keepNdvOpen: true }); | ||
ndv.actions.setPinnedData([{ myNum: 9.123 }]); | ||
ndv.actions.close(); | ||
addSet(); | ||
|
||
const input = '{{$json.myNum.toPrecision(3)'; | ||
const output = '9.12'; | ||
|
||
ndv.getters.inlineExpressionEditorInput().clear().type(input); | ||
ndv.actions.execute(); | ||
ndv.getters.outputDataContainer().should('be.visible').contains(output); | ||
}); | ||
|
||
it('$json + n8n numeric methods', () => { | ||
wf.actions.addInitialNodeToCanvas('Schedule Trigger', { keepNdvOpen: true }); | ||
ndv.actions.setPinnedData([{ myStr: '[email protected] is an email' }]); | ||
ndv.actions.close(); | ||
addSet(); | ||
|
||
const input = '{{$json.myStr.extractEmail() + " " + $json.myStr.isEmpty()'; | ||
const output = '[email protected] false'; | ||
|
||
ndv.getters.inlineExpressionEditorInput().clear().type(input); | ||
ndv.actions.execute(); | ||
ndv.getters.outputDataContainer().should('be.visible').contains(output); | ||
}); | ||
|
||
it('$json + native array methods', () => { | ||
wf.actions.addInitialNodeToCanvas('Schedule Trigger', { keepNdvOpen: true }); | ||
ndv.actions.setPinnedData([{ myArr: [1, 2, 3] }]); | ||
ndv.actions.close(); | ||
addSet(); | ||
|
||
const input = '{{$json.myArr.includes(1) + " " + $json.myArr.at(2)'; | ||
const output = 'true 3'; | ||
|
||
ndv.getters.inlineExpressionEditorInput().clear().type(input); | ||
ndv.actions.execute(); | ||
ndv.getters.outputDataContainer().should('be.visible').contains(output); | ||
}); | ||
|
||
it('$json + n8n array methods', () => { | ||
wf.actions.addInitialNodeToCanvas('Schedule Trigger', { keepNdvOpen: true }); | ||
ndv.actions.setPinnedData([{ myArr: [1, 2, 3] }]); | ||
ndv.actions.close(); | ||
addSet(); | ||
|
||
const input = '{{$json.myArr.first() + " " + $json.myArr.last()'; | ||
const output = '1 3'; | ||
|
||
ndv.getters.inlineExpressionEditorInput().clear().type(input); | ||
ndv.actions.execute(); | ||
ndv.getters.outputDataContainer().should('be.visible').contains(output); | ||
}); | ||
}); | ||
|
||
// ---------------------------------- | ||
// utils | ||
// ---------------------------------- | ||
|
||
const addSet = () => { | ||
wf.actions.addNodeToCanvas('Set', true, true); | ||
ndv.getters.parameterInput('keepOnlySet').find('div[role=switch]').click(); // shorten output | ||
cy.get('input[placeholder="Add Value"]').click(); | ||
cy.get('span').contains('String').click(); | ||
ndv.getters.nthParam(3).contains('Expression').invoke('show').click(); // Values to Set > String > Value | ||
}; |
Oops, something went wrong.