PromucFlow_constructor/app/client/cypress/integration/Regression_TestSuite/ClientSideTests
Tolulope Adetula 0222cf6d19
fix: combineDynamicBindings function (#22600)
## Description
This PR fixes two issues with List Widget that inject values like
`currentItem` into the evaluation context.

1. The issue related to having an escape character or a new line \n in
the code for the widget. For example `{{(() => "123 \n 123")()}}` or
```
Date:
{{currentIndex}}
```

2. Where JS Code with text like `Returned:{{ currentItem.name === "Blue"
? "Yes": "No"}}` would always evaluate to `No`. This happens because the
text is converted into a function, and we need to inject some contexts
so that the eval can run without error. After conversion, we have
`{{((currentItem) => "Returned:" + currentItem.name === "Blue" ? "Yes":
"No")(Text1.currentItem)}}` , which, when passed to eval, comes out as
No

Fixes #14200
Fixes #15162 

## Type of change
- Bug fix (non-breaking change which fixes an issue)



## How Has This Been Tested?
- Manual
- Jest
- Cypress

### Test Plan
> Add Testsmith test cases links that relate to this PR

### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)


## Checklist:
### Dev activity
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
2023-04-26 23:58:17 +05:30
..
ActionExecution test: Cypress tests - Grouping logical it blocks - Part 2 (#22623) 2023-04-25 05:59:40 +05:30
AdminSettings test: Cypress - fix for ExplorerTests/Admin_settings_spec.js (#22686) 2023-04-25 03:23:36 +05:30
AppNavigation
AuditLogs test: handle login success & errors properly (#22524) 2023-04-19 15:20:54 +05:30
Autocomplete fix: showing undefined binding on / command dropdown instead of name for js objects (#22483) 2023-04-24 11:30:59 +05:30
Binding test: Cypress - Flaky test fix (#22130) 2023-04-18 14:43:28 +05:30
Branding test: handle login success & errors properly (#22524) 2023-04-19 15:20:54 +05:30
BugTests fix: added condition to store nav context if datasource already created on changing the page from ds routes (#22557) 2023-04-26 16:03:35 +00:00
CodeComment
DynamicHeight test: list widget bug and other regression bugs automation (#21563) 2023-04-24 08:07:48 +05:30
EmbedSettings
ExplorerTests test: Cypress - fix for ExplorerTests/Admin_settings_spec.js (#22686) 2023-04-25 03:23:36 +05:30
FormNativeToRawTests
Git
Github test: handle login success & errors properly (#22524) 2023-04-19 15:20:54 +05:30
Google test: handle login success & errors properly (#22524) 2023-04-19 15:20:54 +05:30
IDE fix: Maintain focus on editor when Escape is pressed with autocomplete menu open (#22164) 2023-04-14 12:11:47 +05:30
JSLibrary
JSObject
Linting
MobileResponsiveTests test: Tests for auto conversion and mobile viewport (#21931) 2023-04-14 17:03:50 +05:30
Onboarding
OtherUIFeatures feat: Open doc links in a new tab (#22613) 2023-04-26 16:03:13 +00:00
PeekOverlay test: Cypress tests - Grouping logical it blocks - Part 2 (#22623) 2023-04-25 05:59:40 +05:30
PropertyPane test: Cypress tests - Grouping logical it blocks - Part 2 (#22623) 2023-04-25 05:59:40 +05:30
Refactoring test: Cypress tests - Grouping logical it blocks - Part 2 (#22623) 2023-04-25 05:59:40 +05:30
SettingsPane test: Cypress tests - Grouping logical it blocks - Part 2 (#22623) 2023-04-25 05:59:40 +05:30
Templates test: Cypress tests - Grouping logical it blocks - Part 2 (#22623) 2023-04-25 05:59:40 +05:30
ThemingTests test: Cypress tests - Grouping logical it blocks - Part 2 (#22623) 2023-04-25 05:59:40 +05:30
VisualTests test: Cypress tests - Grouping logical it blocks - Part 2 (#22623) 2023-04-25 05:59:40 +05:30
Widgets fix: combineDynamicBindings function (#22600) 2023-04-26 23:58:17 +05:30
Workspace test: Cypress tests - Grouping logical it blocks - Part 2 (#22623) 2023-04-25 05:59:40 +05:30