-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(editor): Restrict [empty]
in parameter input hint to zero-length string
#6003
Conversation
Great PR! Please pay attention to the following items before merging: Files matching
Files matching
Files matching
Files matching
Make sure to check off this list before asking for review. |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #6003 +/- ##
==========================================
+ Coverage 18.63% 19.42% +0.78%
==========================================
Files 2585 2591 +6
Lines 116483 117121 +638
Branches 18181 18389 +208
==========================================
+ Hits 21711 22750 +1039
+ Misses 94134 93706 -428
- Partials 638 665 +27 ☔ View full report in Codecov by Sentry. |
[empty]
in parameter input hint to zero-length string
✅ All Cypress E2E specs passed |
Pinia stores setup process WIP.
@mutdmour Unit tests for expression resolution here require a non-trivial setup, and I worry that the ratio of user value vs time spent on this PR is already way too low. Can we reduce this to the fix and revisit unit tests as tech debt? |
alright then let's leave it |
@mutdmour Can you please re-review? Retested at Workflow{
"name": "ADO-529",
"nodes": [
{
"parameters": {},
"id": "45de23e5-1261-4020-b949-4b58ca367b5a",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
340,
300
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $json.empty_string }}",
"operation": "isEmpty"
},
{
"value1": "={{ $json.one_whitespace }}",
"operation": "isEmpty"
},
{
"value1": "={{ $json.four_whitespaces }}",
"operation": "isEmpty"
},
{
"value1": "={{ $json.normal }}",
"operation": "isEmpty"
}
]
}
},
"id": "7be87064-3dc7-4a4b-8f10-246b597f2d30",
"name": "IF",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
620,
300
]
}
],
"pinData": {
"When clicking \"Execute Workflow\"": [
{
"json": {
"empty_string": "",
"one_whitespace": " ",
"four_whitespaces": " ",
"normal": "hello"
}
}
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {},
"versionId": "1352f44e-c5ca-46b9-b275-44336d6b9c89",
"id": "20",
"meta": {
"instanceId": "406f1bca875c48c0fa12bf65a32e67f001617a6df6d6fd6dd72bff9d20014812"
},
"tags": []
} |
|
cypress/e2e/14-mapping.cy.ts
Outdated
@@ -205,7 +205,7 @@ describe('Data mapping', () => { | |||
'have.text', | |||
`{{ $node['${SCHEDULE_TRIGGER_NODE_NAME}'].json.input[0].count }} {{ $node['${SCHEDULE_TRIGGER_NODE_NAME}'].json.input }}`, | |||
); | |||
ndv.getters.parameterExpressionPreview('value').should('include.text', '[empty]'); | |||
ndv.getters.parameterExpressionPreview('value').should('include.text', ' '); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe have.text
would be better here for this test
✅ All Cypress E2E specs passed |
✅ All Cypress E2E specs passed |
Got released with |
* master: feat(JotForm Trigger Node): Add support for hipaa-api.jotform.com (#6171) 🚀 Release 0.227.0 (#6167) fix(editor): Flag issues only on workflow activation (#6127) fix(editor): Faster reconnects for push (no-changelog) (#6164) fix: Log unhandled errors during license activation (no-changelog) (#6165) test: Address flaky setup e2e (no-changelog) (#6085) fix(core): Better errors for common status codes fix fix(core): Fix bug running addUserActivatedColumn migration on MariaDB (#6157) fix: Prevent invocations of 'GET /rest/license' from returning an error when ephemeral licenses are used (#6154) fix(editor): Restrict `[empty]` in parameter input hint to zero-length string (#6003) fix(core): Assign Unknown Error only if message or description not present in error fix(AWS S3 Node): Fix File upload, and add node tests (#6153) fix(core): Better error message in Webhook node when using the POST method feat(Microsoft Excel 365 Node): Overhaul fix(core): Remove SAML config metadataUrl if XML metadata is set directly (#6143) ci: Restore load options methods validation (no-changelog) (#6148) feat(core): Add notice to alert users a new version is available fix(core): Fix canceled execution status (#6142) ci: Expand ESLint to tests in BE packages (no-changelog) (#6147) fix(editor): Fix focus jumping when using chrome autofill (#6140)
…rce-mapper-ui-P2 * feature/resource-mapping-component: feat(JotForm Trigger Node): Add support for hipaa-api.jotform.com (#6171) 🚀 Release 0.227.0 (#6167) fix(editor): Flag issues only on workflow activation (#6127) fix(editor): Faster reconnects for push (no-changelog) (#6164) fix: Log unhandled errors during license activation (no-changelog) (#6165) test: Address flaky setup e2e (no-changelog) (#6085) fix(core): Better errors for common status codes fix fix(core): Fix bug running addUserActivatedColumn migration on MariaDB (#6157) fix: Prevent invocations of 'GET /rest/license' from returning an error when ephemeral licenses are used (#6154) fix(editor): Restrict `[empty]` in parameter input hint to zero-length string (#6003) fix(core): Assign Unknown Error only if message or description not present in error fix(AWS S3 Node): Fix File upload, and add node tests (#6153) fix(core): Better error message in Webhook node when using the POST method feat(Microsoft Excel 365 Node): Overhaul fix(core): Remove SAML config metadataUrl if XML metadata is set directly (#6143) ci: Restore load options methods validation (no-changelog) (#6148) feat(core): Add notice to alert users a new version is available fix(core): Fix canceled execution status (#6142) ci: Expand ESLint to tests in BE packages (no-changelog) (#6147) fix(editor): Fix focus jumping when using chrome autofill (#6140)
https://linear.app/n8n/issue/ADO-529/bug-expression-rendered-result-incorrectly-shows-[empty]-when-string
https://community.n8n.io/t/if-node-testing-for-empty-field-returns-that-field-is-not-empty/25154