@capillarytech/blaze-ui 5.23.3-beta.1 → 5.23.3-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CapActionBar/index.js +48 -81
- package/CapActionBar/styles.module.css +11 -0
- package/CapActionBar/styles.module.scss.js +6 -0
- package/CapActionBar/types.js +1 -1
- package/CapAdvancedIcon/index.js +216 -179
- package/CapAdvancedIcon/styles.module.css +124 -0
- package/CapAdvancedIcon/styles.module.scss.js +28 -0
- package/CapAdvancedIcon/styles.scss +23 -23
- package/CapAdvancedIcon/types.js +1 -1
- package/CapAlert/index.js +29 -34
- package/CapAlert/styles.module.css +35 -0
- package/CapAlert/styles.module.scss.js +6 -0
- package/CapAlert/styles.scss +1 -1
- package/CapAppNotEnabled/index.js +25 -43
- package/CapAppNotEnabled/styles.module.css +32 -0
- package/CapAppNotEnabled/styles.module.scss.js +14 -0
- package/CapAppNotEnabled/styles.scss +5 -5
- package/CapAppNotEnabled/types.js +1 -1
- package/CapAskAira/AudienceFilterBot/constants.js +4 -1
- package/CapAskAira/AudienceFilterBot/index.js +449 -405
- package/CapAskAira/AudienceFilterBot/messages.js +44 -40
- package/CapAskAira/AudienceFilterBot/styles.module.css +425 -0
- package/CapAskAira/AudienceFilterBot/styles.module.scss.js +76 -0
- package/CapAskAira/AudienceFilterBot/styles.scss +7 -7
- package/CapAskAira/AudienceFilterBot/types.js +1 -1
- package/CapAskAira/CapAiMediaGeneration/actions.js +7 -4
- package/CapAskAira/CapAiMediaGeneration/api.js +8 -5
- package/CapAskAira/CapAiMediaGeneration/constants.js +27 -11
- package/CapAskAira/CapAiMediaGeneration/index.js +263 -320
- package/CapAskAira/CapAiMediaGeneration/messages.js +32 -28
- package/CapAskAira/CapAiMediaGeneration/reducer.js +14 -18
- package/CapAskAira/CapAiMediaGeneration/saga.js +17 -12
- package/CapAskAira/CapAiMediaGeneration/selectors.js +12 -16
- package/CapAskAira/CapAiMediaGeneration/styles.module.css +174 -0
- package/CapAskAira/CapAiMediaGeneration/styles.module.scss.js +32 -0
- package/CapAskAira/CapAiMediaGeneration/styles.scss +14 -14
- package/CapAskAira/CapAiMediaGeneration/types.js +1 -1
- package/CapAskAira/ConfigurationBot/CopilotResponse.js +394 -402
- package/CapAskAira/ConfigurationBot/GeneratingResponse.js +60 -68
- package/CapAskAira/ConfigurationBot/IdentityIcon.js +27 -39
- package/CapAskAira/ConfigurationBot/PromptAttachmentButton.js +32 -39
- package/CapAskAira/ConfigurationBot/UserApproveAction.js +47 -58
- package/CapAskAira/ConfigurationBot/UserRequest.js +33 -36
- package/CapAskAira/ConfigurationBot/constants.js +50 -29
- package/CapAskAira/ConfigurationBot/index.js +361 -388
- package/CapAskAira/ConfigurationBot/inferenceGenerator.js +12 -15
- package/CapAskAira/ConfigurationBot/messages.js +41 -37
- package/CapAskAira/ConfigurationBot/styles.module.css +165 -0
- package/CapAskAira/ConfigurationBot/styles.module.scss.js +41 -0
- package/CapAskAira/ConfigurationBot/styles.scss +33 -33
- package/CapAskAira/ConfigurationBot/test/mockData.js +53 -44
- package/CapAskAira/ConfigurationBot/types.js +1 -1
- package/CapAskAira/ConfigurationBot/util.js +30 -34
- package/CapAskAira/ContentGenerationBot/UtilComponents.js +123 -148
- package/CapAskAira/ContentGenerationBot/constants.js +25 -12
- package/CapAskAira/ContentGenerationBot/index.js +164 -153
- package/CapAskAira/ContentGenerationBot/jsonAssembler.js +32 -70
- package/CapAskAira/ContentGenerationBot/messages.js +28 -24
- package/CapAskAira/ContentGenerationBot/styles.module.css +96 -0
- package/CapAskAira/ContentGenerationBot/styles.module.scss.js +20 -0
- package/CapAskAira/ContentGenerationBot/types.js +1 -1
- package/CapAskAira/DocumentationBot/UtilComponents.js +55 -57
- package/CapAskAira/DocumentationBot/constants.js +23 -11
- package/CapAskAira/DocumentationBot/index.js +134 -153
- package/CapAskAira/DocumentationBot/messages.js +27 -23
- package/CapAskAira/DocumentationBot/styles.module.css +91 -0
- package/CapAskAira/DocumentationBot/styles.module.scss.js +23 -0
- package/CapAskAira/DocumentationBot/types.js +1 -1
- package/CapAskAira/DocumentationChatBot/MetaBlock.js +74 -75
- package/CapAskAira/DocumentationChatBot/actions.js +11 -9
- package/CapAskAira/DocumentationChatBot/api.js +8 -5
- package/CapAskAira/DocumentationChatBot/constants.js +23 -11
- package/CapAskAira/DocumentationChatBot/index.js +193 -221
- package/CapAskAira/DocumentationChatBot/messages.js +18 -14
- package/CapAskAira/DocumentationChatBot/reducer.js +17 -22
- package/CapAskAira/DocumentationChatBot/saga.js +25 -31
- package/CapAskAira/DocumentationChatBot/selectors.js +12 -16
- package/CapAskAira/DocumentationChatBot/styles.module.css +77 -0
- package/CapAskAira/DocumentationChatBot/styles.module.scss.js +20 -0
- package/CapAskAira/DocumentationChatBot/styles.scss +7 -7
- package/CapAskAira/DocumentationChatBot/types.js +1 -1
- package/CapAskAira/RuleGenerationBot/UtilComponents.js +107 -114
- package/CapAskAira/RuleGenerationBot/actions.js +26 -23
- package/CapAskAira/RuleGenerationBot/api.js +16 -24
- package/CapAskAira/RuleGenerationBot/constants.js +37 -18
- package/CapAskAira/RuleGenerationBot/index.js +130 -160
- package/CapAskAira/RuleGenerationBot/messages.js +30 -26
- package/CapAskAira/RuleGenerationBot/reducer.js +28 -38
- package/CapAskAira/RuleGenerationBot/saga.js +75 -72
- package/CapAskAira/RuleGenerationBot/selector.js +12 -15
- package/CapAskAira/RuleGenerationBot/styles.module.css +33 -0
- package/CapAskAira/RuleGenerationBot/styles.module.scss.js +11 -0
- package/CapAskAira/RuleGenerationBot/types.js +1 -1
- package/CapAskAira/RuleSummarizationBot/MetaBlock.js +104 -108
- package/CapAskAira/RuleSummarizationBot/actions.js +36 -42
- package/CapAskAira/RuleSummarizationBot/api.js +28 -45
- package/CapAskAira/RuleSummarizationBot/constants.js +65 -32
- package/CapAskAira/RuleSummarizationBot/index.js +180 -240
- package/CapAskAira/RuleSummarizationBot/messages.js +30 -26
- package/CapAskAira/RuleSummarizationBot/reducer.js +47 -59
- package/CapAskAira/RuleSummarizationBot/saga.js +154 -138
- package/CapAskAira/RuleSummarizationBot/selector.js +12 -15
- package/CapAskAira/RuleSummarizationBot/styles.module.css +85 -0
- package/CapAskAira/RuleSummarizationBot/styles.module.scss.js +22 -0
- package/CapAskAira/RuleSummarizationBot/styles.scss +8 -8
- package/CapAskAira/RuleSummarizationBot/types.js +1 -1
- package/CapAskAira/UtilComponents/AiraContainer.js +99 -109
- package/CapAskAira/UtilComponents/AiraTooltip.js +12 -19
- package/CapAskAira/UtilComponents/ErrorBar.js +23 -25
- package/CapAskAira/UtilComponents/Icons.js +49 -52
- package/CapAskAira/UtilComponents/InputBox.js +53 -44
- package/CapAskAira/UtilComponents/MultiLineInpuxBox.js +85 -116
- package/CapAskAira/UtilComponents/Notification.js +18 -19
- package/CapAskAira/UtilComponents/Popup.js +113 -136
- package/CapAskAira/UtilComponents/SecondaryButton.js +18 -40
- package/CapAskAira/UtilComponents/TitleBar.js +42 -41
- package/CapAskAira/UtilComponents/Tooltip.js +16 -17
- package/CapAskAira/constants.js +25 -18
- package/CapAskAira/hooks/useWebsocket.js +38 -51
- package/CapAskAira/index.js +25 -16
- package/CapAskAira/reducer.js +13 -11
- package/CapAskAira/rootStyles.js +4 -2
- package/CapAskAira/selector.js +6 -3
- package/CapAskAira/styles.module.css +238 -0
- package/CapAskAira/styles.module.scss.js +39 -0
- package/CapAskAira/styles.scss +4 -4
- package/CapAskAira/util.js +42 -40
- package/CapBanner/index.js +22 -34
- package/CapBanner/styles.module.css +34 -0
- package/CapBanner/styles.module.scss.js +9 -0
- package/CapBanner/styles.scss +1 -1
- package/CapBanner/types.js +1 -1
- package/CapBlock/index.js +50 -62
- package/CapBlock/styles.module.css +41 -0
- package/CapBlock/styles.module.scss.js +8 -0
- package/CapBlock/styles.scss +1 -1
- package/CapBlock/types.js +1 -1
- package/CapBorderedBox/index.js +29 -34
- package/CapBorderedBox/types.js +1 -1
- package/CapButton/index.js +100 -135
- package/CapButton/styles.module.css +207 -0
- package/CapButton/styles.module.scss.js +13 -0
- package/CapButton/styles.scss +35 -35
- package/CapButton/types.js +1 -1
- package/CapCSVFileUploader/index.js +113 -123
- package/CapCSVFileUploader/styles.module.css +73 -0
- package/CapCSVFileUploader/styles.module.scss.js +21 -0
- package/CapCSVFileUploader/styles.scss +11 -11
- package/CapCSVFileUploader/types.js +1 -1
- package/CapCalendarDatePicker/index.js +11 -28
- package/CapCalendarDatePicker/styles.module.css +108 -0
- package/CapCalendarDatePicker/styles.module.scss.js +6 -0
- package/CapCalendarDatePicker/styles.scss +1 -1
- package/CapCalendarDatePicker/types.js +1 -1
- package/CapCard/index.js +10 -25
- package/CapCard/styles.module.css +21 -0
- package/CapCard/styles.module.scss.js +6 -0
- package/CapCard/styles.scss +1 -1
- package/CapCard/types.js +1 -1
- package/CapCardBox/index.js +44 -54
- package/CapCardBox/styles.module.css +43 -0
- package/CapCardBox/styles.module.scss.js +12 -0
- package/CapCardBox/styles.scss +7 -7
- package/CapCardBox/types.js +1 -1
- package/CapCarousel/index.js +78 -96
- package/CapCarousel/styles.module.css +25 -0
- package/CapCarousel/styles.module.scss.js +8 -0
- package/CapCarousel/types.js +1 -1
- package/CapCheckbox/index.js +33 -47
- package/CapCheckbox/styles.module.css +44 -0
- package/CapCheckbox/styles.module.scss.js +12 -0
- package/CapCheckbox/styles.scss +5 -5
- package/CapCheckbox/types.js +1 -1
- package/CapCollapsibleLeftNavigation/constants.js +30 -14
- package/CapCollapsibleLeftNavigation/index.js +23 -7
- package/CapCollapsibleLeftNavigation/reducer.js +15 -33
- package/CapCollapsibleLeftNavigation/saga.js +23 -46
- package/CapCollapsibleNavbar/constants.js +40 -19
- package/CapCollapsibleNavbar/index.js +575 -619
- package/CapCollapsibleNavbar/styles.css +296 -0
- package/CapCollapsibleNavbar/styles.scss +75 -75
- package/CapColorPicker/index.js +26 -28
- package/CapColorPicker/styles.module.css +23 -0
- package/CapColorPicker/styles.module.scss.js +7 -0
- package/CapColorPicker/styles.scss +2 -2
- package/CapColorPicker/types.js +1 -1
- package/CapColoredTag/index.js +42 -56
- package/CapColoredTag/styles.js +28 -11
- package/CapColoredTag/styles.module.css +27 -0
- package/CapColoredTag/styles.module.scss.js +10 -0
- package/CapColoredTag/styles.scss +2 -2
- package/CapColoredTag/types.js +1 -1
- package/CapColumn/index.js +13 -24
- package/CapColumn/styles.module.css +11 -0
- package/CapColumn/styles.module.scss.js +6 -0
- package/CapColumn/styles.scss +1 -1
- package/CapColumn/types.js +1 -1
- package/CapCondition/ConditionCustomField.js +125 -146
- package/CapCondition/ConditionDate.js +181 -268
- package/CapCondition/ConditionMultiSelect.js +19 -17
- package/CapCondition/ConditionMultiSelectTree.js +213 -259
- package/CapCondition/ConditionNumber.js +105 -171
- package/CapCondition/ConditionSKUUploader.js +55 -42
- package/CapCondition/ConditionStoreUploader.js +184 -217
- package/CapCondition/ConditionString.js +62 -88
- package/CapCondition/constants.js +130 -74
- package/CapCondition/helper.js +124 -143
- package/CapCondition/index.js +280 -281
- package/CapCondition/messages.js +48 -45
- package/CapCondition/style.js +35 -6
- package/CapCondition/styles.css +132 -0
- package/CapCondition/styles.scss +32 -32
- package/CapConditionPreview/constants.js +48 -27
- package/CapConditionPreview/index.js +271 -407
- package/CapConditionPreview/messages.js +113 -110
- package/CapConditionPreview/styles.module.css +56 -0
- package/CapConditionPreview/styles.module.scss.js +32 -0
- package/CapConditionPreview/styles.scss +3 -3
- package/CapConditionPreview/types.js +1 -1
- package/CapCustomCard/CapCustomCard.js +273 -405
- package/CapCustomCard/CapCustomCardList.js +32 -41
- package/CapCustomCard/constants.js +18 -14
- package/CapCustomCard/index.js +6 -11
- package/CapCustomCard/messages.js +10 -6
- package/CapCustomCard/styles.module.css +293 -0
- package/CapCustomCard/styles.module.scss.js +37 -0
- package/CapCustomCard/styles.scss +56 -56
- package/CapCustomCard/types.js +1 -1
- package/CapCustomCarousel/index.js +92 -90
- package/CapCustomCarousel/styles.module.css +47 -0
- package/CapCustomCarousel/styles.module.scss.js +10 -0
- package/CapCustomCarousel/styles.scss +9 -9
- package/CapCustomCarousel/types.js +1 -1
- package/CapCustomCheckboxList/index.js +47 -78
- package/CapCustomCheckboxList/styles.module.css +38 -0
- package/CapCustomCheckboxList/styles.module.scss.js +12 -0
- package/CapCustomCheckboxList/styles.scss +5 -5
- package/CapCustomCheckboxList/types.js +1 -1
- package/CapCustomList/index.js +72 -90
- package/CapCustomList/styles.module.css +24 -0
- package/CapCustomList/styles.module.scss.js +9 -0
- package/CapCustomList/styles.scss +4 -4
- package/CapCustomList/types.js +1 -1
- package/CapCustomSelect/index.js +245 -304
- package/CapCustomSelect/messages.js +12 -8
- package/CapCustomSelect/styles.module.css +105 -0
- package/CapCustomSelect/styles.module.scss.js +27 -0
- package/CapCustomSelect/styles.scss +6 -6
- package/CapCustomSelect/types.js +1 -1
- package/CapDatePicker/index.js +106 -112
- package/CapDatePicker/styles.module.css +27 -0
- package/CapDatePicker/styles.module.scss.js +7 -0
- package/CapDatePicker/styles.scss +1 -1
- package/CapDatePicker/types.js +1 -1
- package/CapDateRangePicker/index.js +180 -168
- package/CapDateRangePicker/styles.module.css +35 -0
- package/CapDateRangePicker/styles.module.scss.js +8 -0
- package/CapDateRangePicker/styles.scss +1 -1
- package/CapDateRangePicker/types.js +1 -1
- package/CapDateTimePicker/index.js +129 -143
- package/CapDateTimePicker/messages.js +14 -10
- package/CapDateTimePicker/styles.module.css +61 -0
- package/CapDateTimePicker/styles.module.scss.js +7 -0
- package/CapDateTimePicker/types.js +1 -1
- package/CapDateTimeRangePicker/constants.js +10 -5
- package/CapDateTimeRangePicker/index.js +283 -356
- package/CapDateTimeRangePicker/messages.js +22 -18
- package/CapDateTimeRangePicker/styles.module.css +80 -0
- package/CapDateTimeRangePicker/styles.module.scss.js +12 -0
- package/CapDateTimeRangePicker/styles.scss +2 -2
- package/CapDateTimeRangePicker/types.js +1 -1
- package/CapDivider/index.js +51 -58
- package/CapDivider/styles.css +17 -0
- package/CapDivider/styles.scss +10 -10
- package/CapDivider/types.js +1 -1
- package/CapDnDGraph/GraphBlockNode.js +107 -101
- package/CapDnDGraph/constants.js +82 -49
- package/CapDnDGraph/index.js +618 -731
- package/CapDnDGraph/mockdata.js +3153 -2828
- package/CapDnDGraph/reportingBlock.d.ts.map +1 -1
- package/CapDnDGraph/reportingBlock.js +65 -66
- package/CapDnDGraph/styles.css +74 -0
- package/CapDnDGraph/styles.scss +17 -17
- package/CapDnDGraph/utils.js +35 -83
- package/CapDndGraphSidebar/SideBarIcon.js +78 -75
- package/CapDndGraphSidebar/SidebarNodesRendered.js +40 -60
- package/CapDndGraphSidebar/index.js +39 -50
- package/CapDndGraphSidebar/styles.css +55 -0
- package/CapDndGraphSidebar/styles.scss +9 -9
- package/CapDragAndDrop/constants.js +15 -8
- package/CapDragAndDrop/index.js +69 -106
- package/CapDragAndDrop/styles.css +59 -0
- package/CapDragAndDrop/styles.scss +10 -10
- package/CapDragReorder/Card.js +62 -102
- package/CapDragReorder/ItemTypes.js +6 -3
- package/CapDragReorder/index.js +66 -86
- package/CapDragReorder/messages.js +10 -6
- package/CapDragReorder/styles.css +77 -0
- package/CapDragReorder/styles.js +15 -12
- package/CapDragReorder/styles.scss +16 -16
- package/CapDrawer/index.js +39 -49
- package/CapDrawer/types.js +1 -1
- package/CapDropdown/index.js +88 -117
- package/CapDropdown/styles.module.css +16 -0
- package/CapDropdown/styles.module.scss.js +6 -0
- package/CapDropdown/styles.scss +1 -1
- package/CapDropdown/types.js +1 -1
- package/CapEmptyDivWithBorder/index.js +38 -54
- package/CapEmptyDivWithBorder/styles.module.css +14 -0
- package/CapEmptyDivWithBorder/styles.module.scss.js +6 -0
- package/CapEmptyDivWithBorder/styles.scss +1 -1
- package/CapEmptyDivWithBorder/types.js +1 -1
- package/CapError/index.js +44 -39
- package/CapError/styles.module.css +22 -0
- package/CapError/styles.module.scss.js +13 -0
- package/CapError/styles.scss +4 -4
- package/CapError/types.js +1 -1
- package/CapErrorBoundary/index.js +83 -91
- package/CapErrorBoundary/styles.module.css +27 -0
- package/CapErrorBoundary/styles.module.scss.js +10 -0
- package/CapErrorBoundary/styles.scss +3 -3
- package/CapErrorBoundary/types.js +1 -1
- package/CapErrorStateIllustration/index.js +51 -69
- package/CapErrorStateIllustration/styles.module.css +38 -0
- package/CapErrorStateIllustration/styles.module.scss.js +11 -0
- package/CapErrorStateIllustration/styles.scss +6 -6
- package/CapErrorStateIllustration/types.js +1 -1
- package/CapEventCalendar/CalendarCanvas/index.js +212 -327
- package/CapEventCalendar/CalendarCanvas/utils.js +40 -37
- package/CapEventCalendar/components/DayDropdown/index.js +14 -36
- package/CapEventCalendar/components/MonthHeader/index.js +9 -16
- package/CapEventCalendar/constants.js +40 -6
- package/CapEventCalendar/drawUtils.js +73 -113
- package/CapEventCalendar/index.js +145 -161
- package/CapEventCalendar/styles.css +112 -0
- package/CapEventCalendar/styles.scss +13 -13
- package/CapEventCalendar/utils.js +107 -148
- package/CapExpressionEditor/index.d.ts +1 -0
- package/CapExpressionEditor/index.d.ts.map +1 -1
- package/CapExpressionEditor/index.js +64 -66
- package/CapExpressionEditor/js/expressionEditor.js +446 -708
- package/CapExpressionEditor/js/fixGrammar.js +23 -41
- package/CapExpressionEditor/js/grammar.js +1317 -654
- package/CapExpressionEditor/js/pickers.js +22 -57
- package/CapExpressionEditor/styles.module.css +182 -0
- package/CapExpressionEditor/styles.module.scss.js +8 -0
- package/CapExpressionEditor/styles.scss +27 -27
- package/CapExpressionEditor/types.js +1 -1
- package/CapForm/index.js +6 -23
- package/CapForm/styles.module.css +31 -0
- package/CapForm/styles.module.scss.js +6 -0
- package/CapForm/styles.scss +1 -1
- package/CapForm/types.js +1 -1
- package/CapFormItem/index.js +15 -27
- package/CapFormItem/styles.module.css +32 -0
- package/CapFormItem/styles.module.scss.js +6 -0
- package/CapFormItem/styles.scss +1 -1
- package/CapFormItem/types.js +1 -1
- package/CapGraph/constants.js +20 -19
- package/CapGraph/index.js +100 -120
- package/CapGraph/styles.module.css +8 -0
- package/CapGraph/styles.module.scss.js +4 -0
- package/CapGraph/types.js +1 -1
- package/CapHamburgerMenu/index.js +436 -487
- package/CapHamburgerMenu/styles.module.css +292 -0
- package/CapHamburgerMenu/styles.module.scss.js +36 -0
- package/CapHamburgerMenu/styles.scss +23 -23
- package/CapHamburgerMenu/types.js +1 -1
- package/CapHeader/index.js +64 -103
- package/CapHeader/styles.module.css +21 -0
- package/CapHeader/styles.module.scss.js +9 -0
- package/CapHeader/styles.scss +1 -1
- package/CapHeader/types.js +1 -1
- package/CapHeading/index.js +43 -47
- package/CapHeading/styles.module.css +175 -0
- package/CapHeading/styles.module.scss.js +58 -0
- package/CapHeading/styles.scss +19 -19
- package/CapHeading/types.js +1 -1
- package/CapHierarchyComponent/index.js +29 -41
- package/CapIcon/index.js +182 -194
- package/CapIcon/styles.module.css +73 -0
- package/CapIcon/styles.module.scss.js +35 -0
- package/CapIcon/styles.scss +13 -13
- package/CapIcon/types.js +1 -1
- package/CapIllustration/index.js +66 -97
- package/CapIllustration/styles.module.css +31 -0
- package/CapIllustration/styles.module.scss.js +10 -0
- package/CapIllustration/styles.scss +1 -1
- package/CapIllustration/types.js +1 -1
- package/CapImage/index.js +9 -23
- package/CapImage/styles.module.css +3 -0
- package/CapImage/styles.module.scss.js +6 -0
- package/CapImage/types.js +1 -1
- package/CapImportMFEComponent/index.js +36 -53
- package/CapImportMFEComponent/messages.js +13 -10
- package/CapImportMFEComponent/styles.module.css +16 -0
- package/CapImportMFEComponent/styles.module.scss.js +7 -0
- package/CapImportMFEComponent/styles.scss +2 -2
- package/CapImportMFEComponent/types.js +1 -1
- package/CapInfoNote/index.js +42 -56
- package/CapInfoNote/styles.module.css +20 -0
- package/CapInfoNote/styles.module.scss.js +8 -0
- package/CapInfoNote/styles.scss +3 -3
- package/CapInfoNote/types.js +1 -1
- package/CapInput/Number.js +12 -20
- package/CapInput/Search.js +13 -21
- package/CapInput/TextArea.js +13 -23
- package/CapInput/index.js +40 -43
- package/CapInput/messages.js +16 -17
- package/CapInput/styles.module.css +76 -0
- package/CapInput/styles.module.scss.js +7 -0
- package/CapInput/styles.scss +2 -2
- package/CapInput/types.js +1 -1
- package/CapLabel/index.js +58 -64
- package/CapLabel/styles.module.css +209 -0
- package/CapLabel/styles.module.scss.js +107 -0
- package/CapLabel/styles.scss +36 -36
- package/CapLabel/types.js +1 -1
- package/CapLanguageProvider/actions.js +22 -25
- package/CapLanguageProvider/antdLocales.d.ts +15 -0
- package/CapLanguageProvider/antdLocales.d.ts.map +1 -0
- package/CapLanguageProvider/antdLocales.js +53 -0
- package/CapLanguageProvider/constants.js +32 -21
- package/CapLanguageProvider/index.d.ts.map +1 -1
- package/CapLanguageProvider/index.js +84 -156
- package/CapLanguageProvider/reducer.js +27 -37
- package/CapLanguageProvider/saga.js +42 -48
- package/CapLanguageProvider/selector.js +17 -36
- package/CapLanguageProvider/types.js +1 -1
- package/CapLevelGraphRenderer/Tooltip.js +32 -43
- package/CapLevelGraphRenderer/index.js +213 -320
- package/CapLevelGraphRenderer/styles.module.css +30 -0
- package/CapLevelGraphRenderer/styles.module.scss.js +10 -0
- package/CapLevelGraphRenderer/styles.scss +7 -7
- package/CapLevelGraphRenderer/types.js +1 -1
- package/CapLink/index.js +32 -56
- package/CapLink/styles.module.css +74 -0
- package/CapLink/styles.module.scss.js +14 -0
- package/CapLink/styles.scss +14 -14
- package/CapLink/types.js +1 -1
- package/CapList/index.js +13 -33
- package/CapList/styles.module.css +11 -0
- package/CapList/styles.module.scss.js +6 -0
- package/CapList/styles.scss +3 -3
- package/CapList/types.js +1 -1
- package/CapListLayout/index.js +14 -25
- package/CapListLayout/styles.module.css +13 -0
- package/CapListLayout/styles.module.scss.js +6 -0
- package/CapListLayout/types.js +1 -1
- package/CapLogin/index.js +69 -79
- package/CapLogin/styles.module.css +39 -0
- package/CapLogin/styles.module.scss.js +12 -0
- package/CapLogin/types.js +1 -1
- package/CapMediaPreview/ImageRenderer.js +11 -18
- package/CapMediaPreview/MediaRenderer.js +29 -52
- package/CapMediaPreview/VideoPlayer.js +19 -32
- package/CapMediaPreview/constants.js +9 -7
- package/CapMediaPreview/index.js +138 -141
- package/CapMediaPreview/messages.js +14 -10
- package/CapMediaPreview/styles.css +135 -0
- package/CapMediaPreview/styles.scss +6 -6
- package/CapMenu/index.js +17 -35
- package/CapMenu/styles.module.scss.js +4 -0
- package/CapMenu/types.js +1 -1
- package/CapMobileDatePicker/index.js +54 -61
- package/CapMobileDatePicker/styles.css +19 -0
- package/CapMobileDatePicker/styles.scss +6 -6
- package/CapMobileDateRangePicker/ReactMobileDatePicker.js +942 -1012
- package/CapMobileDateRangePicker/ReactMobileDatePickerModule.d.ts +7 -0
- package/CapMobileDateRangePicker/ReactMobileDatePickerModule.d.ts.map +1 -0
- package/CapMobileDateRangePicker/ReactMobileDatePickerModule.js +4 -0
- package/CapMobileDateRangePicker/index.js +223 -260
- package/CapMobileDateRangePicker/styles.css +185 -0
- package/CapMobileDateRangePicker/styles.scss +62 -62
- package/CapModal/index.js +94 -116
- package/CapModal/messages.js +12 -13
- package/CapModal/styles.module.css +38 -0
- package/CapModal/styles.module.scss.js +11 -0
- package/CapModal/styles.scss +4 -4
- package/CapModal/types.js +1 -1
- package/CapMultiSelect/index.js +54 -81
- package/CapMultiSelect/styles.module.css +10 -0
- package/CapMultiSelect/styles.module.scss.js +7 -0
- package/CapMultiSelect/styles.scss +2 -2
- package/CapMultiSelect/types.js +1 -1
- package/CapMultiSelectDatePicker/index.js +63 -67
- package/CapMultiSelectDatePicker/messages.js +10 -6
- package/CapMultiSelectDatePicker/styles.module.css +51 -0
- package/CapMultiSelectDatePicker/styles.module.scss.js +20 -0
- package/CapMultiSelectDatePicker/styles.scss +5 -5
- package/CapMultiSelectDatePicker/types.js +1 -1
- package/CapMultiSelectWithTree/index.js +536 -598
- package/CapMultiSelectWithTree/styles.css +223 -0
- package/CapMultiSelectWithTree/styles.scss +46 -46
- package/CapMultiplePath/constants.js +18 -8
- package/CapMultiplePath/index.js +247 -405
- package/CapMultiplePath/mockdata.js +50 -88
- package/CapMultiplePath/styles.js +75 -34
- package/CapNavigation/constants.js +4 -1
- package/CapNavigation/index.js +311 -317
- package/CapNavigation/messages.js +12 -8
- package/CapNavigation/mockdata.js +298 -270
- package/CapNavigation/styles.module.css +19 -0
- package/CapNavigation/styles.module.scss.js +7 -0
- package/CapNavigation/styles.scss +2 -2
- package/CapNavigation/types.js +1 -1
- package/CapNotification/index.js +39 -77
- package/CapNotification/styles.module.css +49 -0
- package/CapNotification/styles.module.scss.js +16 -0
- package/CapNotification/styles.scss +10 -10
- package/CapNotification/types.js +1 -1
- package/CapNotificationDropdown/CapNotificationDefaultCard.js +90 -118
- package/CapNotificationDropdown/constants.js +4 -1
- package/CapNotificationDropdown/index.js +67 -65
- package/CapNotificationDropdown/styles.module.css +140 -0
- package/CapNotificationDropdown/styles.module.scss.js +25 -0
- package/CapNotificationDropdown/styles.scss +25 -25
- package/CapNotificationDropdown/types.js +1 -1
- package/CapPopover/index.js +56 -63
- package/CapPopover/styles.module.css +11 -0
- package/CapPopover/styles.module.scss.js +4 -0
- package/CapPopover/types.js +1 -1
- package/CapPopoverTree/index.js +147 -211
- package/CapPopoverTree/style.js +94 -13
- package/CapPopoverTree/styles.css +36 -0
- package/CapPopoverTree/styles.scss +10 -10
- package/CapProductSelection/constants.js +18 -8
- package/CapProductSelection/index.js +201 -248
- package/CapProductSelection/style.js +38 -8
- package/CapProductSelection/styles.scss +14 -14
- package/CapProgress/index.js +10 -24
- package/CapProgress/styles.module.css +36 -0
- package/CapProgress/styles.module.scss.js +6 -0
- package/CapProgress/styles.scss +9 -9
- package/CapProgress/types.js +1 -1
- package/CapRadio/index.js +33 -51
- package/CapRadio/styles.module.css +43 -0
- package/CapRadio/styles.module.scss.js +12 -0
- package/CapRadio/styles.scss +4 -4
- package/CapRadio/types.js +1 -1
- package/CapRadioButton/index.js +13 -22
- package/CapRadioButton/styles.module.css +21 -0
- package/CapRadioButton/styles.module.scss.js +6 -0
- package/CapRadioButton/styles.scss +2 -2
- package/CapRadioButton/types.js +1 -1
- package/CapRadioCard/index.js +102 -114
- package/CapRadioCard/styles.module.css +123 -0
- package/CapRadioCard/styles.module.scss.js +47 -0
- package/CapRadioCard/styles.scss +26 -26
- package/CapRadioCard/types.js +1 -1
- package/CapRadioGroup/index.js +18 -26
- package/CapRadioGroup/styles.module.css +18 -0
- package/CapRadioGroup/styles.module.scss.js +6 -0
- package/CapRadioGroup/styles.scss +3 -3
- package/CapRadioGroup/types.js +1 -1
- package/CapReorderComponent/index.js +96 -97
- package/CapReorderComponent/styles.module.css +54 -0
- package/CapReorderComponent/styles.module.scss.js +13 -0
- package/CapReorderComponent/styles.scss +8 -8
- package/CapReorderComponent/types.js +1 -1
- package/CapRoadMap/index.js +45 -50
- package/CapRoadMap/styles.module.css +56 -0
- package/CapRoadMap/styles.module.scss.js +8 -0
- package/CapRoadMap/styles.scss +12 -12
- package/CapRoadMap/types.js +1 -1
- package/CapRow/index.js +70 -73
- package/CapRow/styles.module.css +39 -0
- package/CapRow/styles.module.scss.js +14 -0
- package/CapRow/styles.scss +9 -9
- package/CapRow/types.js +1 -1
- package/CapSKUUploader/index.js +118 -129
- package/CapSKUUploader/styles.module.css +29 -0
- package/CapSKUUploader/styles.module.scss.js +7 -0
- package/CapSKUUploader/styles.scss +6 -6
- package/CapSKUUploader/types.js +1 -1
- package/CapSecondaryTopBar/index.js +94 -87
- package/CapSecondaryTopBar/styles.module.css +82 -0
- package/CapSecondaryTopBar/styles.module.scss.js +16 -0
- package/CapSecondaryTopBar/styles.scss +13 -13
- package/CapSecondaryTopBar/types.js +1 -1
- package/CapSelect/index.js +132 -152
- package/CapSelect/styles.module.css +51 -0
- package/CapSelect/styles.module.scss.js +9 -0
- package/CapSelect/styles.scss +11 -11
- package/CapSelect/types.js +1 -1
- package/CapSelect/utils.js +12 -13
- package/CapSelectFilter/index.js +82 -90
- package/CapSelectFilter/styles.module.css +68 -0
- package/CapSelectFilter/styles.module.scss.js +16 -0
- package/CapSelectFilter/styles.scss +10 -10
- package/CapSelectFilter/types.js +1 -1
- package/CapShape/index.js +41 -36
- package/CapShape/styles.module.css +17 -0
- package/CapShape/styles.module.scss.js +8 -0
- package/CapShape/styles.scss +1 -1
- package/CapShape/types.js +1 -1
- package/CapSideBar/MenuSearch.js +135 -172
- package/CapSideBar/_capSideBar.scss +21 -21
- package/CapSideBar/_menuSearch.module.css +131 -0
- package/CapSideBar/_menuSearch.module.scss.js +24 -0
- package/CapSideBar/_menuSearch.scss +11 -11
- package/CapSideBar/index.js +147 -165
- package/CapSideBar/styles.module.css +254 -0
- package/CapSideBar/styles.module.scss.js +28 -0
- package/CapSideBar/types.js +1 -1
- package/CapSkeleton/index.js +8 -16
- package/CapSkeleton/types.js +1 -1
- package/CapSlideBox/index.js +84 -91
- package/CapSlideBox/styles.module.css +119 -0
- package/CapSlideBox/styles.module.scss.js +28 -0
- package/CapSlideBox/styles.scss +21 -21
- package/CapSlideBox/types.js +1 -1
- package/CapSlider/index.js +81 -101
- package/CapSlider/styles.module.css +41 -0
- package/CapSlider/styles.module.scss.js +8 -0
- package/CapSlider/styles.scss +12 -12
- package/CapSlider/types.js +1 -1
- package/CapSnackBar/index.js +35 -42
- package/CapSnackBar/styles.module.css +24 -0
- package/CapSnackBar/styles.module.scss.js +7 -0
- package/CapSnackBar/styles.scss +3 -3
- package/CapSnackBar/types.js +1 -1
- package/CapSomethingWentWrong/index.js +42 -49
- package/CapSomethingWentWrong/messages.js +13 -10
- package/CapSomethingWentWrong/styles.module.css +18 -0
- package/CapSomethingWentWrong/styles.module.scss.js +7 -0
- package/CapSomethingWentWrong/styles.scss +1 -1
- package/CapSomethingWentWrong/types.js +1 -1
- package/CapSpin/index.js +6 -16
- package/CapSpin/types.js +1 -1
- package/CapSplit/SplitAudienceInfo.js +38 -54
- package/CapSplit/constants.js +11 -9
- package/CapSplit/index.js +151 -173
- package/CapSplit/messages.js +22 -18
- package/CapSplit/styles.module.css +116 -0
- package/CapSplit/styles.module.scss.js +21 -0
- package/CapSplit/styles.scss +21 -21
- package/CapSplit/types.js +1 -1
- package/CapStaticTemplates/constants.js +6 -2
- package/CapStaticTemplates/index.js +228 -292
- package/CapStaticTemplates/style.js +216 -21
- package/CapStatisticCard/index.js +60 -81
- package/CapStatisticCard/styles.module.css +24 -0
- package/CapStatisticCard/styles.module.scss.js +13 -0
- package/CapStatisticCard/styles.scss +6 -6
- package/CapStatisticCard/types.js +1 -1
- package/CapStatus/index.js +32 -39
- package/CapStatus/styles.module.css +16 -0
- package/CapStatus/styles.module.scss.js +6 -0
- package/CapStatus/styles.scss +1 -1
- package/CapStatus/types.js +1 -1
- package/CapSteps/index.js +31 -82
- package/CapSteps/styles.module.css +36 -0
- package/CapSteps/styles.module.scss.js +6 -0
- package/CapSteps/styles.scss +9 -9
- package/CapSteps/types.js +1 -1
- package/CapStepsAccordian/index.js +50 -96
- package/CapStepsAccordian/styles.module.css +49 -0
- package/CapStepsAccordian/styles.module.scss.js +10 -0
- package/CapStepsAccordian/styles.scss +8 -8
- package/CapStepsAccordian/types.js +1 -1
- package/CapSupportVideosWrapper/ResizablePIP.js +334 -318
- package/CapSupportVideosWrapper/constants.js +26 -12
- package/CapSupportVideosWrapper/index.js +108 -116
- package/CapSupportVideosWrapper/messages.js +15 -12
- package/CapSupportVideosWrapper/styles.css +146 -0
- package/CapSupportVideosWrapper/styles.module.scss.js +28 -0
- package/CapSupportVideosWrapper/styles.scss +21 -21
- package/CapSupportVideosWrapper/types.js +1 -1
- package/CapSupportVideosWrapper/utils.js +14 -10
- package/CapSwitch/index.js +22 -27
- package/CapSwitch/styles.module.css +35 -0
- package/CapSwitch/styles.module.scss.js +6 -0
- package/CapSwitch/styles.scss +7 -7
- package/CapSwitch/types.js +1 -1
- package/CapTab/index.js +59 -92
- package/CapTab/styles.module.css +20 -0
- package/CapTab/styles.module.scss.js +8 -0
- package/CapTab/styles.scss +4 -4
- package/CapTab/types.js +1 -1
- package/CapTabV3/index.js +41 -56
- package/CapTabV3/styles.module.css +12 -0
- package/CapTabV3/styles.module.scss.js +6 -0
- package/CapTabV3/styles.scss +2 -2
- package/CapTabV3/types.js +1 -1
- package/CapTable/index.js +106 -131
- package/CapTable/loadable.js +9 -11
- package/CapTable/styles.module.css +49 -0
- package/CapTable/styles.module.scss.js +7 -0
- package/CapTable/styles.scss +2 -2
- package/CapTable/types.js +1 -1
- package/CapTable/utils.js +44 -84
- package/CapTag/index.js +21 -27
- package/CapTag/styles.module.css +27 -0
- package/CapTag/styles.module.scss.js +13 -0
- package/CapTag/styles.scss +3 -3
- package/CapTag/types.js +1 -1
- package/CapTagDropdown/index.js +135 -166
- package/CapTagDropdown/messages.js +14 -10
- package/CapTagDropdown/styles.module.css +57 -0
- package/CapTagDropdown/styles.module.scss.js +12 -0
- package/CapTagDropdown/styles.scss +7 -7
- package/CapTagDropdown/types.js +1 -1
- package/CapTimePicker/index.js +75 -82
- package/CapTimePicker/styles.module.css +11 -0
- package/CapTimePicker/styles.module.scss.js +6 -0
- package/CapTimePicker/styles.scss +2 -2
- package/CapTimePicker/types.js +1 -1
- package/CapTimeline/CapTimelineCard.js +132 -118
- package/CapTimeline/CapTimelinePanesWrapper.js +37 -47
- package/CapTimeline/constants.js +6 -2
- package/CapTimeline/index.js +55 -65
- package/CapTimeline/styles.css +138 -0
- package/CapTimeline/styles.scss +43 -43
- package/CapTimelineNested/CapTimelineNestedCard.js +133 -110
- package/CapTimelineNested/CapTimelineNestedPanesWrapper.js +48 -56
- package/CapTimelineNested/NestedCard.js +56 -45
- package/CapTimelineNested/NestedCardParent.js +142 -115
- package/CapTimelineNested/_actionsAndTriggers.css +117 -0
- package/CapTimelineNested/_actionsAndTriggers.scss +9 -9
- package/CapTimelineNested/_capTimeline.scss +36 -36
- package/CapTimelineNested/_trigger.css +59 -0
- package/CapTimelineNested/assets/triggerComplete.svg.js +4 -0
- package/CapTimelineNested/assets/triggerOptional.svg.js +4 -0
- package/CapTimelineNested/assets/triggerPending.svg.js +4 -0
- package/CapTimelineNested/constants.js +12 -5
- package/CapTimelineNested/index.js +80 -82
- package/CapTimelineNested/styles.css +289 -0
- package/CapTooltip/index.js +73 -72
- package/CapTooltip/styles.module.css +27 -0
- package/CapTooltip/styles.module.scss.js +7 -0
- package/CapTooltip/styles.scss +3 -3
- package/CapTooltip/types.js +1 -1
- package/CapTooltipWithInfo/index.js +21 -40
- package/CapTooltipWithInfo/styles.module.css +26 -0
- package/CapTooltipWithInfo/styles.module.scss.js +7 -0
- package/CapTooltipWithInfo/styles.scss +4 -4
- package/CapTooltipWithInfo/types.js +1 -1
- package/CapTopBar/CapOrgSelect.js +115 -131
- package/CapTopBar/CapOrgSelect.module.css +33 -0
- package/CapTopBar/CapOrgSelect.module.scss.js +10 -0
- package/CapTopBar/CapOrgSelect.scss +5 -5
- package/CapTopBar/CapOrgSelectUtils.js +100 -169
- package/CapTopBar/constants.js +4 -1
- package/CapTopBar/index.js +375 -377
- package/CapTopBar/mockdata.js +298 -270
- package/CapTopBar/styles.module.css +426 -0
- package/CapTopBar/styles.module.scss.js +81 -0
- package/CapTopBar/styles.scss +34 -34
- package/CapTopBar/themeConfig.js +17 -17
- package/CapTopBar/types.js +1 -1
- package/CapTopBar/utils.js +47 -49
- package/CapTree/index.js +15 -60
- package/CapTree/styles.module.css +11 -0
- package/CapTree/styles.module.scss.js +8 -0
- package/CapTree/styles.scss +2 -2
- package/CapTree/types.js +1 -1
- package/CapTreeSelect/index.js +71 -101
- package/CapTreeSelect/styles.module.css +49 -0
- package/CapTreeSelect/styles.module.scss.js +12 -0
- package/CapTreeSelect/styles.scss +11 -11
- package/CapTreeSelect/types.js +1 -1
- package/CapTreeView/index.js +117 -160
- package/CapTreeView/styles.css +62 -0
- package/CapTreeView/styles.scss +15 -15
- package/CapTruncateList/index.js +60 -62
- package/CapTruncateList/messages.js +9 -6
- package/CapTruncateList/types.js +1 -1
- package/CapUnifiedSelect/CustomDropdown.js +189 -202
- package/CapUnifiedSelect/DropdownHeader.js +60 -35
- package/CapUnifiedSelect/components.js +58 -71
- package/CapUnifiedSelect/constants.js +24 -19
- package/CapUnifiedSelect/enhanceOptions.js +100 -123
- package/CapUnifiedSelect/index.js +288 -269
- package/CapUnifiedSelect/messages.js +24 -20
- package/CapUnifiedSelect/styles.module.css +651 -0
- package/CapUnifiedSelect/styles.module.scss.js +65 -0
- package/CapUnifiedSelect/styles.scss +79 -79
- package/CapUnifiedSelect/testData.js +126 -159
- package/CapUnifiedSelect/types.js +1 -1
- package/CapUnifiedSelect/useCapUnifiedSelect.js +317 -310
- package/CapUnifiedSelect/useInfiniteScroll.js +98 -113
- package/CapUnifiedSelect/utils.js +95 -156
- package/CapUploader/index.js +13 -31
- package/CapUploader/styles.module.css +39 -0
- package/CapUploader/styles.module.scss.js +4 -0
- package/CapUploader/types.js +1 -1
- package/CapUserProfile/UserProfileTab.js +339 -316
- package/CapUserProfile/constants.js +126 -97
- package/CapUserProfile/index.js +115 -137
- package/CapUserProfile/messages.js +50 -46
- package/CapUserProfile/mockData.js +394 -346
- package/CapUserProfile/styles.module.css +77 -0
- package/CapUserProfile/styles.module.scss.js +19 -0
- package/CapUserProfile/styles.scss +18 -18
- package/CapUserProfile/types.js +1 -1
- package/CapUserProfile/utils.js +84 -161
- package/CapVerticalGroupTable/index.js +50 -61
- package/CapVerticalGroupTable/messages.js +9 -6
- package/CapVerticalGroupTable/style.js +11 -6
- package/CapVerticalGroupTable/styles.css +22 -0
- package/CapVerticalGroupTable/styles.scss +4 -4
- package/CapVirtualList/index.js +8 -16
- package/CapVirtualList/types.js +1 -1
- package/CapVirtualSelect/actions.js +13 -14
- package/CapVirtualSelect/constants.js +26 -12
- package/CapVirtualSelect/index.js +302 -316
- package/CapVirtualSelect/messages.js +10 -6
- package/CapVirtualSelect/reducer.js +46 -62
- package/CapVirtualSelect/saga.js +74 -105
- package/CapVirtualSelect/selectors.js +13 -30
- package/CapVirtualSelect/styles.css +110 -0
- package/CapVirtualSelect/utils.js +7 -12
- package/ClearDataOnUnmountHoc/index.js +10 -10
- package/LocaleHoc/index.js +28 -29
- package/assets/HOCs/ComponentWithLabelHOC/index.js +113 -114
- package/assets/HOCs/ComponentWithLabelHOC/styles.module.css +143 -0
- package/assets/HOCs/ComponentWithLabelHOC/styles.module.scss.js +26 -0
- package/assets/HOCs/ComponentWithLabelHOC/styles.scss +7 -7
- package/assets/HOCs/ComponentWithLabelHOC/types.js +1 -1
- package/assets/HOCs/index.js +4 -1
- package/assets/icons/add.js +17 -34
- package/assets/icons/back.js +9 -13
- package/assets/icons/calendar.js +16 -33
- package/assets/icons/capillary_logo.svg.js +4 -0
- package/assets/icons/capillary_logo_v2.png.js +4 -0
- package/assets/icons/check-filled.js +20 -17
- package/assets/icons/closeIcon.js +29 -38
- package/assets/icons/dropdownIcon.js +17 -32
- package/assets/icons/dynamic.js +16 -33
- package/assets/icons/index.js +36 -17
- package/assets/icons/info.js +29 -37
- package/assets/icons/logoBackground.js +14 -19
- package/assets/icons/message.js +20 -40
- package/assets/icons/more.js +5 -13
- package/assets/icons/outbound.js +16 -33
- package/assets/icons/searchIcon.js +16 -34
- package/assets/icons/selectedTick.js +17 -38
- package/assets/icons/survey.js +16 -34
- package/assets/icons/user.js +16 -33
- package/assets/icons/view.js +19 -36
- package/assets/images/EmptyStateIllustrationForPromos.png.js +4 -0
- package/assets/images/aiRA-icon.svg.js +4 -0
- package/assets/images/bootupPageCopilotIcon.svg.js +4 -0
- package/assets/images/cart.svg.js +4 -0
- package/assets/images/expiryErrorStateIllustration.svg.js +4 -0
- package/assets/images/featureUiNotEnabledIllustration.svg.js +4 -0
- package/assets/images/file-selector.svg.js +4 -0
- package/assets/images/group-3.svg.js +4 -0
- package/assets/images/offer.svg.js +4 -0
- package/assets/images/refreshErrorStateIllustration.svg.js +4 -0
- package/assets/images/repair-illustration.png.js +4 -0
- package/assets/images/sendIconDisabled.svg.js +4 -0
- package/assets/images/sendIconEnabled.svg.js +4 -0
- package/assets/svgIcons/Icons/Academy.js +23 -17
- package/assets/svgIcons/Icons/AcademyBackground.js +46 -45
- package/assets/svgIcons/Icons/Add.js +15 -14
- package/assets/svgIcons/Icons/AddMedia.js +21 -15
- package/assets/svgIcons/Icons/AddPhoto.js +21 -15
- package/assets/svgIcons/Icons/AddProfile.js +23 -17
- package/assets/svgIcons/Icons/AddUserBackground.js +50 -57
- package/assets/svgIcons/Icons/Ads.js +21 -15
- package/assets/svgIcons/Icons/AiraBotChat.js +243 -114
- package/assets/svgIcons/Icons/AiraBotDark.js +299 -159
- package/assets/svgIcons/Icons/AiraBotTitle.js +298 -148
- package/assets/svgIcons/Icons/AiraChatTitleBar.js +15 -46
- package/assets/svgIcons/Icons/AiraFAB.js +51 -44
- package/assets/svgIcons/Icons/AiraUserChat.js +53 -36
- package/assets/svgIcons/Icons/Alarm.js +21 -15
- package/assets/svgIcons/Icons/Alert.js +21 -15
- package/assets/svgIcons/Icons/AlertRed.js +49 -39
- package/assets/svgIcons/Icons/AlertWarning.js +24 -18
- package/assets/svgIcons/Icons/Android.js +15 -14
- package/assets/svgIcons/Icons/Api.js +31 -41
- package/assets/svgIcons/Icons/Apps.js +21 -15
- package/assets/svgIcons/Icons/ArrowDown.js +20 -14
- package/assets/svgIcons/Icons/ArrowFilled.js +46 -35
- package/assets/svgIcons/Icons/ArrowUp.js +26 -20
- package/assets/svgIcons/Icons/Attachment.js +21 -15
- package/assets/svgIcons/Icons/Attribution.js +20 -23
- package/assets/svgIcons/Icons/Back.js +21 -15
- package/assets/svgIcons/Icons/Badges.js +48 -37
- package/assets/svgIcons/Icons/Basket.js +21 -15
- package/assets/svgIcons/Icons/BehaviouralProfile.js +10 -43
- package/assets/svgIcons/Icons/Beta.js +8 -22
- package/assets/svgIcons/Icons/Bill.js +30 -39
- package/assets/svgIcons/Icons/BoldInfo.js +50 -40
- package/assets/svgIcons/Icons/Box.js +22 -16
- package/assets/svgIcons/Icons/Bulb.js +21 -15
- package/assets/svgIcons/Icons/Button.js +30 -39
- package/assets/svgIcons/Icons/Calendar.js +21 -15
- package/assets/svgIcons/Icons/CalendarActive.js +15 -14
- package/assets/svgIcons/Icons/Call.js +20 -14
- package/assets/svgIcons/Icons/CapillaryLogo.js +304 -345
- package/assets/svgIcons/Icons/Capture.js +21 -15
- package/assets/svgIcons/Icons/CarouselNormal.js +18 -18
- package/assets/svgIcons/Icons/CarouselSelected.js +18 -18
- package/assets/svgIcons/Icons/Carrot.js +15 -14
- package/assets/svgIcons/Icons/CartPromotion.js +21 -14
- package/assets/svgIcons/Icons/ChannelPriority.js +44 -43
- package/assets/svgIcons/Icons/Chart.js +21 -15
- package/assets/svgIcons/Icons/ChatBot.js +52 -41
- package/assets/svgIcons/Icons/ChatBubble.js +15 -14
- package/assets/svgIcons/Icons/CheckCircle.js +21 -15
- package/assets/svgIcons/Icons/CheckFilled.js +36 -29
- package/assets/svgIcons/Icons/CheckFilledDefault.js +15 -14
- package/assets/svgIcons/Icons/CheckFilledPlus.js +50 -49
- package/assets/svgIcons/Icons/ChevronDown.js +21 -15
- package/assets/svgIcons/Icons/ChevronLeft.js +21 -15
- package/assets/svgIcons/Icons/ChevronRight.js +21 -15
- package/assets/svgIcons/Icons/ChevronUp.js +21 -15
- package/assets/svgIcons/Icons/CircleDollar.js +23 -17
- package/assets/svgIcons/Icons/Click.js +28 -37
- package/assets/svgIcons/Icons/Clock.js +21 -15
- package/assets/svgIcons/Icons/Close.js +15 -14
- package/assets/svgIcons/Icons/Code.js +21 -15
- package/assets/svgIcons/Icons/Collapse2.js +22 -16
- package/assets/svgIcons/Icons/CollapseIcon.js +22 -16
- package/assets/svgIcons/Icons/Combine.js +26 -23
- package/assets/svgIcons/Icons/CommentMessage.js +21 -15
- package/assets/svgIcons/Icons/Communication.js +15 -14
- package/assets/svgIcons/Icons/Compare.js +22 -16
- package/assets/svgIcons/Icons/Connect.js +21 -15
- package/assets/svgIcons/Icons/Copy.js +21 -15
- package/assets/svgIcons/Icons/CriticalInfo.js +5 -18
- package/assets/svgIcons/Icons/CriticalWarning.js +24 -18
- package/assets/svgIcons/Icons/Data.js +21 -15
- package/assets/svgIcons/Icons/DefaultProfile.js +16 -15
- package/assets/svgIcons/Icons/Delay.js +21 -15
- package/assets/svgIcons/Icons/Delete.js +21 -15
- package/assets/svgIcons/Icons/Desktop.js +28 -37
- package/assets/svgIcons/Icons/Diamond.js +22 -16
- package/assets/svgIcons/Icons/DisLike.js +5 -16
- package/assets/svgIcons/Icons/DisneyHotstar.js +40 -40
- package/assets/svgIcons/Icons/Documentation.js +21 -15
- package/assets/svgIcons/Icons/Dollar.js +21 -15
- package/assets/svgIcons/Icons/DollarBackground.js +50 -57
- package/assets/svgIcons/Icons/Downgrade.js +15 -14
- package/assets/svgIcons/Icons/Download.js +21 -15
- package/assets/svgIcons/Icons/DraftFailed.js +43 -29
- package/assets/svgIcons/Icons/DraftPartiallyFailed.js +43 -29
- package/assets/svgIcons/Icons/Drag.js +21 -15
- package/assets/svgIcons/Icons/Draggable.js +22 -16
- package/assets/svgIcons/Icons/Earth.js +22 -16
- package/assets/svgIcons/Icons/Edit.js +21 -15
- package/assets/svgIcons/Icons/Email.js +9 -35
- package/assets/svgIcons/Icons/EmailFilled.js +42 -57
- package/assets/svgIcons/Icons/EnagementSplit.js +26 -23
- package/assets/svgIcons/Icons/End.js +25 -22
- package/assets/svgIcons/Icons/Enter.js +5 -16
- package/assets/svgIcons/Icons/Entry.js +26 -23
- package/assets/svgIcons/Icons/Error.js +28 -37
- package/assets/svgIcons/Icons/ErrorDot.js +16 -19
- package/assets/svgIcons/Icons/ErrorIndicator.js +40 -50
- package/assets/svgIcons/Icons/Exclude.js +50 -40
- package/assets/svgIcons/Icons/Exit.js +25 -22
- package/assets/svgIcons/Icons/ExitTrigger.js +11 -52
- package/assets/svgIcons/Icons/ExitTriggerFilled.js +11 -52
- package/assets/svgIcons/Icons/Expand2.js +22 -16
- package/assets/svgIcons/Icons/ExpandIcon.js +22 -16
- package/assets/svgIcons/Icons/Expander.js +22 -16
- package/assets/svgIcons/Icons/Extension.js +21 -15
- package/assets/svgIcons/Icons/Eye.js +21 -15
- package/assets/svgIcons/Icons/Facebook.js +28 -37
- package/assets/svgIcons/Icons/FacebookFilled.js +31 -23
- package/assets/svgIcons/Icons/FacebookReach.js +16 -33
- package/assets/svgIcons/Icons/File.js +21 -15
- package/assets/svgIcons/Icons/FileUpload.js +60 -50
- package/assets/svgIcons/Icons/Filled.js +23 -17
- package/assets/svgIcons/Icons/FilledDisLike.js +5 -16
- package/assets/svgIcons/Icons/FilledLike.js +5 -14
- package/assets/svgIcons/Icons/Filter.js +21 -15
- package/assets/svgIcons/Icons/Folder.js +28 -38
- package/assets/svgIcons/Icons/Footwear.js +22 -16
- package/assets/svgIcons/Icons/Forward.js +23 -17
- package/assets/svgIcons/Icons/Ftp.js +19 -18
- package/assets/svgIcons/Icons/FtpConnector.js +29 -17
- package/assets/svgIcons/Icons/Funnel.js +21 -15
- package/assets/svgIcons/Icons/Gallery.js +21 -15
- package/assets/svgIcons/Icons/GalleryIcon.js +5 -14
- package/assets/svgIcons/Icons/Gender.js +22 -16
- package/assets/svgIcons/Icons/Giftvoucher.js +23 -17
- package/assets/svgIcons/Icons/GoogleAd.js +40 -34
- package/assets/svgIcons/Icons/Graph.js +21 -15
- package/assets/svgIcons/Icons/Greetings.js +37 -37
- package/assets/svgIcons/Icons/Group.js +30 -39
- package/assets/svgIcons/Icons/GroupChat.js +21 -15
- package/assets/svgIcons/Icons/Groups.js +21 -15
- package/assets/svgIcons/Icons/GrowthGraph.js +21 -15
- package/assets/svgIcons/Icons/HeadphoneBackground.js +46 -45
- package/assets/svgIcons/Icons/Headphones.js +23 -17
- package/assets/svgIcons/Icons/Heart.js +15 -14
- package/assets/svgIcons/Icons/HeartPlus.js +26 -19
- package/assets/svgIcons/Icons/Help.js +24 -26
- package/assets/svgIcons/Icons/Home.js +23 -17
- package/assets/svgIcons/Icons/IaMascot.js +272 -134
- package/assets/svgIcons/Icons/Image.js +15 -14
- package/assets/svgIcons/Icons/ImageMessageNormal.js +22 -16
- package/assets/svgIcons/Icons/ImageMessageSelected.js +22 -16
- package/assets/svgIcons/Icons/InApp.js +54 -41
- package/assets/svgIcons/Icons/InProgress.js +27 -23
- package/assets/svgIcons/Icons/Info.js +21 -15
- package/assets/svgIcons/Icons/InfoWarning.js +9 -40
- package/assets/svgIcons/Icons/InfoWithError.js +51 -46
- package/assets/svgIcons/Icons/Integrations.js +52 -46
- package/assets/svgIcons/Icons/Intersect.js +24 -22
- package/assets/svgIcons/Icons/Ios.js +15 -14
- package/assets/svgIcons/Icons/JavaScript.js +21 -15
- package/assets/svgIcons/Icons/JoinLink.js +24 -18
- package/assets/svgIcons/Icons/Journey.js +21 -15
- package/assets/svgIcons/Icons/Json.js +35 -23
- package/assets/svgIcons/Icons/JumpIcon.js +22 -16
- package/assets/svgIcons/Icons/Lab.js +21 -15
- package/assets/svgIcons/Icons/Language.js +22 -16
- package/assets/svgIcons/Icons/Launch.js +28 -36
- package/assets/svgIcons/Icons/Leaf.js +22 -16
- package/assets/svgIcons/Icons/Library.js +22 -16
- package/assets/svgIcons/Icons/Lightning.js +15 -15
- package/assets/svgIcons/Icons/Like.js +5 -14
- package/assets/svgIcons/Icons/Line.js +21 -15
- package/assets/svgIcons/Icons/ListActive.js +15 -14
- package/assets/svgIcons/Icons/Location.js +15 -14
- package/assets/svgIcons/Icons/Lock.js +28 -36
- package/assets/svgIcons/Icons/Logout.js +15 -14
- package/assets/svgIcons/Icons/LoveFilled.js +38 -33
- package/assets/svgIcons/Icons/Loyalty.js +21 -15
- package/assets/svgIcons/Icons/LoyaltyBackground.js +50 -57
- package/assets/svgIcons/Icons/Mail.js +21 -15
- package/assets/svgIcons/Icons/Media.js +21 -15
- package/assets/svgIcons/Icons/Megaphone.js +15 -15
- package/assets/svgIcons/Icons/MegaphoneBackground.js +43 -56
- package/assets/svgIcons/Icons/MegaphoneFilled.js +21 -15
- package/assets/svgIcons/Icons/MemberCare.js +21 -15
- package/assets/svgIcons/Icons/Message.js +15 -15
- package/assets/svgIcons/Icons/MessageFilled.js +21 -15
- package/assets/svgIcons/Icons/MessageWithTransform.js +30 -39
- package/assets/svgIcons/Icons/Migrate.js +5 -16
- package/assets/svgIcons/Icons/Minimizer.js +22 -16
- package/assets/svgIcons/Icons/Minus.js +21 -15
- package/assets/svgIcons/Icons/Mobile.js +28 -36
- package/assets/svgIcons/Icons/Models.js +21 -15
- package/assets/svgIcons/Icons/MonitorBackground.js +49 -48
- package/assets/svgIcons/Icons/More.js +21 -15
- package/assets/svgIcons/Icons/MoreApplications.js +21 -15
- package/assets/svgIcons/Icons/Mpush.js +21 -15
- package/assets/svgIcons/Icons/MpushFilled.js +42 -57
- package/assets/svgIcons/Icons/MyLocation.js +25 -27
- package/assets/svgIcons/Icons/NotSent.js +28 -37
- package/assets/svgIcons/Icons/Note.js +24 -18
- package/assets/svgIcons/Icons/NoteTickMaterial.js +21 -15
- package/assets/svgIcons/Icons/NoteWithTick.js +21 -15
- package/assets/svgIcons/Icons/Notepad.js +21 -15
- package/assets/svgIcons/Icons/NotepadMaterial.js +18 -17
- package/assets/svgIcons/Icons/Notifications.js +21 -15
- package/assets/svgIcons/Icons/Nowhere.js +50 -40
- package/assets/svgIcons/Icons/Offer.js +21 -15
- package/assets/svgIcons/Icons/OfferWithColor.js +22 -16
- package/assets/svgIcons/Icons/OnlyIncentives.js +48 -37
- package/assets/svgIcons/Icons/OpenInNew.js +15 -14
- package/assets/svgIcons/Icons/OpenInNewLight.js +21 -15
- package/assets/svgIcons/Icons/Org.js +26 -23
- package/assets/svgIcons/Icons/OrgSettings.js +21 -15
- package/assets/svgIcons/Icons/PartnerProgram.js +5 -14
- package/assets/svgIcons/Icons/Pause.js +21 -15
- package/assets/svgIcons/Icons/Paused.js +24 -18
- package/assets/svgIcons/Icons/Performance.js +21 -15
- package/assets/svgIcons/Icons/Person.js +15 -14
- package/assets/svgIcons/Icons/PersonLove.js +30 -38
- package/assets/svgIcons/Icons/Personlaisation.js +21 -15
- package/assets/svgIcons/Icons/Play.js +21 -15
- package/assets/svgIcons/Icons/Plus.js +21 -15
- package/assets/svgIcons/Icons/Pointer.js +21 -15
- package/assets/svgIcons/Icons/Points.js +23 -17
- package/assets/svgIcons/Icons/PointsV1.js +22 -15
- package/assets/svgIcons/Icons/Premium.js +21 -15
- package/assets/svgIcons/Icons/PremiumColored.js +20 -28
- package/assets/svgIcons/Icons/ProductProfile.js +5 -18
- package/assets/svgIcons/Icons/Programs.js +21 -15
- package/assets/svgIcons/Icons/PromotionProfile.js +5 -14
- package/assets/svgIcons/Icons/RandomSplitBlock.js +20 -13
- package/assets/svgIcons/Icons/RbacLock.js +22 -16
- package/assets/svgIcons/Icons/Rcs.js +31 -41
- package/assets/svgIcons/Icons/Redirection.js +5 -15
- package/assets/svgIcons/Icons/Redis.js +46 -39
- package/assets/svgIcons/Icons/Referal.js +16 -34
- package/assets/svgIcons/Icons/Refresh.js +21 -15
- package/assets/svgIcons/Icons/RefreshCircle.js +24 -18
- package/assets/svgIcons/Icons/Reorder.js +28 -37
- package/assets/svgIcons/Icons/Reply.js +34 -29
- package/assets/svgIcons/Icons/Restore.js +22 -16
- package/assets/svgIcons/Icons/Retry.js +46 -36
- package/assets/svgIcons/Icons/Return.js +15 -14
- package/assets/svgIcons/Icons/Rewards.js +21 -15
- package/assets/svgIcons/Icons/RewardsOutline.js +23 -17
- package/assets/svgIcons/Icons/RichMessageNormal.js +22 -16
- package/assets/svgIcons/Icons/RichMessageSelected.js +22 -16
- package/assets/svgIcons/Icons/RichVideoNormal.js +33 -26
- package/assets/svgIcons/Icons/RichVideoSelected.js +33 -26
- package/assets/svgIcons/Icons/RightLeftArrow.js +22 -16
- package/assets/svgIcons/Icons/RightWrong.js +22 -16
- package/assets/svgIcons/Icons/Scenery.js +21 -15
- package/assets/svgIcons/Icons/Scope.js +30 -39
- package/assets/svgIcons/Icons/Search.js +15 -15
- package/assets/svgIcons/Icons/Send.js +21 -15
- package/assets/svgIcons/Icons/SendFilled.js +24 -21
- package/assets/svgIcons/Icons/Settings.js +21 -15
- package/assets/svgIcons/Icons/ShapeCopy.js +22 -16
- package/assets/svgIcons/Icons/Siren.js +28 -37
- package/assets/svgIcons/Icons/Sitemap.js +22 -16
- package/assets/svgIcons/Icons/SmallLink.js +25 -29
- package/assets/svgIcons/Icons/SmileyMessageNormal.js +26 -33
- package/assets/svgIcons/Icons/SmileyMessageSelected.js +22 -16
- package/assets/svgIcons/Icons/Sms.js +21 -15
- package/assets/svgIcons/Icons/SmsFilled.js +42 -58
- package/assets/svgIcons/Icons/Snapchat.js +41 -30
- package/assets/svgIcons/Icons/Sort.js +21 -15
- package/assets/svgIcons/Icons/SortUp.js +38 -40
- package/assets/svgIcons/Icons/Speaker.js +21 -15
- package/assets/svgIcons/Icons/Split.js +34 -24
- package/assets/svgIcons/Icons/SplitData.js +5 -16
- package/assets/svgIcons/Icons/Star.js +30 -39
- package/assets/svgIcons/Icons/Stop.js +21 -15
- package/assets/svgIcons/Icons/Store.js +22 -16
- package/assets/svgIcons/Icons/StoreTraffic.js +21 -15
- package/assets/svgIcons/Icons/SubtractLeft.js +27 -25
- package/assets/svgIcons/Icons/SubtractRight.js +18 -24
- package/assets/svgIcons/Icons/Sunset.js +24 -18
- package/assets/svgIcons/Icons/Survey.js +21 -15
- package/assets/svgIcons/Icons/SurveyBackground.js +51 -60
- package/assets/svgIcons/Icons/SurveyResponse.js +21 -15
- package/assets/svgIcons/Icons/Swap.js +22 -16
- package/assets/svgIcons/Icons/Sync.js +28 -37
- package/assets/svgIcons/Icons/Tablet.js +28 -37
- package/assets/svgIcons/Icons/Tag.js +15 -14
- package/assets/svgIcons/Icons/Target.js +22 -16
- package/assets/svgIcons/Icons/Task.js +15 -14
- package/assets/svgIcons/Icons/Test.js +20 -14
- package/assets/svgIcons/Icons/TestCheck.js +20 -14
- package/assets/svgIcons/Icons/TestComplete.js +8 -25
- package/assets/svgIcons/Icons/TestRunning.js +8 -23
- package/assets/svgIcons/Icons/TextMessageNormal.js +22 -16
- package/assets/svgIcons/Icons/TextMessageSelected.js +22 -16
- package/assets/svgIcons/Icons/ThreeStarDark.js +40 -32
- package/assets/svgIcons/Icons/ThreeStars.js +43 -43
- package/assets/svgIcons/Icons/Tick.js +15 -14
- package/assets/svgIcons/Icons/TickOutlined.js +24 -18
- package/assets/svgIcons/Icons/Tiktok.js +50 -38
- package/assets/svgIcons/Icons/TimerWarning.js +9 -40
- package/assets/svgIcons/Icons/Tooltip.js +24 -24
- package/assets/svgIcons/Icons/TopXChannel.js +28 -35
- package/assets/svgIcons/Icons/Trigger.js +22 -16
- package/assets/svgIcons/Icons/Trophy.js +11 -32
- package/assets/svgIcons/Icons/Unicode.js +28 -38
- package/assets/svgIcons/Icons/Union.js +18 -24
- package/assets/svgIcons/Icons/Upload.js +21 -15
- package/assets/svgIcons/Icons/User.js +21 -15
- package/assets/svgIcons/Icons/UserAttributechange.js +38 -41
- package/assets/svgIcons/Icons/UserCopy.js +39 -46
- package/assets/svgIcons/Icons/Viber.js +24 -30
- package/assets/svgIcons/Icons/Video.js +21 -15
- package/assets/svgIcons/Icons/View.js +15 -14
- package/assets/svgIcons/Icons/WaitEvent.js +53 -64
- package/assets/svgIcons/Icons/WalletBackground.js +52 -58
- package/assets/svgIcons/Icons/Warning.js +28 -37
- package/assets/svgIcons/Icons/WarningCircle.js +24 -18
- package/assets/svgIcons/Icons/WarningCircleFilled.js +33 -21
- package/assets/svgIcons/Icons/Webhook.js +20 -13
- package/assets/svgIcons/Icons/Wechat.js +21 -15
- package/assets/svgIcons/Icons/WechatFilled.js +42 -57
- package/assets/svgIcons/Icons/WechatOutline.js +30 -38
- package/assets/svgIcons/Icons/Whatsapp.js +21 -15
- package/assets/svgIcons/Icons/XEngage.js +35 -58
- package/assets/svgIcons/Icons/YetToStart.js +22 -16
- package/assets/svgIcons/Icons/Zalo.js +41 -33
- package/assets/svgIcons/Icons/abTesting.js +9 -36
- package/assets/svgIcons/Icons/index.js +4 -1
- package/assets/svgIcons/Icons/percentCircle.js +7 -15
- package/assets/svgIcons/Icons/sixDots.js +9 -32
- package/assets/svgIcons/component.js +950 -626
- package/assets/svgIcons/index.js +650 -324
- package/en.json +1 -296
- package/index.js +256 -129
- package/package.json +17 -13
- package/service/api.js +12 -22
- package/service/api.types.js +1 -1
- package/service/index.js +4 -1
- package/styled/index.d.ts +2 -1
- package/styled/index.d.ts.map +1 -1
- package/styled/index.js +149 -3
- package/styled/variables.d.ts +1 -0
- package/styled/variables.d.ts.map +1 -1
- package/styled/variables.js +149 -3
- package/styles/_variables.d.ts +155 -0
- package/styles/_variables.d.ts.map +1 -1
- package/styles/_variables.js +467 -197
- package/styles/datePickerCommon.css +77 -0
- package/styles/datePickerCommon.scss +32 -32
- package/translations/en.js +309 -306
- package/translations/index.js +6 -3
- package/translations/zh.js +43 -40
- package/utils/compileHandlebars.js +45 -55
- package/utils/dayjs.js +125 -287
- package/utils/dayjs.types.js +1 -1
- package/utils/fonts.js +58 -134
- package/utils/getCapThemeConfig.js +196 -250
- package/utils/index.js +14 -57
- package/utils/logDeprecationWarning.js +10 -6
- package/utils/styles.js +1 -21
- package/CapActionBar/tests/CapActionBar.mockData.js +0 -114
- package/CapActionBar/tests/CapActionBar.test.js +0 -353
- package/CapAdvancedIcon/tests/index.test.js +0 -550
- package/CapAdvancedIcon/tests/mockData.js +0 -55
- package/CapAlert/tests/CapAlert.test.js +0 -467
- package/CapAppNotEnabled/tests/CapAppNotEnabled.mockData.js +0 -10
- package/CapAppNotEnabled/tests/CapAppNotEnabled.test.js +0 -178
- package/CapAskAira/AudienceFilterBot/tests/index.test.js +0 -1193
- package/CapAskAira/CapAiMediaGeneration/test/api.test.js +0 -43
- package/CapAskAira/CapAiMediaGeneration/test/index.test.js +0 -204
- package/CapAskAira/CapAiMediaGeneration/test/reducer.test.js +0 -33
- package/CapAskAira/CapAiMediaGeneration/test/saga.test.js +0 -59
- package/CapAskAira/CapAiMediaGeneration/test/selector.test.js +0 -73
- package/CapAskAira/ConfigurationBot/test/PromptAttachmentButton.test.js +0 -96
- package/CapAskAira/ConfigurationBot/test/index.test.js +0 -357
- package/CapAskAira/ConfigurationBot/test/util.test.js +0 -32
- package/CapAskAira/ContentGenerationBot/tests/index.test.js +0 -158
- package/CapAskAira/ContentGenerationBot/tests/jsonAssembler.test.js +0 -96
- package/CapAskAira/DocumentationBot/test/UtilComponents.test.js +0 -113
- package/CapAskAira/DocumentationBot/test/index.test.js +0 -153
- package/CapAskAira/DocumentationChatBot/test/api.test.js +0 -49
- package/CapAskAira/DocumentationChatBot/test/index.test.js +0 -164
- package/CapAskAira/DocumentationChatBot/test/reducer.test.js +0 -28
- package/CapAskAira/DocumentationChatBot/test/saga.test.js +0 -59
- package/CapAskAira/DocumentationChatBot/test/selector.test.js +0 -73
- package/CapAskAira/RuleGenerationBot/tests/actions.test.js +0 -40
- package/CapAskAira/RuleGenerationBot/tests/api.test.js +0 -95
- package/CapAskAira/RuleGenerationBot/tests/index.test.js +0 -136
- package/CapAskAira/RuleGenerationBot/tests/reducer.test.js +0 -137
- package/CapAskAira/RuleGenerationBot/tests/saga.test.js +0 -110
- package/CapAskAira/RuleGenerationBot/tests/selector.test.js +0 -82
- package/CapAskAira/RuleSummarizationBot/tests/actions.test.js +0 -82
- package/CapAskAira/RuleSummarizationBot/tests/api.test.js +0 -147
- package/CapAskAira/RuleSummarizationBot/tests/index.test.js +0 -134
- package/CapAskAira/RuleSummarizationBot/tests/mockData.js +0 -54
- package/CapAskAira/RuleSummarizationBot/tests/reducer.test.js +0 -158
- package/CapAskAira/RuleSummarizationBot/tests/saga.test.js +0 -206
- package/CapAskAira/RuleSummarizationBot/tests/selector.test.js +0 -82
- package/CapAskAira/UtilComponents/tests/AiraContainer.test.js +0 -168
- package/CapAskAira/UtilComponents/tests/ErrorBar.test.js +0 -48
- package/CapAskAira/UtilComponents/tests/MultiLineInpuxBox.test.js +0 -158
- package/CapAskAira/UtilComponents/tests/Notification.test.js +0 -44
- package/CapAskAira/UtilComponents/tests/Popup.test.js +0 -176
- package/CapAskAira/UtilComponents/tests/Tooltip.test.js +0 -32
- package/CapAskAira/tests/CapAskAira.mockData.js +0 -25
- package/CapAskAira/tests/CapAskAira.test.js +0 -91
- package/CapAskAira/tests/util.test.js +0 -124
- package/CapBanner/tests/CapBanner.mockData.js +0 -54
- package/CapBanner/tests/CapBanner.test.js +0 -64
- package/CapBlock/tests/index.test.js +0 -279
- package/CapBorderedBox/tests/CapBorderedBox.mockData.js +0 -95
- package/CapBorderedBox/tests/index.test.js +0 -314
- package/CapButton/tests/CapButton.mockData.js +0 -19
- package/CapButton/tests/CapButton.test.js +0 -664
- package/CapButton/tests/index.test.js +0 -201
- package/CapCSVFileUploader/tests/CapCSVFileUploader.mockData.js +0 -99
- package/CapCSVFileUploader/tests/CapCSVFileUploader.test.js +0 -458
- package/CapCalendarDatePicker/tests/index.test.js +0 -91
- package/CapCard/tests/CapCard.mockData.js +0 -88
- package/CapCard/tests/index.test.js +0 -772
- package/CapCardBox/tests/CapCardBox.mockData.js +0 -101
- package/CapCardBox/tests/CapCardBox.test.js +0 -543
- package/CapCarousel/tests/CapCarousel.mockData.js +0 -62
- package/CapCarousel/tests/CapCarousel.test.js +0 -743
- package/CapCheckbox/tests/CapCheckbox.test.js +0 -1012
- package/CapCheckbox/tests/index.test.js +0 -143
- package/CapCollapsibleNavbar/tests/index.test.js +0 -54
- package/CapColorPicker/tests/CapColorPicker.mockData.js +0 -21
- package/CapColorPicker/tests/CapColorPicker.test.js +0 -344
- package/CapColoredTag/tests/CapColoredTag.mockData.js +0 -74
- package/CapColoredTag/tests/CapColoredTag.test.js +0 -323
- package/CapColumn/tests/index.test.js +0 -92
- package/CapCondition/tests/ConditionCustomField.test.js +0 -333
- package/CapCondition/tests/ConditionDate.test.js +0 -1982
- package/CapCondition/tests/ConditionMultiSelect.test.js +0 -48
- package/CapCondition/tests/ConditionMultiSelectTree.test.js +0 -49
- package/CapCondition/tests/helper.test.js +0 -686
- package/CapCondition/tests/index.test.js +0 -1116
- package/CapConditionPreview/tests/index.test.js +0 -1501
- package/CapConditionPreview/tests/mockData.js +0 -42
- package/CapCustomCard/tests/CapCustomCard.mockData.js +0 -309
- package/CapCustomCard/tests/CapCustomCard.test.js +0 -1079
- package/CapCustomCarousel/tests/index.test.js +0 -102
- package/CapCustomCheckboxList/tests/CapCustomCheckboxList.mockData.js +0 -139
- package/CapCustomCheckboxList/tests/CapCustomCheckboxList.test.js +0 -547
- package/CapCustomList/tests/CapCustomList.mockData.js +0 -62
- package/CapCustomList/tests/CapCustomList.test.js +0 -264
- package/CapCustomSelect/tests/index.test.js +0 -509
- package/CapDatePicker/tests/index.test.js +0 -421
- package/CapDateRangePicker/tests/CapDateRangePicker.compatibility.test.js +0 -292
- package/CapDateRangePicker/tests/CapDateRangePicker.mockData.js +0 -17
- package/CapDateRangePicker/tests/CapDateRangePicker.test.js +0 -287
- package/CapDateRangePicker/tests/CapDateRangePicker.testUtils.js +0 -26
- package/CapDateTimePicker/tests/index.test.js +0 -244
- package/CapDateTimeRangePicker/tests/CapDateTimeRangePicker.test.js +0 -405
- package/CapDateTimeRangePicker/tests/index.test.js +0 -1557
- package/CapDivider/tests/CapDivider.mockData.js +0 -158
- package/CapDivider/tests/index.test.js +0 -618
- package/CapDnDGraph/tests/utils.test.js +0 -72
- package/CapDndGraphSidebar/tests/index.test.js +0 -139
- package/CapDndGraphSidebar/tests/sideBarIcon.test.js +0 -77
- package/CapDragReorder/tests/index.test.js +0 -47
- package/CapDrawer/tests/CapDrawer.mockData.js +0 -135
- package/CapDrawer/tests/CapDrawer.test.js +0 -313
- package/CapDropdown/tests/CapDropdown.mockData.js +0 -89
- package/CapDropdown/tests/CapDropdown.test.js +0 -1134
- package/CapDropdown/tests/index.test.js +0 -154
- package/CapEmptyDivWithBorder/tests/CapEmptyDivWithBorder.mockData.js +0 -92
- package/CapEmptyDivWithBorder/tests/CapEmptyDivWithBorder.test.js +0 -446
- package/CapError/tests/CapError.mockData.js +0 -45
- package/CapError/tests/index.test.js +0 -536
- package/CapErrorBoundary/tests/CapErrorBoundary.mockData.js +0 -46
- package/CapErrorBoundary/tests/CapErrorBoundary.test.js +0 -493
- package/CapErrorStateIllustration/tests/CapErrorStateIllustration.mockData.js +0 -58
- package/CapErrorStateIllustration/tests/CapErrorStateIllustration.test.js +0 -294
- package/CapEventCalendar/tests/CalendarCanvas.test.js +0 -235
- package/CapEventCalendar/tests/CalendarCanvasUtils.test.js +0 -137
- package/CapEventCalendar/tests/CapEventCalendar.test.js +0 -123
- package/CapEventCalendar/tests/utils.test.js +0 -14
- package/CapExpressionEditor/js/fixGrammar.test.js +0 -221
- package/CapExpressionEditor/js/pickers.test.js +0 -153
- package/CapExpressionEditor/tests/CapExpressionEditor.mockData.js +0 -24
- package/CapExpressionEditor/tests/CapExpressionEditor.test.js +0 -354
- package/CapForm/tests/CapForm.mockData.js +0 -94
- package/CapForm/tests/CapForm.test.js +0 -684
- package/CapForm/tests/index.test.js +0 -118
- package/CapFormItem/tests/CapFormItem.mockData.js +0 -63
- package/CapFormItem/tests/index.test.js +0 -649
- package/CapGraph/tests/CapGraph.mockData.js +0 -45
- package/CapGraph/tests/index.test.js +0 -119
- package/CapHamburgerMenu/tests/CapHamburgerMenu.mockData.js +0 -123
- package/CapHamburgerMenu/tests/index.test.js +0 -657
- package/CapHeader/tests/index.test.js +0 -334
- package/CapHeading/tests/CapHeading.mockData.js +0 -72
- package/CapHeading/tests/CapHeading.test.js +0 -677
- package/CapHeading/tests/index.test.js +0 -657
- package/CapHierarchyComponent/tests/index.test.js +0 -84
- package/CapIcon/tests/index.test.js +0 -366
- package/CapIllustration/tests/CapIllustration.mockData.js +0 -74
- package/CapIllustration/tests/index.test.js +0 -244
- package/CapImage/tests/CapImage.mockData.js +0 -54
- package/CapImage/tests/index.test.js +0 -234
- package/CapImportMFEComponent/tests/CapImportMFEComponent.mockData.js +0 -61
- package/CapImportMFEComponent/tests/CapImportMFEComponent.test.js +0 -64
- package/CapInfoNote/tests/CapInfoNote.mockData.js +0 -50
- package/CapInfoNote/tests/index.test.js +0 -379
- package/CapInput/tests/CapInput.mockData.js +0 -90
- package/CapInput/tests/CapInput.test.js +0 -796
- package/CapInput/tests/Number.test.js +0 -139
- package/CapInput/tests/Search.test.js +0 -133
- package/CapInput/tests/TextArea.test.js +0 -152
- package/CapInput/tests/index.test.js +0 -149
- package/CapInput/tests/messages.test.js +0 -33
- package/CapLabel/tests/CapLabel.mockData.js +0 -74
- package/CapLabel/tests/CapLabel.test.js +0 -621
- package/CapLabel/tests/index.test.js +0 -194
- package/CapLanguageProvider/index.d.js +0 -1
- package/CapLanguageProvider/tests/CapLanguageProvider.mockData.js +0 -52
- package/CapLanguageProvider/tests/CapLanguageProvider.test.js +0 -405
- package/CapLanguageProvider/tests/CapLanguageProvider.testHelpers.js +0 -61
- package/CapLanguageProvider/tests/CapLanguageProvider.useCases.test.js +0 -350
- package/CapLanguageProvider/tests/actions.test.js +0 -104
- package/CapLanguageProvider/tests/index.test.js +0 -164
- package/CapLanguageProvider/tests/locale.test.js +0 -20
- package/CapLanguageProvider/tests/reducer.test.js +0 -187
- package/CapLanguageProvider/tests/saga.test.js +0 -174
- package/CapLanguageProvider/tests/selector.test.js +0 -122
- package/CapLevelGraphRenderer/tests/CapLevelGraphRenderer.mockData.js +0 -182
- package/CapLevelGraphRenderer/tests/CapLevelGraphRenderer.test.js +0 -522
- package/CapLevelGraphRenderer/tests/Tooltip.test.js +0 -123
- package/CapLink/tests/CapLink.mockData.js +0 -65
- package/CapLink/tests/index.test.js +0 -141
- package/CapList/tests/CapList.mockData.js +0 -33
- package/CapList/tests/CapList.test.js +0 -657
- package/CapListLayout/tests/CapListLayout.mockData.js +0 -43
- package/CapListLayout/tests/CapListLayout.test.js +0 -50
- package/CapLogin/tests/CapLogin.mockData.js +0 -55
- package/CapLogin/tests/CapLogin.test.js +0 -194
- package/CapMediaPreview/tests/index.test.js +0 -127
- package/CapMediaPreview/tests/mockData.js +0 -17
- package/CapMenu/tests/CapMenu.mockData.js +0 -132
- package/CapMenu/tests/CapMenu.test.js +0 -454
- package/CapMenu/tests/index.test.js +0 -171
- package/CapMobileDatePicker/tests/index.test.js +0 -11
- package/CapModal/tests/CapModal.mockData.js +0 -62
- package/CapModal/tests/index.test.js +0 -456
- package/CapMultiSelect/tests/CapMultiSelect.mockData.js +0 -44
- package/CapMultiSelect/tests/index.test.js +0 -219
- package/CapMultiSelectDatePicker/tests/index.test.js +0 -23
- package/CapMultiSelectWithTree/tests/index.test.js +0 -422
- package/CapMultiplePath/tests/index.test.js +0 -382
- package/CapNavigation/tests/CapNavigation.mockData.js +0 -96
- package/CapNavigation/tests/CapNavigation.test.js +0 -498
- package/CapNavigation/tests/index.test.js +0 -229
- package/CapNotification/tests/CapNotification.mockData.js +0 -35
- package/CapNotification/tests/index.test.js +0 -137
- package/CapNotificationDropdown/tests/CapNotificationDropdown.mockData.js +0 -121
- package/CapNotificationDropdown/tests/CapNotificationDropdown.test.js +0 -344
- package/CapPopover/tests/CapPopover.mockData.js +0 -35
- package/CapPopover/tests/index.test.js +0 -165
- package/CapPopoverTree/tests/index.test.js +0 -119
- package/CapPopoverTree/tests/mockData.js +0 -37
- package/CapProgress/tests/CapProgress.mockData.js +0 -121
- package/CapProgress/tests/index.test.js +0 -216
- package/CapRadio/tests/index.test.js +0 -159
- package/CapRadioButton/tests/CapRadioButton.mockData.js +0 -44
- package/CapRadioButton/tests/index.test.js +0 -494
- package/CapRadioCard/tests/CapRadioCard.mockData.js +0 -116
- package/CapRadioCard/tests/index.test.js +0 -148
- package/CapRadioGroup/tests/CapRadioGroup.mockData.js +0 -117
- package/CapRadioGroup/tests/index.test.js +0 -391
- package/CapReorderComponent/tests/CapReorderComponent.mockData.js +0 -48
- package/CapReorderComponent/tests/index.test.js +0 -841
- package/CapRoadMap/tests/CapRoadMap.mockData.js +0 -74
- package/CapRoadMap/tests/CapRoadMap.test.js +0 -159
- package/CapRow/tests/index.test.js +0 -383
- package/CapSKUUploader/tests/CapSKUUploader.mockData.js +0 -106
- package/CapSKUUploader/tests/CapSKUUploader.test.js +0 -414
- package/CapSecondaryTopBar/tests/CapSecondaryTopBar.mockData.js +0 -144
- package/CapSecondaryTopBar/tests/index.test.js +0 -148
- package/CapSelect/tests/CapSelect.mockData.js +0 -61
- package/CapSelect/tests/index.test.js +0 -447
- package/CapSelectFilter/tests/CapSelectFilter.mockData.js +0 -40
- package/CapSelectFilter/tests/index.test.js +0 -330
- package/CapShape/tests/CapShape.mockData.js +0 -36
- package/CapShape/tests/index.test.js +0 -482
- package/CapSideBar/tests/CapSideBar.mockData.js +0 -209
- package/CapSideBar/tests/MenuSearch.test.js +0 -304
- package/CapSideBar/tests/index.test.js +0 -324
- package/CapSkeleton/tests/index.test.js +0 -128
- package/CapSlideBox/tests/CapSlideBox.mockData.js +0 -65
- package/CapSlideBox/tests/CapSlideBox.test.js +0 -494
- package/CapSlider/tests/CapSlider.mockData.js +0 -35
- package/CapSlider/tests/index.test.js +0 -428
- package/CapSnackBar/tests/CapSnackBar.mockData.js +0 -51
- package/CapSnackBar/tests/CapSnackBar.test.js +0 -364
- package/CapSomethingWentWrong/tests/CapSomethingWentWrong.mockData.js +0 -27
- package/CapSomethingWentWrong/tests/CapSomethingWentWrong.test.js +0 -87
- package/CapSpin/tests/index.test.js +0 -113
- package/CapSplit/tests/index.test.js +0 -80
- package/CapSplit/tests/mockData.js +0 -62
- package/CapStaticTemplates/tests/index.test.js +0 -119
- package/CapStaticTemplates/tests/mockData.js +0 -39
- package/CapStatisticCard/tests/CapStatisticCard.mockData.js +0 -26
- package/CapStatisticCard/tests/CapStatisticCard.test.js +0 -104
- package/CapStatus/tests/CapStatus.mockData.js +0 -56
- package/CapStatus/tests/CapStatus.test.js +0 -298
- package/CapSteps/tests/CapSteps.mockData.js +0 -71
- package/CapSteps/tests/index.test.js +0 -157
- package/CapStepsAccordian/tests/CapStepsAccordian.mockData.js +0 -145
- package/CapStepsAccordian/tests/CapStepsAccordian.test.js +0 -587
- package/CapStepsAccordian/tests/index.test.js +0 -43
- package/CapSupportVideosWrapper/tests/ResizablePIP.test.js +0 -460
- package/CapSupportVideosWrapper/tests/index.test.js +0 -148
- package/CapSupportVideosWrapper/tests/utils.test.js +0 -40
- package/CapSwitch/tests/index.test.js +0 -119
- package/CapTab/tests/CapTab.mockData.js +0 -89
- package/CapTab/tests/CapTab.test.js +0 -1168
- package/CapTab/tests/index.test.js +0 -223
- package/CapTabV3/tests/CapTabV3.mockData.js +0 -190
- package/CapTabV3/tests/CapTabV3.test.js +0 -586
- package/CapTabV3/tests/index.test.js +0 -29
- package/CapTable/tests/CapTable.mockData.js +0 -49
- package/CapTable/tests/CapTable.test.js +0 -622
- package/CapTable/tests/index.test.js +0 -331
- package/CapTable/tests/loadable.test.js +0 -35
- package/CapTag/tests/CapTag.mockData.js +0 -22
- package/CapTag/tests/index.test.js +0 -67
- package/CapTagDropdown/tests/index.test.js +0 -236
- package/CapTimePicker/tests/CapTimePicker.mockData.js +0 -54
- package/CapTimePicker/tests/index.test.js +0 -133
- package/CapTimeline/tests/CapTimelineCard.test.js +0 -137
- package/CapTimeline/tests/CapTimelinePanesWrapper.test.js +0 -78
- package/CapTimeline/tests/index.test.js +0 -47
- package/CapTimelineNested/tests/CapTimelineCard.test.js +0 -132
- package/CapTimelineNested/tests/CapTimelinePanesWrapper.test.js +0 -52
- package/CapTimelineNested/tests/NestedCard.test.js +0 -56
- package/CapTimelineNested/tests/NestedCardParent.test.js +0 -65
- package/CapTimelineNested/tests/index.test.js +0 -64
- package/CapTimelineNested/tests/mockData.js +0 -137
- package/CapTooltip/tests/index.test.js +0 -287
- package/CapTooltipWithInfo/tests/CapTooltipWithInfo.mockData.js +0 -76
- package/CapTooltipWithInfo/tests/index.test.js +0 -496
- package/CapTopBar/tests/index.test.js +0 -635
- package/CapTopBar/tests/utils.test.js +0 -183
- package/CapTree/tests/CapTree.mockData.js +0 -81
- package/CapTree/tests/CapTree.test.js +0 -544
- package/CapTreeSelect/tests/CapTreeSelect.mockData.js +0 -131
- package/CapTreeSelect/tests/index.test.js +0 -351
- package/CapTreeView/tests/index.test.js +0 -72
- package/CapTruncateList/tests/CapTruncateList.mockData.js +0 -8
- package/CapTruncateList/tests/CapTruncateList.test.js +0 -250
- package/CapUnifiedSelect/tests/index.test.js +0 -2988
- package/CapUploader/tests/CapUploader.mockData.js +0 -139
- package/CapUploader/tests/CapUploader.test.js +0 -449
- package/CapUserProfile/tests/CapUserProfile.mockData.js +0 -60
- package/CapUserProfile/tests/CapUserProfile.test.js +0 -421
- package/CapUserProfile/tests/UserProfileTab.test.js +0 -308
- package/CapUserProfile/tests/index.test.js +0 -122
- package/CapUserProfile/tests/utils.test.js +0 -362
- package/CapVerticalGroupTable/tests/index.test.js +0 -70
- package/CapVirtualList/tests/index.test.js +0 -94
- package/CapVirtualSelect/tests/index.test.js +0 -211
- package/CapVirtualSelect/tests/mockData.js +0 -51
- package/CapVirtualSelect/tests/reducer.test.js +0 -266
- package/CapVirtualSelect/tests/saga.test.js +0 -256
- package/CapVirtualSelect/tests/selector.test.js +0 -73
- package/CapVirtualSelect/tests/utils.test.js +0 -42
- package/LocaleHoc/tests/index.test.js +0 -41
- package/assets/svgIcons/Icons/tests/icons.test.js +0 -30
- package/assets/svgIcons/index.d.js +0 -0
- package/assets/svgIcons/tests/component.test.js +0 -252
- package/service/tests/api.test.js +0 -88
- package/styles.d.js +0 -0
- package/translations/en.d.js +0 -1
- package/utils/fonts.test.js +0 -84
- package/utils/tests/dayjs.test.js +0 -1341
|
@@ -1,1982 +0,0 @@
|
|
|
1
|
-
var _excluded = ["options", "value", "onChange", "placeholder"],
|
|
2
|
-
_excluded2 = ["value", "onChange", "placeholder", "suffix"],
|
|
3
|
-
_excluded3 = ["children"],
|
|
4
|
-
_excluded4 = ["value", "onChange", "placeholder", "disabledDate"],
|
|
5
|
-
_excluded5 = ["children", "spinning", "tip"];
|
|
6
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
7
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
8
|
-
import '@testing-library/jest-dom';
|
|
9
|
-
import { fireEvent, render, screen } from '@testing-library/react';
|
|
10
|
-
import React from 'react';
|
|
11
|
-
import { IntlProvider } from 'react-intl';
|
|
12
|
-
import ConditionDate from "../ConditionDate";
|
|
13
|
-
import { IS_BEFORE_DAYS, IS_AFTER_DAYS, IS_INBETWEEN_DATES, ENTRY_TRIGGER_EVENT_ATTRIBUTE, THE_VALUE, ENTRY_TRIGGER, WAIT_TILL_EVENT, USER_EVENT, WAIT_TILL_EVENT_TYPE, MINUS_TIME, PLUS_TIME, REQUEST, IS_EXACT_DATE } from "../constants";
|
|
14
|
-
|
|
15
|
-
// Mock the helper function
|
|
16
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
-
jest.mock("../helper", () => ({
|
|
18
|
-
getEventContextComponent: jest.fn(() => /*#__PURE__*/_jsx("div", {
|
|
19
|
-
"data-testid": "event-context-component",
|
|
20
|
-
children: "Event Context Component"
|
|
21
|
-
}))
|
|
22
|
-
}));
|
|
23
|
-
|
|
24
|
-
// Mock the components
|
|
25
|
-
jest.mock("../../CapSelect", () => {
|
|
26
|
-
return function MockCapSelect(_ref) {
|
|
27
|
-
var {
|
|
28
|
-
options,
|
|
29
|
-
value,
|
|
30
|
-
onChange: _onChange
|
|
31
|
-
} = _ref,
|
|
32
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
33
|
-
return /*#__PURE__*/_jsx("select", _extends({
|
|
34
|
-
"data-testid": "cap-select",
|
|
35
|
-
value: value || '',
|
|
36
|
-
onChange: e => _onChange && _onChange(e.target.value)
|
|
37
|
-
}, props, {
|
|
38
|
-
children: options == null ? void 0 : options.map(option => /*#__PURE__*/_jsx("option", {
|
|
39
|
-
value: option.value,
|
|
40
|
-
children: option.label
|
|
41
|
-
}, option.key || option.value))
|
|
42
|
-
}));
|
|
43
|
-
};
|
|
44
|
-
});
|
|
45
|
-
jest.mock("../../CapInput", () => {
|
|
46
|
-
return function MockCapInput(_ref2) {
|
|
47
|
-
var {
|
|
48
|
-
value,
|
|
49
|
-
onChange,
|
|
50
|
-
placeholder,
|
|
51
|
-
suffix
|
|
52
|
-
} = _ref2,
|
|
53
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
54
|
-
return /*#__PURE__*/_jsxs("div", {
|
|
55
|
-
children: [/*#__PURE__*/_jsx("input", _extends({
|
|
56
|
-
"data-testid": "cap-input",
|
|
57
|
-
value: value || '',
|
|
58
|
-
onChange: onChange,
|
|
59
|
-
placeholder: placeholder
|
|
60
|
-
}, props)), suffix && /*#__PURE__*/_jsx("span", {
|
|
61
|
-
"data-testid": "input-suffix",
|
|
62
|
-
children: suffix
|
|
63
|
-
})]
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
|
-
});
|
|
67
|
-
jest.mock("../../CapLabel", () => {
|
|
68
|
-
return function MockCapLabel(_ref3) {
|
|
69
|
-
var {
|
|
70
|
-
children
|
|
71
|
-
} = _ref3,
|
|
72
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
|
|
73
|
-
return /*#__PURE__*/_jsx("label", _extends({
|
|
74
|
-
"data-testid": "cap-label"
|
|
75
|
-
}, props, {
|
|
76
|
-
children: children
|
|
77
|
-
}));
|
|
78
|
-
};
|
|
79
|
-
});
|
|
80
|
-
jest.mock("../../CapDatePicker", () => {
|
|
81
|
-
return function MockCapDatePicker(_ref4) {
|
|
82
|
-
var {
|
|
83
|
-
value,
|
|
84
|
-
onChange: _onChange2,
|
|
85
|
-
placeholder
|
|
86
|
-
} = _ref4,
|
|
87
|
-
props = _objectWithoutPropertiesLoose(_ref4, _excluded4);
|
|
88
|
-
var moment = require('moment');
|
|
89
|
-
return /*#__PURE__*/_jsx("input", _extends({
|
|
90
|
-
"data-testid": "cap-date-picker",
|
|
91
|
-
type: "date",
|
|
92
|
-
value: value ? moment(value).format('YYYY-MM-DD') : '',
|
|
93
|
-
onChange: e => _onChange2 && _onChange2(moment(e.target.value).toDate()),
|
|
94
|
-
placeholder: placeholder
|
|
95
|
-
}, props));
|
|
96
|
-
};
|
|
97
|
-
});
|
|
98
|
-
jest.mock("../../CapSpin", () => {
|
|
99
|
-
return function MockCapSpin(_ref5) {
|
|
100
|
-
var {
|
|
101
|
-
children,
|
|
102
|
-
spinning,
|
|
103
|
-
tip
|
|
104
|
-
} = _ref5,
|
|
105
|
-
_props = _objectWithoutPropertiesLoose(_ref5, _excluded5);
|
|
106
|
-
if (spinning) {
|
|
107
|
-
return /*#__PURE__*/_jsx("div", {
|
|
108
|
-
"data-testid": "cap-spin",
|
|
109
|
-
"data-spinning": "true",
|
|
110
|
-
"data-tip": tip,
|
|
111
|
-
children: children
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
return /*#__PURE__*/_jsx("div", {
|
|
115
|
-
"data-testid": "cap-spin",
|
|
116
|
-
"data-spinning": "false",
|
|
117
|
-
children: children
|
|
118
|
-
});
|
|
119
|
-
};
|
|
120
|
-
});
|
|
121
|
-
var renderComponent = function renderComponent(props) {
|
|
122
|
-
if (props === void 0) {
|
|
123
|
-
props = {};
|
|
124
|
-
}
|
|
125
|
-
var defaultProps = {
|
|
126
|
-
conditionExpressionOptions: {
|
|
127
|
-
IS_EXACT_DATE: {
|
|
128
|
-
text: 'On'
|
|
129
|
-
},
|
|
130
|
-
IS_BEFORE_DATE: {
|
|
131
|
-
text: 'Before'
|
|
132
|
-
},
|
|
133
|
-
IS_AFTER_DATE: {
|
|
134
|
-
text: 'After'
|
|
135
|
-
},
|
|
136
|
-
IS_BEFORE_DAYS: {
|
|
137
|
-
text: 'X Days Before'
|
|
138
|
-
},
|
|
139
|
-
IS_AFTER_DAYS: {
|
|
140
|
-
text: 'X Days After'
|
|
141
|
-
},
|
|
142
|
-
IS_INBETWEEN_DATES: {
|
|
143
|
-
text: 'Between'
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
conditionExpression: {
|
|
147
|
-
operator: null,
|
|
148
|
-
operand: null,
|
|
149
|
-
dateTypeValues: {}
|
|
150
|
-
},
|
|
151
|
-
setConditionExpression: jest.fn(),
|
|
152
|
-
onMsg: 'On',
|
|
153
|
-
beforeMsg: 'Before',
|
|
154
|
-
afterMsg: 'After',
|
|
155
|
-
xDaysBeforeMsg: 'X Days Before',
|
|
156
|
-
xDaysAfterMsg: 'X Days After',
|
|
157
|
-
betweenMsg: 'Between',
|
|
158
|
-
andMsg: 'And',
|
|
159
|
-
specificDateLabel: 'specific date',
|
|
160
|
-
eventDateAttributeLabel: 'Event date attribute',
|
|
161
|
-
entryTriggerLabel: 'Entry trigger',
|
|
162
|
-
waitTillEventLabel: 'Wait till event',
|
|
163
|
-
andLabel: 'and',
|
|
164
|
-
beforeLabel: 'before',
|
|
165
|
-
afterLabel: 'after',
|
|
166
|
-
daysSuffix: 'days',
|
|
167
|
-
loadingTip: 'Loading...',
|
|
168
|
-
specificDateToolTip: 'Select a specific date',
|
|
169
|
-
shouldRemoveOperator: false,
|
|
170
|
-
removeOperatorsList: [],
|
|
171
|
-
eventContextDataOptions: [],
|
|
172
|
-
useEntryTriggerEventAttribute: false,
|
|
173
|
-
eventContextSelectionValue: THE_VALUE,
|
|
174
|
-
setEventContextSelectionValue: jest.fn(),
|
|
175
|
-
eventContextData: {},
|
|
176
|
-
setEventContextData: jest.fn(),
|
|
177
|
-
getEngagementBlocksBeforeWaitTill: jest.fn(),
|
|
178
|
-
availableEngagementBlocks: {},
|
|
179
|
-
getProfilesDetailsByBlockData: jest.fn(),
|
|
180
|
-
getGrammarDataBasedOnEvent: jest.fn(),
|
|
181
|
-
dateEventGrammar: {},
|
|
182
|
-
eventContextUniqueId: null,
|
|
183
|
-
events: [],
|
|
184
|
-
getEventNameByType: jest.fn((events, eventType) => "Event: " + eventType)
|
|
185
|
-
};
|
|
186
|
-
return render(/*#__PURE__*/_jsx(IntlProvider, {
|
|
187
|
-
locale: "en-US",
|
|
188
|
-
messages: {},
|
|
189
|
-
children: /*#__PURE__*/_jsx(ConditionDate, _extends({}, defaultProps, props))
|
|
190
|
-
}));
|
|
191
|
-
};
|
|
192
|
-
describe('ConditionDate Component', () => {
|
|
193
|
-
beforeEach(() => {
|
|
194
|
-
jest.clearAllMocks();
|
|
195
|
-
});
|
|
196
|
-
describe('Component Rendering', () => {
|
|
197
|
-
it('should render the component with default props', () => {
|
|
198
|
-
renderComponent();
|
|
199
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
200
|
-
expect(screen.getByTestId('cap-select')).toBeInTheDocument();
|
|
201
|
-
});
|
|
202
|
-
it('should render with loading state when dateEventGrammar is loading', () => {
|
|
203
|
-
renderComponent({
|
|
204
|
-
dateEventGrammar: {
|
|
205
|
-
getGrammarStatus: REQUEST
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
|
-
var spinElement = screen.getByTestId('cap-spin');
|
|
209
|
-
expect(spinElement).toHaveAttribute('data-spinning', 'true');
|
|
210
|
-
expect(spinElement).toHaveAttribute('data-tip', 'Loading...');
|
|
211
|
-
});
|
|
212
|
-
it('should render without loading state when dateEventGrammar is not loading', () => {
|
|
213
|
-
renderComponent({
|
|
214
|
-
dateEventGrammar: {
|
|
215
|
-
getGrammarStatus: 'SUCCESS'
|
|
216
|
-
}
|
|
217
|
-
});
|
|
218
|
-
var spinElement = screen.getByTestId('cap-spin');
|
|
219
|
-
expect(spinElement).toHaveAttribute('data-spinning', 'false');
|
|
220
|
-
});
|
|
221
|
-
});
|
|
222
|
-
describe('useEffect Hooks', () => {
|
|
223
|
-
it('should call getEngagementBlocksBeforeWaitTill on mount', () => {
|
|
224
|
-
var getEngagementBlocksBeforeWaitTill = jest.fn();
|
|
225
|
-
renderComponent({
|
|
226
|
-
getEngagementBlocksBeforeWaitTill
|
|
227
|
-
});
|
|
228
|
-
expect(getEngagementBlocksBeforeWaitTill).toHaveBeenCalledTimes(1);
|
|
229
|
-
});
|
|
230
|
-
it('should process availableEngagementBlocks and set blocksDropdownData', () => {
|
|
231
|
-
var availableEngagementBlocks = {
|
|
232
|
-
block1: {
|
|
233
|
-
blockType: ENTRY_TRIGGER,
|
|
234
|
-
blockData: {
|
|
235
|
-
triggerType: USER_EVENT,
|
|
236
|
-
userEventTrigger: {
|
|
237
|
-
eventType: 'testEvent',
|
|
238
|
-
eventCategory: 'testCategory'
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
},
|
|
242
|
-
block2: {
|
|
243
|
-
blockType: WAIT_TILL_EVENT,
|
|
244
|
-
name: 'Test Wait Block',
|
|
245
|
-
blockData: {
|
|
246
|
-
waitType: WAIT_TILL_EVENT_TYPE
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
};
|
|
250
|
-
renderComponent({
|
|
251
|
-
availableEngagementBlocks
|
|
252
|
-
});
|
|
253
|
-
|
|
254
|
-
// The component should process the blocks and set dropdown data
|
|
255
|
-
// We can verify this by checking if the event context component is rendered
|
|
256
|
-
// when useEntryTriggerEventAttribute is true
|
|
257
|
-
});
|
|
258
|
-
it('should set operator to first dropdown value when no operator is provided', () => {
|
|
259
|
-
var setConditionExpression = jest.fn();
|
|
260
|
-
renderComponent({
|
|
261
|
-
conditionExpression: {
|
|
262
|
-
operator: null,
|
|
263
|
-
operand: null,
|
|
264
|
-
dateTypeValues: {}
|
|
265
|
-
},
|
|
266
|
-
setConditionExpression
|
|
267
|
-
});
|
|
268
|
-
|
|
269
|
-
// The component should set the operator to the first available option
|
|
270
|
-
expect(setConditionExpression).toHaveBeenCalled();
|
|
271
|
-
});
|
|
272
|
-
it('should handle eventContextUniqueId and set selected block', () => {
|
|
273
|
-
var availableEngagementBlocks = {
|
|
274
|
-
block1: {
|
|
275
|
-
blockType: ENTRY_TRIGGER,
|
|
276
|
-
blockData: {
|
|
277
|
-
triggerType: USER_EVENT,
|
|
278
|
-
userEventTrigger: {
|
|
279
|
-
eventType: 'testEvent',
|
|
280
|
-
eventCategory: 'testCategory'
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
};
|
|
285
|
-
var getProfilesDetailsByBlockData = jest.fn();
|
|
286
|
-
renderComponent({
|
|
287
|
-
eventContextUniqueId: 'block1_test',
|
|
288
|
-
availableEngagementBlocks,
|
|
289
|
-
getProfilesDetailsByBlockData
|
|
290
|
-
});
|
|
291
|
-
expect(getProfilesDetailsByBlockData).toHaveBeenCalled();
|
|
292
|
-
});
|
|
293
|
-
it('should update eventContextSelectionValue based on operator changes', () => {
|
|
294
|
-
var setEventContextSelectionValue = jest.fn();
|
|
295
|
-
renderComponent({
|
|
296
|
-
conditionExpression: {
|
|
297
|
-
operator: IS_BEFORE_DAYS,
|
|
298
|
-
operand: null,
|
|
299
|
-
dateTypeValues: {}
|
|
300
|
-
},
|
|
301
|
-
eventContextSelectionValue: THE_VALUE,
|
|
302
|
-
setEventContextSelectionValue
|
|
303
|
-
});
|
|
304
|
-
expect(setEventContextSelectionValue).toHaveBeenCalledWith(ENTRY_TRIGGER_EVENT_ATTRIBUTE);
|
|
305
|
-
});
|
|
306
|
-
it('should call getGrammarDataBasedOnEvent when conditions are met', () => {
|
|
307
|
-
var getGrammarDataBasedOnEvent = jest.fn();
|
|
308
|
-
var selectedBlock = {
|
|
309
|
-
blockData: {
|
|
310
|
-
userEventTrigger: {
|
|
311
|
-
eventType: 'testEvent'
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
};
|
|
315
|
-
renderComponent({
|
|
316
|
-
dateEventGrammar: {
|
|
317
|
-
someData: 'test'
|
|
318
|
-
},
|
|
319
|
-
eventContextSelectionValue: ENTRY_TRIGGER_EVENT_ATTRIBUTE,
|
|
320
|
-
selectedBlock,
|
|
321
|
-
getGrammarDataBasedOnEvent
|
|
322
|
-
});
|
|
323
|
-
|
|
324
|
-
// Test that the component renders without errors
|
|
325
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
326
|
-
});
|
|
327
|
-
});
|
|
328
|
-
describe('Operator Changes', () => {
|
|
329
|
-
it('should handle IS_BEFORE_DAYS operator change', () => {
|
|
330
|
-
var setConditionExpression = jest.fn();
|
|
331
|
-
renderComponent({
|
|
332
|
-
setConditionExpression
|
|
333
|
-
});
|
|
334
|
-
var select = screen.getByTestId('cap-select');
|
|
335
|
-
fireEvent.change(select, {
|
|
336
|
-
target: {
|
|
337
|
-
value: IS_BEFORE_DAYS
|
|
338
|
-
}
|
|
339
|
-
});
|
|
340
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
341
|
-
operator: IS_BEFORE_DAYS,
|
|
342
|
-
operand: null,
|
|
343
|
-
dateTypeValues: expect.objectContaining({
|
|
344
|
-
daysKey: MINUS_TIME
|
|
345
|
-
})
|
|
346
|
-
}));
|
|
347
|
-
});
|
|
348
|
-
it('should handle IS_AFTER_DAYS operator change', () => {
|
|
349
|
-
var setConditionExpression = jest.fn();
|
|
350
|
-
renderComponent({
|
|
351
|
-
setConditionExpression
|
|
352
|
-
});
|
|
353
|
-
var select = screen.getByTestId('cap-select');
|
|
354
|
-
fireEvent.change(select, {
|
|
355
|
-
target: {
|
|
356
|
-
value: IS_AFTER_DAYS
|
|
357
|
-
}
|
|
358
|
-
});
|
|
359
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
360
|
-
operator: IS_AFTER_DAYS,
|
|
361
|
-
operand: null,
|
|
362
|
-
dateTypeValues: expect.objectContaining({
|
|
363
|
-
daysKey: PLUS_TIME
|
|
364
|
-
})
|
|
365
|
-
}));
|
|
366
|
-
});
|
|
367
|
-
it('should handle IS_INBETWEEN_DATES operator change', () => {
|
|
368
|
-
var setConditionExpression = jest.fn();
|
|
369
|
-
renderComponent({
|
|
370
|
-
setConditionExpression
|
|
371
|
-
});
|
|
372
|
-
var select = screen.getByTestId('cap-select');
|
|
373
|
-
fireEvent.change(select, {
|
|
374
|
-
target: {
|
|
375
|
-
value: IS_INBETWEEN_DATES
|
|
376
|
-
}
|
|
377
|
-
});
|
|
378
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
379
|
-
operator: IS_INBETWEEN_DATES,
|
|
380
|
-
operand: null,
|
|
381
|
-
dateTypeValues: expect.objectContaining({
|
|
382
|
-
daysKey: null
|
|
383
|
-
})
|
|
384
|
-
}));
|
|
385
|
-
});
|
|
386
|
-
it('should handle other operator changes', () => {
|
|
387
|
-
var setConditionExpression = jest.fn();
|
|
388
|
-
renderComponent({
|
|
389
|
-
setConditionExpression
|
|
390
|
-
});
|
|
391
|
-
var select = screen.getByTestId('cap-select');
|
|
392
|
-
fireEvent.change(select, {
|
|
393
|
-
target: {
|
|
394
|
-
value: 'IS_EXACT_DATE'
|
|
395
|
-
}
|
|
396
|
-
});
|
|
397
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
398
|
-
operator: 'IS_EXACT_DATE',
|
|
399
|
-
operand: null,
|
|
400
|
-
dateTypeValues: expect.objectContaining({
|
|
401
|
-
daysKey: null
|
|
402
|
-
})
|
|
403
|
-
}));
|
|
404
|
-
});
|
|
405
|
-
});
|
|
406
|
-
describe('Operand Changes', () => {
|
|
407
|
-
it('should handle operand change with valid value', () => {
|
|
408
|
-
var setConditionExpression = jest.fn();
|
|
409
|
-
renderComponent({
|
|
410
|
-
conditionExpression: {
|
|
411
|
-
operator: IS_BEFORE_DAYS,
|
|
412
|
-
operand: null,
|
|
413
|
-
dateTypeValues: {}
|
|
414
|
-
},
|
|
415
|
-
setConditionExpression
|
|
416
|
-
});
|
|
417
|
-
var input = screen.getByTestId('cap-input');
|
|
418
|
-
fireEvent.change(input, {
|
|
419
|
-
target: {
|
|
420
|
-
value: '5'
|
|
421
|
-
}
|
|
422
|
-
});
|
|
423
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
424
|
-
operand: '5'
|
|
425
|
-
}));
|
|
426
|
-
});
|
|
427
|
-
it('should handle operand change with empty value', () => {
|
|
428
|
-
var setConditionExpression = jest.fn();
|
|
429
|
-
renderComponent({
|
|
430
|
-
conditionExpression: {
|
|
431
|
-
operator: IS_BEFORE_DAYS,
|
|
432
|
-
operand: '5',
|
|
433
|
-
dateTypeValues: {}
|
|
434
|
-
},
|
|
435
|
-
setConditionExpression
|
|
436
|
-
});
|
|
437
|
-
var input = screen.getByTestId('cap-input');
|
|
438
|
-
fireEvent.change(input, {
|
|
439
|
-
target: {
|
|
440
|
-
value: ''
|
|
441
|
-
}
|
|
442
|
-
});
|
|
443
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
444
|
-
operand: null
|
|
445
|
-
}));
|
|
446
|
-
});
|
|
447
|
-
});
|
|
448
|
-
describe('Event Context Selection', () => {
|
|
449
|
-
it('should handle event context selection change', () => {
|
|
450
|
-
var setEventContextSelectionValue = jest.fn();
|
|
451
|
-
renderComponent({
|
|
452
|
-
useEntryTriggerEventAttribute: true,
|
|
453
|
-
conditionExpression: {
|
|
454
|
-
operator: IS_EXACT_DATE,
|
|
455
|
-
operand: null,
|
|
456
|
-
dateTypeValues: {}
|
|
457
|
-
},
|
|
458
|
-
setEventContextSelectionValue
|
|
459
|
-
});
|
|
460
|
-
|
|
461
|
-
// Test that the component renders without errors
|
|
462
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
463
|
-
});
|
|
464
|
-
it('should render event context component when useEntryTriggerEventAttribute is true', () => {
|
|
465
|
-
renderComponent({
|
|
466
|
-
useEntryTriggerEventAttribute: true,
|
|
467
|
-
conditionExpression: {
|
|
468
|
-
operator: IS_EXACT_DATE,
|
|
469
|
-
operand: null,
|
|
470
|
-
dateTypeValues: {}
|
|
471
|
-
}
|
|
472
|
-
});
|
|
473
|
-
|
|
474
|
-
// Test that the component renders without errors
|
|
475
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
476
|
-
});
|
|
477
|
-
it('should not render event context component when useEntryTriggerEventAttribute is false', () => {
|
|
478
|
-
renderComponent({
|
|
479
|
-
useEntryTriggerEventAttribute: false
|
|
480
|
-
});
|
|
481
|
-
expect(screen.queryByTestId('event-context-component')).not.toBeInTheDocument();
|
|
482
|
-
});
|
|
483
|
-
});
|
|
484
|
-
describe('Block Selection', () => {
|
|
485
|
-
it('should handle block selection change', () => {
|
|
486
|
-
var _handleBlockSelectionChange = jest.fn();
|
|
487
|
-
var setEventContextData = jest.fn();
|
|
488
|
-
var getProfilesDetailsByBlockData = jest.fn();
|
|
489
|
-
var availableEngagementBlocks = {
|
|
490
|
-
block1: {
|
|
491
|
-
blockType: ENTRY_TRIGGER,
|
|
492
|
-
blockData: {
|
|
493
|
-
triggerType: USER_EVENT,
|
|
494
|
-
userEventTrigger: {
|
|
495
|
-
eventType: 'testEvent',
|
|
496
|
-
eventCategory: 'testCategory'
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
};
|
|
501
|
-
renderComponent({
|
|
502
|
-
useEntryTriggerEventAttribute: true,
|
|
503
|
-
conditionExpression: {
|
|
504
|
-
operator: IS_EXACT_DATE,
|
|
505
|
-
operand: null,
|
|
506
|
-
dateTypeValues: {}
|
|
507
|
-
},
|
|
508
|
-
availableEngagementBlocks,
|
|
509
|
-
setEventContextData,
|
|
510
|
-
getProfilesDetailsByBlockData
|
|
511
|
-
});
|
|
512
|
-
|
|
513
|
-
// Test that the component renders without errors
|
|
514
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
515
|
-
});
|
|
516
|
-
});
|
|
517
|
-
describe('Date Picker Interactions', () => {
|
|
518
|
-
it('should render date picker when event context is not selected', () => {
|
|
519
|
-
renderComponent({
|
|
520
|
-
conditionExpression: {
|
|
521
|
-
operator: IS_EXACT_DATE,
|
|
522
|
-
operand: null,
|
|
523
|
-
dateTypeValues: {}
|
|
524
|
-
},
|
|
525
|
-
eventContextSelectionValue: THE_VALUE
|
|
526
|
-
});
|
|
527
|
-
expect(screen.getByTestId('cap-date-picker')).toBeInTheDocument();
|
|
528
|
-
});
|
|
529
|
-
it('should not render date picker when event context is selected', () => {
|
|
530
|
-
renderComponent({
|
|
531
|
-
conditionExpression: {
|
|
532
|
-
operator: IS_EXACT_DATE,
|
|
533
|
-
operand: null,
|
|
534
|
-
dateTypeValues: {}
|
|
535
|
-
},
|
|
536
|
-
eventContextSelectionValue: ENTRY_TRIGGER_EVENT_ATTRIBUTE
|
|
537
|
-
});
|
|
538
|
-
expect(screen.queryByTestId('cap-date-picker')).not.toBeInTheDocument();
|
|
539
|
-
});
|
|
540
|
-
it('should handle date picker change', () => {
|
|
541
|
-
var setConditionExpression = jest.fn();
|
|
542
|
-
var dateTypeValues = {
|
|
543
|
-
specificDateTimeStamp: null
|
|
544
|
-
};
|
|
545
|
-
renderComponent({
|
|
546
|
-
conditionExpression: {
|
|
547
|
-
operator: IS_EXACT_DATE,
|
|
548
|
-
operand: null,
|
|
549
|
-
dateTypeValues
|
|
550
|
-
},
|
|
551
|
-
eventContextSelectionValue: THE_VALUE,
|
|
552
|
-
setConditionExpression
|
|
553
|
-
});
|
|
554
|
-
var datePicker = screen.getByTestId('cap-date-picker');
|
|
555
|
-
var testDate = new Date('2023-01-01');
|
|
556
|
-
fireEvent.change(datePicker, {
|
|
557
|
-
target: {
|
|
558
|
-
value: '2023-01-01'
|
|
559
|
-
}
|
|
560
|
-
});
|
|
561
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
562
|
-
dateTypeValues: expect.objectContaining({
|
|
563
|
-
specificDateTimeStamp: testDate
|
|
564
|
-
})
|
|
565
|
-
}));
|
|
566
|
-
});
|
|
567
|
-
it('should render second date picker for between operator', () => {
|
|
568
|
-
var setConditionExpression = jest.fn();
|
|
569
|
-
var dateTypeValues = {
|
|
570
|
-
specificDateTimeStamp: new Date('2023-01-01'),
|
|
571
|
-
specificDateTimeStamp2: null
|
|
572
|
-
};
|
|
573
|
-
renderComponent({
|
|
574
|
-
conditionExpression: {
|
|
575
|
-
operator: IS_INBETWEEN_DATES,
|
|
576
|
-
operand: null,
|
|
577
|
-
dateTypeValues
|
|
578
|
-
},
|
|
579
|
-
eventContextSelectionValue: THE_VALUE,
|
|
580
|
-
setConditionExpression
|
|
581
|
-
});
|
|
582
|
-
var datePickers = screen.getAllByTestId('cap-date-picker');
|
|
583
|
-
expect(datePickers).toHaveLength(2);
|
|
584
|
-
|
|
585
|
-
// Should render AND label
|
|
586
|
-
expect(screen.getByText('and')).toBeInTheDocument();
|
|
587
|
-
});
|
|
588
|
-
it('should handle second date picker change for between operator', () => {
|
|
589
|
-
var setConditionExpression = jest.fn();
|
|
590
|
-
var dateTypeValues = {
|
|
591
|
-
specificDateTimeStamp: new Date('2023-01-01'),
|
|
592
|
-
specificDateTimeStamp2: null
|
|
593
|
-
};
|
|
594
|
-
renderComponent({
|
|
595
|
-
conditionExpression: {
|
|
596
|
-
operator: IS_INBETWEEN_DATES,
|
|
597
|
-
operand: null,
|
|
598
|
-
dateTypeValues
|
|
599
|
-
},
|
|
600
|
-
eventContextSelectionValue: THE_VALUE,
|
|
601
|
-
setConditionExpression
|
|
602
|
-
});
|
|
603
|
-
var datePickers = screen.getAllByTestId('cap-date-picker');
|
|
604
|
-
var secondDatePicker = datePickers[1];
|
|
605
|
-
var testDate = new Date('2023-01-15');
|
|
606
|
-
fireEvent.change(secondDatePicker, {
|
|
607
|
-
target: {
|
|
608
|
-
value: '2023-01-15'
|
|
609
|
-
}
|
|
610
|
-
});
|
|
611
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
612
|
-
dateTypeValues: expect.objectContaining({
|
|
613
|
-
specificDateTimeStamp2: testDate
|
|
614
|
-
})
|
|
615
|
-
}));
|
|
616
|
-
});
|
|
617
|
-
});
|
|
618
|
-
describe('Input Elements Rendering', () => {
|
|
619
|
-
it('should render input elements for days operators', () => {
|
|
620
|
-
renderComponent({
|
|
621
|
-
conditionExpression: {
|
|
622
|
-
operator: IS_BEFORE_DAYS,
|
|
623
|
-
operand: '5',
|
|
624
|
-
dateTypeValues: {}
|
|
625
|
-
},
|
|
626
|
-
eventContextSelectionValue: THE_VALUE
|
|
627
|
-
});
|
|
628
|
-
expect(screen.getByTestId('cap-input')).toBeInTheDocument();
|
|
629
|
-
expect(screen.getByText('before')).toBeInTheDocument();
|
|
630
|
-
expect(screen.getByTestId('input-suffix')).toBeInTheDocument();
|
|
631
|
-
expect(screen.getByTestId('input-suffix')).toHaveTextContent('days');
|
|
632
|
-
});
|
|
633
|
-
it('should render input elements for after days operator', () => {
|
|
634
|
-
renderComponent({
|
|
635
|
-
conditionExpression: {
|
|
636
|
-
operator: IS_AFTER_DAYS,
|
|
637
|
-
operand: '10',
|
|
638
|
-
dateTypeValues: {}
|
|
639
|
-
},
|
|
640
|
-
eventContextSelectionValue: THE_VALUE
|
|
641
|
-
});
|
|
642
|
-
expect(screen.getByTestId('cap-input')).toBeInTheDocument();
|
|
643
|
-
expect(screen.getByText('after')).toBeInTheDocument();
|
|
644
|
-
expect(screen.getByTestId('input-suffix')).toBeInTheDocument();
|
|
645
|
-
expect(screen.getByTestId('input-suffix')).toHaveTextContent('days');
|
|
646
|
-
});
|
|
647
|
-
it('should not render input elements for between operator', () => {
|
|
648
|
-
renderComponent({
|
|
649
|
-
conditionExpression: {
|
|
650
|
-
operator: IS_INBETWEEN_DATES,
|
|
651
|
-
operand: null,
|
|
652
|
-
dateTypeValues: {}
|
|
653
|
-
},
|
|
654
|
-
eventContextSelectionValue: THE_VALUE
|
|
655
|
-
});
|
|
656
|
-
expect(screen.queryByTestId('cap-input')).not.toBeInTheDocument();
|
|
657
|
-
});
|
|
658
|
-
});
|
|
659
|
-
describe('Dropdown Options', () => {
|
|
660
|
-
it('should create dropdown options from operandsMapping', () => {
|
|
661
|
-
renderComponent();
|
|
662
|
-
var select = screen.getByTestId('cap-select');
|
|
663
|
-
expect(select).toBeInTheDocument();
|
|
664
|
-
});
|
|
665
|
-
it('should handle custom conditionExpressionOptions', () => {
|
|
666
|
-
var customOptions = {
|
|
667
|
-
IS_EXACT_DATE: {
|
|
668
|
-
text: 'Custom On'
|
|
669
|
-
},
|
|
670
|
-
IS_BEFORE_DATE: {
|
|
671
|
-
text: 'Custom Before'
|
|
672
|
-
},
|
|
673
|
-
IS_AFTER_DATE: {
|
|
674
|
-
text: 'Custom After'
|
|
675
|
-
},
|
|
676
|
-
IS_BEFORE_DAYS: {
|
|
677
|
-
text: 'Custom X Days Before'
|
|
678
|
-
},
|
|
679
|
-
IS_AFTER_DAYS: {
|
|
680
|
-
text: 'Custom X Days After'
|
|
681
|
-
},
|
|
682
|
-
IS_INBETWEEN_DATES: {
|
|
683
|
-
text: 'Custom Between'
|
|
684
|
-
}
|
|
685
|
-
};
|
|
686
|
-
renderComponent({
|
|
687
|
-
conditionExpressionOptions: customOptions
|
|
688
|
-
});
|
|
689
|
-
var select = screen.getByTestId('cap-select');
|
|
690
|
-
expect(select).toBeInTheDocument();
|
|
691
|
-
});
|
|
692
|
-
});
|
|
693
|
-
describe('Edge Cases', () => {
|
|
694
|
-
it('should handle null conditionExpression', () => {
|
|
695
|
-
renderComponent({
|
|
696
|
-
conditionExpression: null
|
|
697
|
-
});
|
|
698
|
-
|
|
699
|
-
// Component should handle null gracefully by providing defaults
|
|
700
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
701
|
-
});
|
|
702
|
-
it('should handle undefined conditionExpression', () => {
|
|
703
|
-
renderComponent({
|
|
704
|
-
conditionExpression: undefined
|
|
705
|
-
});
|
|
706
|
-
|
|
707
|
-
// Component should handle undefined gracefully by providing defaults
|
|
708
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
709
|
-
});
|
|
710
|
-
it('should handle empty availableEngagementBlocks', () => {
|
|
711
|
-
renderComponent({
|
|
712
|
-
availableEngagementBlocks: {}
|
|
713
|
-
});
|
|
714
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
715
|
-
});
|
|
716
|
-
it('should handle null availableEngagementBlocks', () => {
|
|
717
|
-
expect(() => {
|
|
718
|
-
renderComponent({
|
|
719
|
-
availableEngagementBlocks: null
|
|
720
|
-
});
|
|
721
|
-
}).toThrow();
|
|
722
|
-
});
|
|
723
|
-
it('should handle undefined availableEngagementBlocks', () => {
|
|
724
|
-
renderComponent({
|
|
725
|
-
availableEngagementBlocks: undefined
|
|
726
|
-
});
|
|
727
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
728
|
-
});
|
|
729
|
-
it('should handle empty dateTypeValues', () => {
|
|
730
|
-
renderComponent({
|
|
731
|
-
conditionExpression: {
|
|
732
|
-
operator: IS_EXACT_DATE,
|
|
733
|
-
operand: null,
|
|
734
|
-
dateTypeValues: {}
|
|
735
|
-
}
|
|
736
|
-
});
|
|
737
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
738
|
-
});
|
|
739
|
-
it('should handle null dateTypeValues', () => {
|
|
740
|
-
renderComponent({
|
|
741
|
-
conditionExpression: {
|
|
742
|
-
operator: IS_EXACT_DATE,
|
|
743
|
-
operand: null,
|
|
744
|
-
dateTypeValues: null
|
|
745
|
-
}
|
|
746
|
-
});
|
|
747
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
748
|
-
});
|
|
749
|
-
it('should handle undefined dateTypeValues', () => {
|
|
750
|
-
renderComponent({
|
|
751
|
-
conditionExpression: {
|
|
752
|
-
operator: IS_EXACT_DATE,
|
|
753
|
-
operand: null,
|
|
754
|
-
dateTypeValues: undefined
|
|
755
|
-
}
|
|
756
|
-
});
|
|
757
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
758
|
-
});
|
|
759
|
-
it('should handle empty eventContextSelectionOptions', () => {
|
|
760
|
-
renderComponent({
|
|
761
|
-
useEntryTriggerEventAttribute: true,
|
|
762
|
-
conditionExpression: {
|
|
763
|
-
operator: IS_EXACT_DATE,
|
|
764
|
-
operand: null,
|
|
765
|
-
dateTypeValues: {}
|
|
766
|
-
}
|
|
767
|
-
});
|
|
768
|
-
|
|
769
|
-
// Test that the component renders without errors
|
|
770
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
771
|
-
});
|
|
772
|
-
it('should handle null grammarDataBasedOnEvent', () => {
|
|
773
|
-
renderComponent({
|
|
774
|
-
dateEventGrammar: null
|
|
775
|
-
});
|
|
776
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
777
|
-
});
|
|
778
|
-
it('should handle undefined grammarDataBasedOnEvent', () => {
|
|
779
|
-
renderComponent({
|
|
780
|
-
dateEventGrammar: undefined
|
|
781
|
-
});
|
|
782
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
783
|
-
});
|
|
784
|
-
it('should handle empty selectedBlock', () => {
|
|
785
|
-
renderComponent({
|
|
786
|
-
selectedBlock: {}
|
|
787
|
-
});
|
|
788
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
789
|
-
});
|
|
790
|
-
it('should handle null selectedBlock', () => {
|
|
791
|
-
renderComponent({
|
|
792
|
-
selectedBlock: null
|
|
793
|
-
});
|
|
794
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
795
|
-
});
|
|
796
|
-
it('should handle undefined selectedBlock', () => {
|
|
797
|
-
renderComponent({
|
|
798
|
-
selectedBlock: undefined
|
|
799
|
-
});
|
|
800
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
801
|
-
});
|
|
802
|
-
it('should handle empty blocksDropdownData', () => {
|
|
803
|
-
renderComponent({
|
|
804
|
-
blocksDropdownData: []
|
|
805
|
-
});
|
|
806
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
807
|
-
});
|
|
808
|
-
it('should handle null blocksDropdownData', () => {
|
|
809
|
-
renderComponent({
|
|
810
|
-
blocksDropdownData: null
|
|
811
|
-
});
|
|
812
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
813
|
-
});
|
|
814
|
-
it('should handle undefined blocksDropdownData', () => {
|
|
815
|
-
renderComponent({
|
|
816
|
-
blocksDropdownData: undefined
|
|
817
|
-
});
|
|
818
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
819
|
-
});
|
|
820
|
-
it('should handle empty grammarDataBasedOnEvent state', () => {
|
|
821
|
-
renderComponent({
|
|
822
|
-
grammarDataBasedOnEvent: {}
|
|
823
|
-
});
|
|
824
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
825
|
-
});
|
|
826
|
-
it('should handle null grammarDataBasedOnEvent state', () => {
|
|
827
|
-
renderComponent({
|
|
828
|
-
grammarDataBasedOnEvent: null
|
|
829
|
-
});
|
|
830
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
831
|
-
});
|
|
832
|
-
it('should handle undefined grammarDataBasedOnEvent state', () => {
|
|
833
|
-
renderComponent({
|
|
834
|
-
grammarDataBasedOnEvent: undefined
|
|
835
|
-
});
|
|
836
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
837
|
-
});
|
|
838
|
-
});
|
|
839
|
-
describe('Complex Scenarios', () => {
|
|
840
|
-
it('should handle complete workflow with all operators', () => {
|
|
841
|
-
var setConditionExpression = jest.fn();
|
|
842
|
-
var setEventContextSelectionValue = jest.fn();
|
|
843
|
-
var {
|
|
844
|
-
rerender: _rerender
|
|
845
|
-
} = renderComponent({
|
|
846
|
-
setConditionExpression,
|
|
847
|
-
setEventContextSelectionValue
|
|
848
|
-
});
|
|
849
|
-
|
|
850
|
-
// Test IS_BEFORE_DAYS
|
|
851
|
-
var select = screen.getByTestId('cap-select');
|
|
852
|
-
fireEvent.change(select, {
|
|
853
|
-
target: {
|
|
854
|
-
value: IS_BEFORE_DAYS
|
|
855
|
-
}
|
|
856
|
-
});
|
|
857
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
858
|
-
operator: IS_BEFORE_DAYS,
|
|
859
|
-
dateTypeValues: expect.objectContaining({
|
|
860
|
-
daysKey: MINUS_TIME
|
|
861
|
-
})
|
|
862
|
-
}));
|
|
863
|
-
|
|
864
|
-
// Test IS_AFTER_DAYS
|
|
865
|
-
fireEvent.change(select, {
|
|
866
|
-
target: {
|
|
867
|
-
value: IS_AFTER_DAYS
|
|
868
|
-
}
|
|
869
|
-
});
|
|
870
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
871
|
-
operator: IS_AFTER_DAYS,
|
|
872
|
-
dateTypeValues: expect.objectContaining({
|
|
873
|
-
daysKey: PLUS_TIME
|
|
874
|
-
})
|
|
875
|
-
}));
|
|
876
|
-
|
|
877
|
-
// Test IS_INBETWEEN_DATES
|
|
878
|
-
fireEvent.change(select, {
|
|
879
|
-
target: {
|
|
880
|
-
value: IS_INBETWEEN_DATES
|
|
881
|
-
}
|
|
882
|
-
});
|
|
883
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
884
|
-
operator: IS_INBETWEEN_DATES,
|
|
885
|
-
dateTypeValues: expect.objectContaining({
|
|
886
|
-
daysKey: null
|
|
887
|
-
})
|
|
888
|
-
}));
|
|
889
|
-
});
|
|
890
|
-
it('should handle event context workflow', () => {
|
|
891
|
-
var setEventContextSelectionValue = jest.fn();
|
|
892
|
-
var setEventContextData = jest.fn();
|
|
893
|
-
var getProfilesDetailsByBlockData = jest.fn();
|
|
894
|
-
var availableEngagementBlocks = {
|
|
895
|
-
block1: {
|
|
896
|
-
blockType: ENTRY_TRIGGER,
|
|
897
|
-
blockData: {
|
|
898
|
-
triggerType: USER_EVENT,
|
|
899
|
-
userEventTrigger: {
|
|
900
|
-
eventType: 'testEvent',
|
|
901
|
-
eventCategory: 'testCategory'
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
}
|
|
905
|
-
};
|
|
906
|
-
renderComponent({
|
|
907
|
-
useEntryTriggerEventAttribute: true,
|
|
908
|
-
conditionExpression: {
|
|
909
|
-
operator: IS_EXACT_DATE,
|
|
910
|
-
operand: null,
|
|
911
|
-
dateTypeValues: {}
|
|
912
|
-
},
|
|
913
|
-
availableEngagementBlocks,
|
|
914
|
-
setEventContextSelectionValue,
|
|
915
|
-
setEventContextData,
|
|
916
|
-
getProfilesDetailsByBlockData
|
|
917
|
-
});
|
|
918
|
-
|
|
919
|
-
// Test that the component renders without errors
|
|
920
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
921
|
-
});
|
|
922
|
-
it('should handle date picker workflow', () => {
|
|
923
|
-
var setConditionExpression = jest.fn();
|
|
924
|
-
var dateTypeValues = {
|
|
925
|
-
specificDateTimeStamp: null,
|
|
926
|
-
specificDateTimeStamp2: null
|
|
927
|
-
};
|
|
928
|
-
renderComponent({
|
|
929
|
-
conditionExpression: {
|
|
930
|
-
operator: IS_INBETWEEN_DATES,
|
|
931
|
-
operand: null,
|
|
932
|
-
dateTypeValues
|
|
933
|
-
},
|
|
934
|
-
eventContextSelectionValue: THE_VALUE,
|
|
935
|
-
setConditionExpression
|
|
936
|
-
});
|
|
937
|
-
var datePickers = screen.getAllByTestId('cap-date-picker');
|
|
938
|
-
expect(datePickers).toHaveLength(2);
|
|
939
|
-
|
|
940
|
-
// Test first date picker
|
|
941
|
-
fireEvent.change(datePickers[0], {
|
|
942
|
-
target: {
|
|
943
|
-
value: '2023-01-01'
|
|
944
|
-
}
|
|
945
|
-
});
|
|
946
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
947
|
-
dateTypeValues: expect.objectContaining({
|
|
948
|
-
specificDateTimeStamp: expect.any(Date)
|
|
949
|
-
})
|
|
950
|
-
}));
|
|
951
|
-
|
|
952
|
-
// Test second date picker
|
|
953
|
-
fireEvent.change(datePickers[1], {
|
|
954
|
-
target: {
|
|
955
|
-
value: '2023-01-15'
|
|
956
|
-
}
|
|
957
|
-
});
|
|
958
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
959
|
-
dateTypeValues: expect.objectContaining({
|
|
960
|
-
specificDateTimeStamp2: expect.any(Date)
|
|
961
|
-
})
|
|
962
|
-
}));
|
|
963
|
-
});
|
|
964
|
-
it('should handle operand input workflow', () => {
|
|
965
|
-
var setConditionExpression = jest.fn();
|
|
966
|
-
renderComponent({
|
|
967
|
-
conditionExpression: {
|
|
968
|
-
operator: IS_BEFORE_DAYS,
|
|
969
|
-
operand: null,
|
|
970
|
-
dateTypeValues: {}
|
|
971
|
-
},
|
|
972
|
-
eventContextSelectionValue: THE_VALUE,
|
|
973
|
-
setConditionExpression
|
|
974
|
-
});
|
|
975
|
-
var input = screen.getByTestId('cap-input');
|
|
976
|
-
|
|
977
|
-
// Test valid input
|
|
978
|
-
fireEvent.change(input, {
|
|
979
|
-
target: {
|
|
980
|
-
value: '5'
|
|
981
|
-
}
|
|
982
|
-
});
|
|
983
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
984
|
-
operand: '5'
|
|
985
|
-
}));
|
|
986
|
-
|
|
987
|
-
// Test that the component renders without errors
|
|
988
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
989
|
-
});
|
|
990
|
-
});
|
|
991
|
-
describe('PropTypes Validation', () => {
|
|
992
|
-
it('should handle all required props', () => {
|
|
993
|
-
var props = {
|
|
994
|
-
conditionExpressionOptions: {
|
|
995
|
-
IS_EXACT_DATE: {
|
|
996
|
-
text: 'On'
|
|
997
|
-
},
|
|
998
|
-
IS_BEFORE_DATE: {
|
|
999
|
-
text: 'Before'
|
|
1000
|
-
},
|
|
1001
|
-
IS_AFTER_DATE: {
|
|
1002
|
-
text: 'After'
|
|
1003
|
-
},
|
|
1004
|
-
IS_BEFORE_DAYS: {
|
|
1005
|
-
text: 'X Days Before'
|
|
1006
|
-
},
|
|
1007
|
-
IS_AFTER_DAYS: {
|
|
1008
|
-
text: 'X Days After'
|
|
1009
|
-
},
|
|
1010
|
-
IS_INBETWEEN_DATES: {
|
|
1011
|
-
text: 'Between'
|
|
1012
|
-
}
|
|
1013
|
-
},
|
|
1014
|
-
conditionExpression: {
|
|
1015
|
-
operator: null,
|
|
1016
|
-
operand: null,
|
|
1017
|
-
dateTypeValues: {}
|
|
1018
|
-
},
|
|
1019
|
-
setConditionExpression: jest.fn(),
|
|
1020
|
-
onMsg: 'On',
|
|
1021
|
-
beforeMsg: 'Before',
|
|
1022
|
-
afterMsg: 'After',
|
|
1023
|
-
xDaysBeforeMsg: 'X Days Before',
|
|
1024
|
-
xDaysAfterMsg: 'X Days After',
|
|
1025
|
-
betweenMsg: 'Between',
|
|
1026
|
-
andMsg: 'And',
|
|
1027
|
-
shouldRemoveOperator: false,
|
|
1028
|
-
removeOperatorsList: [],
|
|
1029
|
-
eventContextDataOptions: [],
|
|
1030
|
-
useEntryTriggerEventAttribute: false,
|
|
1031
|
-
eventContextSelectionValue: THE_VALUE,
|
|
1032
|
-
setEventContextSelectionValue: jest.fn(),
|
|
1033
|
-
eventContextData: {},
|
|
1034
|
-
setEventContextData: jest.fn(),
|
|
1035
|
-
getEngagementBlocksBeforeWaitTill: jest.fn(),
|
|
1036
|
-
availableEngagementBlocks: {},
|
|
1037
|
-
getProfilesDetailsByBlockData: jest.fn(),
|
|
1038
|
-
getGrammarDataBasedOnEvent: jest.fn(),
|
|
1039
|
-
dateEventGrammar: {},
|
|
1040
|
-
eventContextUniqueId: null
|
|
1041
|
-
};
|
|
1042
|
-
renderComponent(props);
|
|
1043
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1044
|
-
});
|
|
1045
|
-
});
|
|
1046
|
-
describe('Additional Coverage Tests', () => {
|
|
1047
|
-
it('should handle between operator with event context selection', () => {
|
|
1048
|
-
var setEventContextSelectionValue = jest.fn();
|
|
1049
|
-
renderComponent({
|
|
1050
|
-
conditionExpression: {
|
|
1051
|
-
operator: IS_INBETWEEN_DATES,
|
|
1052
|
-
operand: null,
|
|
1053
|
-
dateTypeValues: {}
|
|
1054
|
-
},
|
|
1055
|
-
eventContextSelectionValue: ENTRY_TRIGGER_EVENT_ATTRIBUTE,
|
|
1056
|
-
setEventContextSelectionValue
|
|
1057
|
-
});
|
|
1058
|
-
expect(setEventContextSelectionValue).toHaveBeenCalledWith(THE_VALUE);
|
|
1059
|
-
});
|
|
1060
|
-
it('should handle grammar data based on event with selected block', () => {
|
|
1061
|
-
var getGrammarDataBasedOnEvent = jest.fn();
|
|
1062
|
-
var selectedBlock = {
|
|
1063
|
-
blockData: {
|
|
1064
|
-
userEventTrigger: {
|
|
1065
|
-
eventType: 'testEvent'
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
};
|
|
1069
|
-
renderComponent({
|
|
1070
|
-
dateEventGrammar: {
|
|
1071
|
-
someData: 'test'
|
|
1072
|
-
},
|
|
1073
|
-
eventContextSelectionValue: ENTRY_TRIGGER_EVENT_ATTRIBUTE,
|
|
1074
|
-
selectedBlock,
|
|
1075
|
-
getGrammarDataBasedOnEvent
|
|
1076
|
-
});
|
|
1077
|
-
|
|
1078
|
-
// Test that the component renders without errors
|
|
1079
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1080
|
-
});
|
|
1081
|
-
it('should handle event context selection change', () => {
|
|
1082
|
-
var setEventContextSelectionValue = jest.fn();
|
|
1083
|
-
renderComponent({
|
|
1084
|
-
useEntryTriggerEventAttribute: true,
|
|
1085
|
-
conditionExpression: {
|
|
1086
|
-
operator: IS_EXACT_DATE,
|
|
1087
|
-
operand: null,
|
|
1088
|
-
dateTypeValues: {}
|
|
1089
|
-
},
|
|
1090
|
-
setEventContextSelectionValue
|
|
1091
|
-
});
|
|
1092
|
-
|
|
1093
|
-
// Test that the component renders without errors
|
|
1094
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1095
|
-
});
|
|
1096
|
-
it('should handle custom event context component rendering', () => {
|
|
1097
|
-
renderComponent({
|
|
1098
|
-
useEntryTriggerEventAttribute: true,
|
|
1099
|
-
conditionExpression: {
|
|
1100
|
-
operator: IS_EXACT_DATE,
|
|
1101
|
-
operand: null,
|
|
1102
|
-
dateTypeValues: {}
|
|
1103
|
-
},
|
|
1104
|
-
eventContextSelectionValue: ENTRY_TRIGGER_EVENT_ATTRIBUTE
|
|
1105
|
-
});
|
|
1106
|
-
|
|
1107
|
-
// Test that the component renders without errors
|
|
1108
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1109
|
-
});
|
|
1110
|
-
it('should not render event context component for between operator', () => {
|
|
1111
|
-
renderComponent({
|
|
1112
|
-
useEntryTriggerEventAttribute: true,
|
|
1113
|
-
conditionExpression: {
|
|
1114
|
-
operator: IS_INBETWEEN_DATES,
|
|
1115
|
-
operand: null,
|
|
1116
|
-
dateTypeValues: {}
|
|
1117
|
-
},
|
|
1118
|
-
eventContextSelectionValue: ENTRY_TRIGGER_EVENT_ATTRIBUTE
|
|
1119
|
-
});
|
|
1120
|
-
expect(screen.queryByTestId('event-context-component')).not.toBeInTheDocument();
|
|
1121
|
-
});
|
|
1122
|
-
it('should handle input elements when operator is null', () => {
|
|
1123
|
-
renderComponent({
|
|
1124
|
-
conditionExpression: {
|
|
1125
|
-
operator: null,
|
|
1126
|
-
operand: null,
|
|
1127
|
-
dateTypeValues: {}
|
|
1128
|
-
},
|
|
1129
|
-
eventContextSelectionValue: THE_VALUE
|
|
1130
|
-
});
|
|
1131
|
-
|
|
1132
|
-
// Should not render date picker when operator is null
|
|
1133
|
-
expect(screen.queryByTestId('cap-date-picker')).not.toBeInTheDocument();
|
|
1134
|
-
});
|
|
1135
|
-
it('should handle input elements when event context is selected', () => {
|
|
1136
|
-
renderComponent({
|
|
1137
|
-
conditionExpression: {
|
|
1138
|
-
operator: IS_EXACT_DATE,
|
|
1139
|
-
operand: null,
|
|
1140
|
-
dateTypeValues: {}
|
|
1141
|
-
},
|
|
1142
|
-
eventContextSelectionValue: ENTRY_TRIGGER_EVENT_ATTRIBUTE
|
|
1143
|
-
});
|
|
1144
|
-
|
|
1145
|
-
// Should not render date picker when event context is selected
|
|
1146
|
-
expect(screen.queryByTestId('cap-date-picker')).not.toBeInTheDocument();
|
|
1147
|
-
});
|
|
1148
|
-
});
|
|
1149
|
-
describe('Missing Coverage Tests', () => {
|
|
1150
|
-
it('should handle handleBlockSelectionChange function', () => {
|
|
1151
|
-
var setEventContextData = jest.fn();
|
|
1152
|
-
var getProfilesDetailsByBlockData = jest.fn();
|
|
1153
|
-
var availableEngagementBlocks = {
|
|
1154
|
-
block1: {
|
|
1155
|
-
blockType: ENTRY_TRIGGER,
|
|
1156
|
-
blockData: {
|
|
1157
|
-
triggerType: USER_EVENT,
|
|
1158
|
-
userEventTrigger: {
|
|
1159
|
-
eventType: 'testEvent',
|
|
1160
|
-
eventCategory: 'testCategory'
|
|
1161
|
-
}
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1164
|
-
};
|
|
1165
|
-
renderComponent({
|
|
1166
|
-
useEntryTriggerEventAttribute: true,
|
|
1167
|
-
conditionExpression: {
|
|
1168
|
-
operator: IS_EXACT_DATE,
|
|
1169
|
-
operand: null,
|
|
1170
|
-
dateTypeValues: {}
|
|
1171
|
-
},
|
|
1172
|
-
availableEngagementBlocks,
|
|
1173
|
-
setEventContextData,
|
|
1174
|
-
getProfilesDetailsByBlockData
|
|
1175
|
-
});
|
|
1176
|
-
|
|
1177
|
-
// Test that the component renders without errors
|
|
1178
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1179
|
-
});
|
|
1180
|
-
it('should handle getGrammarDataBasedOnEvent call with proper conditions', () => {
|
|
1181
|
-
var getGrammarDataBasedOnEvent = jest.fn().mockReturnValue({
|
|
1182
|
-
treeData: 'test'
|
|
1183
|
-
});
|
|
1184
|
-
var selectedBlock = {
|
|
1185
|
-
blockData: {
|
|
1186
|
-
userEventTrigger: {
|
|
1187
|
-
eventType: 'testEvent'
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
};
|
|
1191
|
-
renderComponent({
|
|
1192
|
-
dateEventGrammar: {
|
|
1193
|
-
someData: 'test'
|
|
1194
|
-
},
|
|
1195
|
-
eventContextSelectionValue: ENTRY_TRIGGER_EVENT_ATTRIBUTE,
|
|
1196
|
-
selectedBlock,
|
|
1197
|
-
getGrammarDataBasedOnEvent
|
|
1198
|
-
});
|
|
1199
|
-
|
|
1200
|
-
// Test that the component renders without errors
|
|
1201
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1202
|
-
});
|
|
1203
|
-
it('should handle handleEventContextSelectionChange function', () => {
|
|
1204
|
-
var setEventContextSelectionValue = jest.fn();
|
|
1205
|
-
renderComponent({
|
|
1206
|
-
useEntryTriggerEventAttribute: true,
|
|
1207
|
-
conditionExpression: {
|
|
1208
|
-
operator: IS_EXACT_DATE,
|
|
1209
|
-
operand: null,
|
|
1210
|
-
dateTypeValues: {}
|
|
1211
|
-
},
|
|
1212
|
-
setEventContextSelectionValue
|
|
1213
|
-
});
|
|
1214
|
-
|
|
1215
|
-
// Test that the component renders without errors
|
|
1216
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1217
|
-
});
|
|
1218
|
-
it('should handle disableDateRange function with startDate', () => {
|
|
1219
|
-
var startDate = new Date('2023-01-01');
|
|
1220
|
-
var _currentDate = new Date('2022-12-31');
|
|
1221
|
-
renderComponent({
|
|
1222
|
-
conditionExpression: {
|
|
1223
|
-
operator: IS_INBETWEEN_DATES,
|
|
1224
|
-
operand: null,
|
|
1225
|
-
dateTypeValues: {
|
|
1226
|
-
specificDateTimeStamp: startDate
|
|
1227
|
-
}
|
|
1228
|
-
},
|
|
1229
|
-
eventContextSelectionValue: THE_VALUE
|
|
1230
|
-
});
|
|
1231
|
-
|
|
1232
|
-
// Test that the component renders without errors
|
|
1233
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1234
|
-
});
|
|
1235
|
-
it('should handle disableDateRange function without startDate', () => {
|
|
1236
|
-
renderComponent({
|
|
1237
|
-
conditionExpression: {
|
|
1238
|
-
operator: IS_INBETWEEN_DATES,
|
|
1239
|
-
operand: null,
|
|
1240
|
-
dateTypeValues: {
|
|
1241
|
-
specificDateTimeStamp: null
|
|
1242
|
-
}
|
|
1243
|
-
},
|
|
1244
|
-
eventContextSelectionValue: THE_VALUE
|
|
1245
|
-
});
|
|
1246
|
-
|
|
1247
|
-
// Test that the component renders without errors
|
|
1248
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1249
|
-
});
|
|
1250
|
-
it('should handle getCustomEventContextComponent function', () => {
|
|
1251
|
-
renderComponent({
|
|
1252
|
-
useEntryTriggerEventAttribute: true,
|
|
1253
|
-
conditionExpression: {
|
|
1254
|
-
operator: IS_EXACT_DATE,
|
|
1255
|
-
operand: null,
|
|
1256
|
-
dateTypeValues: {}
|
|
1257
|
-
},
|
|
1258
|
-
eventContextSelectionValue: ENTRY_TRIGGER_EVENT_ATTRIBUTE
|
|
1259
|
-
});
|
|
1260
|
-
|
|
1261
|
-
// Test that the component renders without errors
|
|
1262
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1263
|
-
});
|
|
1264
|
-
it('should handle getInputElements function with between operator', () => {
|
|
1265
|
-
renderComponent({
|
|
1266
|
-
conditionExpression: {
|
|
1267
|
-
operator: IS_INBETWEEN_DATES,
|
|
1268
|
-
operand: null,
|
|
1269
|
-
dateTypeValues: {
|
|
1270
|
-
specificDateTimeStamp: new Date('2023-01-01'),
|
|
1271
|
-
specificDateTimeStamp2: new Date('2023-01-15')
|
|
1272
|
-
}
|
|
1273
|
-
},
|
|
1274
|
-
eventContextSelectionValue: THE_VALUE
|
|
1275
|
-
});
|
|
1276
|
-
var datePickers = screen.getAllByTestId('cap-date-picker');
|
|
1277
|
-
expect(datePickers).toHaveLength(2);
|
|
1278
|
-
expect(screen.getByText('and')).toBeInTheDocument();
|
|
1279
|
-
});
|
|
1280
|
-
it('should handle getInputElements function with single date picker', () => {
|
|
1281
|
-
renderComponent({
|
|
1282
|
-
conditionExpression: {
|
|
1283
|
-
operator: IS_EXACT_DATE,
|
|
1284
|
-
operand: null,
|
|
1285
|
-
dateTypeValues: {
|
|
1286
|
-
specificDateTimeStamp: new Date('2023-01-01')
|
|
1287
|
-
}
|
|
1288
|
-
},
|
|
1289
|
-
eventContextSelectionValue: THE_VALUE
|
|
1290
|
-
});
|
|
1291
|
-
var datePickers = screen.getAllByTestId('cap-date-picker');
|
|
1292
|
-
expect(datePickers).toHaveLength(1);
|
|
1293
|
-
});
|
|
1294
|
-
it('should handle getInputElements function when event context is selected', () => {
|
|
1295
|
-
renderComponent({
|
|
1296
|
-
conditionExpression: {
|
|
1297
|
-
operator: IS_EXACT_DATE,
|
|
1298
|
-
operand: null,
|
|
1299
|
-
dateTypeValues: {
|
|
1300
|
-
specificDateTimeStamp: new Date('2023-01-01')
|
|
1301
|
-
}
|
|
1302
|
-
},
|
|
1303
|
-
eventContextSelectionValue: ENTRY_TRIGGER_EVENT_ATTRIBUTE
|
|
1304
|
-
});
|
|
1305
|
-
|
|
1306
|
-
// Should not render date picker when event context is selected
|
|
1307
|
-
expect(screen.queryByTestId('cap-date-picker')).not.toBeInTheDocument();
|
|
1308
|
-
});
|
|
1309
|
-
it('should handle getInputElements function when operator is null', () => {
|
|
1310
|
-
renderComponent({
|
|
1311
|
-
conditionExpression: {
|
|
1312
|
-
operator: null,
|
|
1313
|
-
operand: null,
|
|
1314
|
-
dateTypeValues: {}
|
|
1315
|
-
},
|
|
1316
|
-
eventContextSelectionValue: THE_VALUE
|
|
1317
|
-
});
|
|
1318
|
-
|
|
1319
|
-
// Should not render date picker when operator is null
|
|
1320
|
-
expect(screen.queryByTestId('cap-date-picker')).not.toBeInTheDocument();
|
|
1321
|
-
});
|
|
1322
|
-
});
|
|
1323
|
-
describe('OperandsMapping Conditional Logic Coverage', () => {
|
|
1324
|
-
it('should use operandsMappingWithoutDays when currentBlockName equals ENTRY_TRIGGER', () => {
|
|
1325
|
-
var setConditionExpression = jest.fn();
|
|
1326
|
-
|
|
1327
|
-
// Create filtered conditionExpressionOptions that match the filtered operandsMapping
|
|
1328
|
-
var filteredConditionExpressionOptions = {
|
|
1329
|
-
IS_EXACT_DATE: {
|
|
1330
|
-
text: 'On'
|
|
1331
|
-
},
|
|
1332
|
-
IS_BEFORE_DATE: {
|
|
1333
|
-
text: 'Before'
|
|
1334
|
-
},
|
|
1335
|
-
IS_AFTER_DATE: {
|
|
1336
|
-
text: 'After'
|
|
1337
|
-
},
|
|
1338
|
-
IS_INBETWEEN_DATES: {
|
|
1339
|
-
text: 'Between'
|
|
1340
|
-
}
|
|
1341
|
-
// Exclude IS_BEFORE_DAYS and IS_AFTER_DAYS to match operandsMappingWithoutDays
|
|
1342
|
-
};
|
|
1343
|
-
renderComponent({
|
|
1344
|
-
currentBlockName: ENTRY_TRIGGER,
|
|
1345
|
-
conditionExpressionOptions: filteredConditionExpressionOptions,
|
|
1346
|
-
setConditionExpression
|
|
1347
|
-
});
|
|
1348
|
-
|
|
1349
|
-
// Verify that the component renders with the filtered operands mapping
|
|
1350
|
-
// This means IS_BEFORE_DAYS and IS_AFTER_DAYS should not be available in the dropdown
|
|
1351
|
-
var select = screen.getByTestId('cap-select');
|
|
1352
|
-
expect(select).toBeInTheDocument();
|
|
1353
|
-
|
|
1354
|
-
// The component should render without errors when currentBlockName is ENTRY_TRIGGER
|
|
1355
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1356
|
-
});
|
|
1357
|
-
it('should use allOperandsMapping when currentBlockName is not ENTRY_TRIGGER', () => {
|
|
1358
|
-
var setConditionExpression = jest.fn();
|
|
1359
|
-
renderComponent({
|
|
1360
|
-
currentBlockName: 'SOME_OTHER_BLOCK',
|
|
1361
|
-
setConditionExpression
|
|
1362
|
-
});
|
|
1363
|
-
|
|
1364
|
-
// Verify that the component renders with the full operands mapping
|
|
1365
|
-
var select = screen.getByTestId('cap-select');
|
|
1366
|
-
expect(select).toBeInTheDocument();
|
|
1367
|
-
|
|
1368
|
-
// The component should render without errors when currentBlockName is not ENTRY_TRIGGER
|
|
1369
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1370
|
-
});
|
|
1371
|
-
it('should use allOperandsMapping when currentBlockName is undefined', () => {
|
|
1372
|
-
var setConditionExpression = jest.fn();
|
|
1373
|
-
renderComponent({
|
|
1374
|
-
currentBlockName: undefined,
|
|
1375
|
-
setConditionExpression
|
|
1376
|
-
});
|
|
1377
|
-
|
|
1378
|
-
// Verify that the component renders with the full operands mapping
|
|
1379
|
-
var select = screen.getByTestId('cap-select');
|
|
1380
|
-
expect(select).toBeInTheDocument();
|
|
1381
|
-
|
|
1382
|
-
// The component should render without errors when currentBlockName is undefined
|
|
1383
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1384
|
-
});
|
|
1385
|
-
it('should use allOperandsMapping when currentBlockName is null', () => {
|
|
1386
|
-
var setConditionExpression = jest.fn();
|
|
1387
|
-
renderComponent({
|
|
1388
|
-
currentBlockName: null,
|
|
1389
|
-
setConditionExpression
|
|
1390
|
-
});
|
|
1391
|
-
|
|
1392
|
-
// Verify that the component renders with the full operands mapping
|
|
1393
|
-
var select = screen.getByTestId('cap-select');
|
|
1394
|
-
expect(select).toBeInTheDocument();
|
|
1395
|
-
|
|
1396
|
-
// The component should render without errors when currentBlockName is null
|
|
1397
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1398
|
-
});
|
|
1399
|
-
it('should use allOperandsMapping when currentBlockName is empty string', () => {
|
|
1400
|
-
var setConditionExpression = jest.fn();
|
|
1401
|
-
renderComponent({
|
|
1402
|
-
currentBlockName: '',
|
|
1403
|
-
setConditionExpression
|
|
1404
|
-
});
|
|
1405
|
-
|
|
1406
|
-
// Verify that the component renders with the full operands mapping
|
|
1407
|
-
var select = screen.getByTestId('cap-select');
|
|
1408
|
-
expect(select).toBeInTheDocument();
|
|
1409
|
-
|
|
1410
|
-
// The component should render without errors when currentBlockName is empty string
|
|
1411
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1412
|
-
});
|
|
1413
|
-
it('should use allOperandsMapping when currentBlockName is a different constant', () => {
|
|
1414
|
-
var setConditionExpression = jest.fn();
|
|
1415
|
-
renderComponent({
|
|
1416
|
-
currentBlockName: WAIT_TILL_EVENT,
|
|
1417
|
-
setConditionExpression
|
|
1418
|
-
});
|
|
1419
|
-
|
|
1420
|
-
// Verify that the component renders with the full operands mapping
|
|
1421
|
-
var select = screen.getByTestId('cap-select');
|
|
1422
|
-
expect(select).toBeInTheDocument();
|
|
1423
|
-
|
|
1424
|
-
// The component should render without errors when currentBlockName is WAIT_TILL_EVENT
|
|
1425
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1426
|
-
});
|
|
1427
|
-
it('should use allOperandsMapping when currentBlockName is any other string value', () => {
|
|
1428
|
-
var setConditionExpression = jest.fn();
|
|
1429
|
-
renderComponent({
|
|
1430
|
-
currentBlockName: 'CUSTOM_BLOCK_TYPE',
|
|
1431
|
-
setConditionExpression
|
|
1432
|
-
});
|
|
1433
|
-
|
|
1434
|
-
// Verify that the component renders with the full operands mapping
|
|
1435
|
-
var select = screen.getByTestId('cap-select');
|
|
1436
|
-
expect(select).toBeInTheDocument();
|
|
1437
|
-
|
|
1438
|
-
// The component should render without errors when currentBlockName is any other string
|
|
1439
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1440
|
-
});
|
|
1441
|
-
it('should handle operandsMapping logic with operator changes when currentBlockName is ENTRY_TRIGGER', () => {
|
|
1442
|
-
var setConditionExpression = jest.fn();
|
|
1443
|
-
|
|
1444
|
-
// Create filtered conditionExpressionOptions that match the filtered operandsMapping
|
|
1445
|
-
var filteredConditionExpressionOptions = {
|
|
1446
|
-
IS_EXACT_DATE: {
|
|
1447
|
-
text: 'On'
|
|
1448
|
-
},
|
|
1449
|
-
IS_BEFORE_DATE: {
|
|
1450
|
-
text: 'Before'
|
|
1451
|
-
},
|
|
1452
|
-
IS_AFTER_DATE: {
|
|
1453
|
-
text: 'After'
|
|
1454
|
-
},
|
|
1455
|
-
IS_INBETWEEN_DATES: {
|
|
1456
|
-
text: 'Between'
|
|
1457
|
-
}
|
|
1458
|
-
// Exclude IS_BEFORE_DAYS and IS_AFTER_DAYS to match operandsMappingWithoutDays
|
|
1459
|
-
};
|
|
1460
|
-
renderComponent({
|
|
1461
|
-
currentBlockName: ENTRY_TRIGGER,
|
|
1462
|
-
conditionExpressionOptions: filteredConditionExpressionOptions,
|
|
1463
|
-
setConditionExpression
|
|
1464
|
-
});
|
|
1465
|
-
var select = screen.getByTestId('cap-select');
|
|
1466
|
-
|
|
1467
|
-
// Test that operator changes work correctly with filtered mapping
|
|
1468
|
-
fireEvent.change(select, {
|
|
1469
|
-
target: {
|
|
1470
|
-
value: IS_EXACT_DATE
|
|
1471
|
-
}
|
|
1472
|
-
});
|
|
1473
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
1474
|
-
operator: IS_EXACT_DATE
|
|
1475
|
-
}));
|
|
1476
|
-
});
|
|
1477
|
-
it('should handle operandsMapping logic with operator changes when currentBlockName is not ENTRY_TRIGGER', () => {
|
|
1478
|
-
var setConditionExpression = jest.fn();
|
|
1479
|
-
renderComponent({
|
|
1480
|
-
currentBlockName: 'OTHER_BLOCK',
|
|
1481
|
-
setConditionExpression
|
|
1482
|
-
});
|
|
1483
|
-
var select = screen.getByTestId('cap-select');
|
|
1484
|
-
|
|
1485
|
-
// Test that operator changes work correctly with full mapping
|
|
1486
|
-
fireEvent.change(select, {
|
|
1487
|
-
target: {
|
|
1488
|
-
value: IS_BEFORE_DAYS
|
|
1489
|
-
}
|
|
1490
|
-
});
|
|
1491
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
1492
|
-
operator: IS_BEFORE_DAYS,
|
|
1493
|
-
dateTypeValues: expect.objectContaining({
|
|
1494
|
-
daysKey: MINUS_TIME
|
|
1495
|
-
})
|
|
1496
|
-
}));
|
|
1497
|
-
});
|
|
1498
|
-
});
|
|
1499
|
-
describe('Advanced Edge Cases and Branch Coverage', () => {
|
|
1500
|
-
it('should handle availableEngagementBlocks with userEventTrigger but no eventType', () => {
|
|
1501
|
-
var availableEngagementBlocks = {
|
|
1502
|
-
block1: {
|
|
1503
|
-
blockType: ENTRY_TRIGGER,
|
|
1504
|
-
blockData: {
|
|
1505
|
-
triggerType: USER_EVENT,
|
|
1506
|
-
userEventTrigger: {
|
|
1507
|
-
eventCategory: 'testCategory'
|
|
1508
|
-
// Missing eventType
|
|
1509
|
-
}
|
|
1510
|
-
}
|
|
1511
|
-
}
|
|
1512
|
-
};
|
|
1513
|
-
renderComponent({
|
|
1514
|
-
availableEngagementBlocks
|
|
1515
|
-
});
|
|
1516
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1517
|
-
});
|
|
1518
|
-
it('should handle availableEngagementBlocks with userEventTrigger but no eventCategory', () => {
|
|
1519
|
-
var availableEngagementBlocks = {
|
|
1520
|
-
block1: {
|
|
1521
|
-
blockType: ENTRY_TRIGGER,
|
|
1522
|
-
blockData: {
|
|
1523
|
-
triggerType: USER_EVENT,
|
|
1524
|
-
userEventTrigger: {
|
|
1525
|
-
eventType: 'testEvent'
|
|
1526
|
-
// Missing eventCategory
|
|
1527
|
-
}
|
|
1528
|
-
}
|
|
1529
|
-
}
|
|
1530
|
-
};
|
|
1531
|
-
renderComponent({
|
|
1532
|
-
availableEngagementBlocks
|
|
1533
|
-
});
|
|
1534
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1535
|
-
});
|
|
1536
|
-
it('should handle availableEngagementBlocks with WAIT_TILL_EVENT and userEventTrigger', () => {
|
|
1537
|
-
var availableEngagementBlocks = {
|
|
1538
|
-
block1: {
|
|
1539
|
-
blockType: WAIT_TILL_EVENT,
|
|
1540
|
-
name: 'Test Wait Block',
|
|
1541
|
-
blockData: {
|
|
1542
|
-
userEventTrigger: {
|
|
1543
|
-
eventType: 'testEvent',
|
|
1544
|
-
eventCategory: 'testCategory'
|
|
1545
|
-
}
|
|
1546
|
-
}
|
|
1547
|
-
}
|
|
1548
|
-
};
|
|
1549
|
-
renderComponent({
|
|
1550
|
-
availableEngagementBlocks
|
|
1551
|
-
});
|
|
1552
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1553
|
-
});
|
|
1554
|
-
it('should handle availableEngagementBlocks with WAIT_TILL_EVENT and waitType', () => {
|
|
1555
|
-
var availableEngagementBlocks = {
|
|
1556
|
-
block1: {
|
|
1557
|
-
blockType: WAIT_TILL_EVENT,
|
|
1558
|
-
name: 'Test Wait Block',
|
|
1559
|
-
blockData: {
|
|
1560
|
-
waitType: WAIT_TILL_EVENT_TYPE
|
|
1561
|
-
}
|
|
1562
|
-
}
|
|
1563
|
-
};
|
|
1564
|
-
renderComponent({
|
|
1565
|
-
availableEngagementBlocks
|
|
1566
|
-
});
|
|
1567
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1568
|
-
});
|
|
1569
|
-
it('should handle availableEngagementBlocks with invalid blockType', () => {
|
|
1570
|
-
var availableEngagementBlocks = {
|
|
1571
|
-
block1: {
|
|
1572
|
-
blockType: 'INVALID_TYPE',
|
|
1573
|
-
blockData: {
|
|
1574
|
-
triggerType: USER_EVENT,
|
|
1575
|
-
userEventTrigger: {
|
|
1576
|
-
eventType: 'testEvent',
|
|
1577
|
-
eventCategory: 'testCategory'
|
|
1578
|
-
}
|
|
1579
|
-
}
|
|
1580
|
-
}
|
|
1581
|
-
};
|
|
1582
|
-
renderComponent({
|
|
1583
|
-
availableEngagementBlocks
|
|
1584
|
-
});
|
|
1585
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1586
|
-
});
|
|
1587
|
-
it('should handle availableEngagementBlocks with missing blockData', () => {
|
|
1588
|
-
var availableEngagementBlocks = {
|
|
1589
|
-
block1: {
|
|
1590
|
-
blockType: ENTRY_TRIGGER
|
|
1591
|
-
// Missing blockData
|
|
1592
|
-
}
|
|
1593
|
-
};
|
|
1594
|
-
renderComponent({
|
|
1595
|
-
availableEngagementBlocks
|
|
1596
|
-
});
|
|
1597
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1598
|
-
});
|
|
1599
|
-
it('should handle availableEngagementBlocks with null blockData', () => {
|
|
1600
|
-
var availableEngagementBlocks = {
|
|
1601
|
-
block1: {
|
|
1602
|
-
blockType: ENTRY_TRIGGER,
|
|
1603
|
-
blockData: null
|
|
1604
|
-
}
|
|
1605
|
-
};
|
|
1606
|
-
renderComponent({
|
|
1607
|
-
availableEngagementBlocks
|
|
1608
|
-
});
|
|
1609
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1610
|
-
});
|
|
1611
|
-
it('should handle availableEngagementBlocks with missing userEventTrigger', () => {
|
|
1612
|
-
var availableEngagementBlocks = {
|
|
1613
|
-
block1: {
|
|
1614
|
-
blockType: ENTRY_TRIGGER,
|
|
1615
|
-
blockData: {
|
|
1616
|
-
triggerType: USER_EVENT
|
|
1617
|
-
// Missing userEventTrigger
|
|
1618
|
-
}
|
|
1619
|
-
}
|
|
1620
|
-
};
|
|
1621
|
-
renderComponent({
|
|
1622
|
-
availableEngagementBlocks
|
|
1623
|
-
});
|
|
1624
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1625
|
-
});
|
|
1626
|
-
it('should handle availableEngagementBlocks with null userEventTrigger', () => {
|
|
1627
|
-
var availableEngagementBlocks = {
|
|
1628
|
-
block1: {
|
|
1629
|
-
blockType: ENTRY_TRIGGER,
|
|
1630
|
-
blockData: {
|
|
1631
|
-
triggerType: USER_EVENT,
|
|
1632
|
-
userEventTrigger: null
|
|
1633
|
-
}
|
|
1634
|
-
}
|
|
1635
|
-
};
|
|
1636
|
-
renderComponent({
|
|
1637
|
-
availableEngagementBlocks
|
|
1638
|
-
});
|
|
1639
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1640
|
-
});
|
|
1641
|
-
it('should handle availableEngagementBlocks with missing name for WAIT_TILL_EVENT', () => {
|
|
1642
|
-
var availableEngagementBlocks = {
|
|
1643
|
-
block1: {
|
|
1644
|
-
blockType: WAIT_TILL_EVENT,
|
|
1645
|
-
blockData: {
|
|
1646
|
-
waitType: WAIT_TILL_EVENT_TYPE
|
|
1647
|
-
}
|
|
1648
|
-
// Missing name
|
|
1649
|
-
}
|
|
1650
|
-
};
|
|
1651
|
-
renderComponent({
|
|
1652
|
-
availableEngagementBlocks
|
|
1653
|
-
});
|
|
1654
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1655
|
-
});
|
|
1656
|
-
it('should handle eventContextUniqueId with invalid format', () => {
|
|
1657
|
-
var availableEngagementBlocks = {
|
|
1658
|
-
block1: {
|
|
1659
|
-
blockType: ENTRY_TRIGGER,
|
|
1660
|
-
blockData: {
|
|
1661
|
-
triggerType: USER_EVENT,
|
|
1662
|
-
userEventTrigger: {
|
|
1663
|
-
eventType: 'testEvent',
|
|
1664
|
-
eventCategory: 'testCategory'
|
|
1665
|
-
}
|
|
1666
|
-
}
|
|
1667
|
-
}
|
|
1668
|
-
};
|
|
1669
|
-
renderComponent({
|
|
1670
|
-
eventContextUniqueId: 'invalid_format',
|
|
1671
|
-
availableEngagementBlocks
|
|
1672
|
-
});
|
|
1673
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1674
|
-
});
|
|
1675
|
-
it('should handle eventContextUniqueId with non-existent block', () => {
|
|
1676
|
-
var availableEngagementBlocks = {
|
|
1677
|
-
block1: {
|
|
1678
|
-
blockType: ENTRY_TRIGGER,
|
|
1679
|
-
blockData: {
|
|
1680
|
-
triggerType: USER_EVENT,
|
|
1681
|
-
userEventTrigger: {
|
|
1682
|
-
eventType: 'testEvent',
|
|
1683
|
-
eventCategory: 'testCategory'
|
|
1684
|
-
}
|
|
1685
|
-
}
|
|
1686
|
-
}
|
|
1687
|
-
};
|
|
1688
|
-
renderComponent({
|
|
1689
|
-
eventContextUniqueId: 'nonexistent_block__test',
|
|
1690
|
-
availableEngagementBlocks
|
|
1691
|
-
});
|
|
1692
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1693
|
-
});
|
|
1694
|
-
it('should handle getGrammarDataBasedOnEvent with missing dateEventGrammar', () => {
|
|
1695
|
-
var getGrammarDataBasedOnEvent = jest.fn();
|
|
1696
|
-
var selectedBlock = {
|
|
1697
|
-
blockData: {
|
|
1698
|
-
userEventTrigger: {
|
|
1699
|
-
eventType: 'testEvent'
|
|
1700
|
-
}
|
|
1701
|
-
}
|
|
1702
|
-
};
|
|
1703
|
-
renderComponent({
|
|
1704
|
-
dateEventGrammar: null,
|
|
1705
|
-
eventContextSelectionValue: ENTRY_TRIGGER_EVENT_ATTRIBUTE,
|
|
1706
|
-
selectedBlock,
|
|
1707
|
-
getGrammarDataBasedOnEvent
|
|
1708
|
-
});
|
|
1709
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1710
|
-
});
|
|
1711
|
-
it('should handle getGrammarDataBasedOnEvent with missing selectedBlock', () => {
|
|
1712
|
-
var getGrammarDataBasedOnEvent = jest.fn();
|
|
1713
|
-
renderComponent({
|
|
1714
|
-
dateEventGrammar: {
|
|
1715
|
-
someData: 'test'
|
|
1716
|
-
},
|
|
1717
|
-
eventContextSelectionValue: ENTRY_TRIGGER_EVENT_ATTRIBUTE,
|
|
1718
|
-
selectedBlock: null,
|
|
1719
|
-
getGrammarDataBasedOnEvent
|
|
1720
|
-
});
|
|
1721
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1722
|
-
});
|
|
1723
|
-
it('should handle getGrammarDataBasedOnEvent with missing blockData', () => {
|
|
1724
|
-
var getGrammarDataBasedOnEvent = jest.fn();
|
|
1725
|
-
var selectedBlock = {
|
|
1726
|
-
// Missing blockData
|
|
1727
|
-
};
|
|
1728
|
-
renderComponent({
|
|
1729
|
-
dateEventGrammar: {
|
|
1730
|
-
someData: 'test'
|
|
1731
|
-
},
|
|
1732
|
-
eventContextSelectionValue: ENTRY_TRIGGER_EVENT_ATTRIBUTE,
|
|
1733
|
-
selectedBlock,
|
|
1734
|
-
getGrammarDataBasedOnEvent
|
|
1735
|
-
});
|
|
1736
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1737
|
-
});
|
|
1738
|
-
it('should handle getGrammarDataBasedOnEvent with missing userEventTrigger', () => {
|
|
1739
|
-
var getGrammarDataBasedOnEvent = jest.fn();
|
|
1740
|
-
var selectedBlock = {
|
|
1741
|
-
blockData: {
|
|
1742
|
-
// Missing userEventTrigger
|
|
1743
|
-
}
|
|
1744
|
-
};
|
|
1745
|
-
renderComponent({
|
|
1746
|
-
dateEventGrammar: {
|
|
1747
|
-
someData: 'test'
|
|
1748
|
-
},
|
|
1749
|
-
eventContextSelectionValue: ENTRY_TRIGGER_EVENT_ATTRIBUTE,
|
|
1750
|
-
selectedBlock,
|
|
1751
|
-
getGrammarDataBasedOnEvent
|
|
1752
|
-
});
|
|
1753
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1754
|
-
});
|
|
1755
|
-
it('should handle getGrammarDataBasedOnEvent with missing eventType', () => {
|
|
1756
|
-
var getGrammarDataBasedOnEvent = jest.fn();
|
|
1757
|
-
var selectedBlock = {
|
|
1758
|
-
blockData: {
|
|
1759
|
-
userEventTrigger: {
|
|
1760
|
-
// Missing eventType
|
|
1761
|
-
}
|
|
1762
|
-
}
|
|
1763
|
-
};
|
|
1764
|
-
renderComponent({
|
|
1765
|
-
dateEventGrammar: {
|
|
1766
|
-
someData: 'test'
|
|
1767
|
-
},
|
|
1768
|
-
eventContextSelectionValue: ENTRY_TRIGGER_EVENT_ATTRIBUTE,
|
|
1769
|
-
selectedBlock,
|
|
1770
|
-
getGrammarDataBasedOnEvent
|
|
1771
|
-
});
|
|
1772
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1773
|
-
});
|
|
1774
|
-
it('should handle getGrammarDataBasedOnEvent with different eventContextSelectionValue', () => {
|
|
1775
|
-
var getGrammarDataBasedOnEvent = jest.fn();
|
|
1776
|
-
var selectedBlock = {
|
|
1777
|
-
blockData: {
|
|
1778
|
-
userEventTrigger: {
|
|
1779
|
-
eventType: 'testEvent'
|
|
1780
|
-
}
|
|
1781
|
-
}
|
|
1782
|
-
};
|
|
1783
|
-
renderComponent({
|
|
1784
|
-
dateEventGrammar: {
|
|
1785
|
-
someData: 'test'
|
|
1786
|
-
},
|
|
1787
|
-
eventContextSelectionValue: THE_VALUE,
|
|
1788
|
-
// Not ENTRY_TRIGGER_EVENT_ATTRIBUTE
|
|
1789
|
-
selectedBlock,
|
|
1790
|
-
getGrammarDataBasedOnEvent
|
|
1791
|
-
});
|
|
1792
|
-
expect(screen.getByTestId('cap-spin')).toBeInTheDocument();
|
|
1793
|
-
});
|
|
1794
|
-
it('should handle handleOperandChange with null value', () => {
|
|
1795
|
-
var setConditionExpression = jest.fn();
|
|
1796
|
-
renderComponent({
|
|
1797
|
-
conditionExpression: {
|
|
1798
|
-
operator: IS_BEFORE_DAYS,
|
|
1799
|
-
operand: '5',
|
|
1800
|
-
dateTypeValues: {}
|
|
1801
|
-
},
|
|
1802
|
-
setConditionExpression
|
|
1803
|
-
});
|
|
1804
|
-
var input = screen.getByTestId('cap-input');
|
|
1805
|
-
fireEvent.change(input, {
|
|
1806
|
-
target: {
|
|
1807
|
-
value: null
|
|
1808
|
-
}
|
|
1809
|
-
});
|
|
1810
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
1811
|
-
operand: null
|
|
1812
|
-
}));
|
|
1813
|
-
});
|
|
1814
|
-
it('should handle handleOperandChange with undefined value', () => {
|
|
1815
|
-
var setConditionExpression = jest.fn();
|
|
1816
|
-
renderComponent({
|
|
1817
|
-
conditionExpression: {
|
|
1818
|
-
operator: IS_BEFORE_DAYS,
|
|
1819
|
-
operand: '5',
|
|
1820
|
-
dateTypeValues: {}
|
|
1821
|
-
},
|
|
1822
|
-
eventContextSelectionValue: THE_VALUE,
|
|
1823
|
-
setConditionExpression
|
|
1824
|
-
});
|
|
1825
|
-
var input = screen.getByTestId('cap-input');
|
|
1826
|
-
fireEvent.change(input, {
|
|
1827
|
-
target: {
|
|
1828
|
-
value: ''
|
|
1829
|
-
}
|
|
1830
|
-
});
|
|
1831
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
1832
|
-
operand: null
|
|
1833
|
-
}));
|
|
1834
|
-
});
|
|
1835
|
-
it('should handle handleOperandChange with zero value', () => {
|
|
1836
|
-
var setConditionExpression = jest.fn();
|
|
1837
|
-
renderComponent({
|
|
1838
|
-
conditionExpression: {
|
|
1839
|
-
operator: IS_BEFORE_DAYS,
|
|
1840
|
-
operand: '5',
|
|
1841
|
-
dateTypeValues: {}
|
|
1842
|
-
},
|
|
1843
|
-
setConditionExpression
|
|
1844
|
-
});
|
|
1845
|
-
var input = screen.getByTestId('cap-input');
|
|
1846
|
-
fireEvent.change(input, {
|
|
1847
|
-
target: {
|
|
1848
|
-
value: '0'
|
|
1849
|
-
}
|
|
1850
|
-
});
|
|
1851
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
1852
|
-
operand: '0'
|
|
1853
|
-
}));
|
|
1854
|
-
});
|
|
1855
|
-
it('should handle handleOperandChange with negative value', () => {
|
|
1856
|
-
var setConditionExpression = jest.fn();
|
|
1857
|
-
renderComponent({
|
|
1858
|
-
conditionExpression: {
|
|
1859
|
-
operator: IS_BEFORE_DAYS,
|
|
1860
|
-
operand: '5',
|
|
1861
|
-
dateTypeValues: {}
|
|
1862
|
-
},
|
|
1863
|
-
setConditionExpression
|
|
1864
|
-
});
|
|
1865
|
-
var input = screen.getByTestId('cap-input');
|
|
1866
|
-
fireEvent.change(input, {
|
|
1867
|
-
target: {
|
|
1868
|
-
value: '-5'
|
|
1869
|
-
}
|
|
1870
|
-
});
|
|
1871
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
1872
|
-
operand: '-5'
|
|
1873
|
-
}));
|
|
1874
|
-
});
|
|
1875
|
-
it('should handle handleOperandChange with decimal value', () => {
|
|
1876
|
-
var setConditionExpression = jest.fn();
|
|
1877
|
-
renderComponent({
|
|
1878
|
-
conditionExpression: {
|
|
1879
|
-
operator: IS_BEFORE_DAYS,
|
|
1880
|
-
operand: '5',
|
|
1881
|
-
dateTypeValues: {}
|
|
1882
|
-
},
|
|
1883
|
-
setConditionExpression
|
|
1884
|
-
});
|
|
1885
|
-
var input = screen.getByTestId('cap-input');
|
|
1886
|
-
fireEvent.change(input, {
|
|
1887
|
-
target: {
|
|
1888
|
-
value: '5.5'
|
|
1889
|
-
}
|
|
1890
|
-
});
|
|
1891
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
1892
|
-
operand: '5.5'
|
|
1893
|
-
}));
|
|
1894
|
-
});
|
|
1895
|
-
it('should handle handleOperandChange with non-numeric value', () => {
|
|
1896
|
-
var setConditionExpression = jest.fn();
|
|
1897
|
-
renderComponent({
|
|
1898
|
-
conditionExpression: {
|
|
1899
|
-
operator: IS_BEFORE_DAYS,
|
|
1900
|
-
operand: '5',
|
|
1901
|
-
dateTypeValues: {}
|
|
1902
|
-
},
|
|
1903
|
-
eventContextSelectionValue: THE_VALUE,
|
|
1904
|
-
setConditionExpression
|
|
1905
|
-
});
|
|
1906
|
-
var input = screen.getByTestId('cap-input');
|
|
1907
|
-
fireEvent.change(input, {
|
|
1908
|
-
target: {
|
|
1909
|
-
value: 'abc'
|
|
1910
|
-
}
|
|
1911
|
-
});
|
|
1912
|
-
|
|
1913
|
-
// The function sets non-numeric values to null (likely due to validation)
|
|
1914
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
1915
|
-
operand: null
|
|
1916
|
-
}));
|
|
1917
|
-
});
|
|
1918
|
-
it('should handle handleOperandChange with whitespace value', () => {
|
|
1919
|
-
var setConditionExpression = jest.fn();
|
|
1920
|
-
renderComponent({
|
|
1921
|
-
conditionExpression: {
|
|
1922
|
-
operator: IS_BEFORE_DAYS,
|
|
1923
|
-
operand: '5',
|
|
1924
|
-
dateTypeValues: {}
|
|
1925
|
-
},
|
|
1926
|
-
eventContextSelectionValue: THE_VALUE,
|
|
1927
|
-
setConditionExpression
|
|
1928
|
-
});
|
|
1929
|
-
var input = screen.getByTestId('cap-input');
|
|
1930
|
-
fireEvent.change(input, {
|
|
1931
|
-
target: {
|
|
1932
|
-
value: ' '
|
|
1933
|
-
}
|
|
1934
|
-
});
|
|
1935
|
-
|
|
1936
|
-
// Whitespace values are treated as falsy and converted to null
|
|
1937
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
1938
|
-
operand: null
|
|
1939
|
-
}));
|
|
1940
|
-
});
|
|
1941
|
-
it('should handle handleOperandChange with very large number', () => {
|
|
1942
|
-
var setConditionExpression = jest.fn();
|
|
1943
|
-
renderComponent({
|
|
1944
|
-
conditionExpression: {
|
|
1945
|
-
operator: IS_BEFORE_DAYS,
|
|
1946
|
-
operand: '5',
|
|
1947
|
-
dateTypeValues: {}
|
|
1948
|
-
},
|
|
1949
|
-
setConditionExpression
|
|
1950
|
-
});
|
|
1951
|
-
var input = screen.getByTestId('cap-input');
|
|
1952
|
-
fireEvent.change(input, {
|
|
1953
|
-
target: {
|
|
1954
|
-
value: '999999999999999999'
|
|
1955
|
-
}
|
|
1956
|
-
});
|
|
1957
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
1958
|
-
operand: '999999999999999999'
|
|
1959
|
-
}));
|
|
1960
|
-
});
|
|
1961
|
-
it('should handle handleOperandChange with scientific notation', () => {
|
|
1962
|
-
var setConditionExpression = jest.fn();
|
|
1963
|
-
renderComponent({
|
|
1964
|
-
conditionExpression: {
|
|
1965
|
-
operator: IS_BEFORE_DAYS,
|
|
1966
|
-
operand: '5',
|
|
1967
|
-
dateTypeValues: {}
|
|
1968
|
-
},
|
|
1969
|
-
setConditionExpression
|
|
1970
|
-
});
|
|
1971
|
-
var input = screen.getByTestId('cap-input');
|
|
1972
|
-
fireEvent.change(input, {
|
|
1973
|
-
target: {
|
|
1974
|
-
value: '1e10'
|
|
1975
|
-
}
|
|
1976
|
-
});
|
|
1977
|
-
expect(setConditionExpression).toHaveBeenCalledWith(expect.objectContaining({
|
|
1978
|
-
operand: '1e10'
|
|
1979
|
-
}));
|
|
1980
|
-
});
|
|
1981
|
-
});
|
|
1982
|
-
});
|