@nyaruka/temba-components 0.131.2 → 0.132.0

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.
Files changed (232) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/demo/components/floating-tabs/example.html +400 -0
  3. package/demo/components/flow/index.html +1 -1
  4. package/demo/data/flows/sample-flow.json +41 -2
  5. package/demo/data/flows/voicemail.json +613 -0
  6. package/demo/index.html +6 -0
  7. package/dist/locales/es.js +5 -5
  8. package/dist/locales/es.js.map +1 -1
  9. package/dist/locales/fr.js +5 -5
  10. package/dist/locales/fr.js.map +1 -1
  11. package/dist/locales/locale-codes.js +11 -2
  12. package/dist/locales/locale-codes.js.map +1 -1
  13. package/dist/locales/pt.js +5 -5
  14. package/dist/locales/pt.js.map +1 -1
  15. package/dist/temba-components.js +1122 -548
  16. package/dist/temba-components.js.map +1 -1
  17. package/out-tsc/src/display/FloatingTab.js +167 -0
  18. package/out-tsc/src/display/FloatingTab.js.map +1 -0
  19. package/out-tsc/src/display/ProgressBar.js +22 -2
  20. package/out-tsc/src/display/ProgressBar.js.map +1 -1
  21. package/out-tsc/src/events.js.map +1 -1
  22. package/out-tsc/src/flow/CanvasNode.js +165 -31
  23. package/out-tsc/src/flow/CanvasNode.js.map +1 -1
  24. package/out-tsc/src/flow/Editor.js +870 -3
  25. package/out-tsc/src/flow/Editor.js.map +1 -1
  26. package/out-tsc/src/flow/NodeEditor.js +239 -19
  27. package/out-tsc/src/flow/NodeEditor.js.map +1 -1
  28. package/out-tsc/src/flow/NodeTypeSelector.js +51 -4
  29. package/out-tsc/src/flow/NodeTypeSelector.js.map +1 -1
  30. package/out-tsc/src/flow/StickyNote.js +12 -3
  31. package/out-tsc/src/flow/StickyNote.js.map +1 -1
  32. package/out-tsc/src/flow/actions/add_contact_groups.js +2 -1
  33. package/out-tsc/src/flow/actions/add_contact_groups.js.map +1 -1
  34. package/out-tsc/src/flow/actions/add_contact_urn.js +2 -1
  35. package/out-tsc/src/flow/actions/add_contact_urn.js.map +1 -1
  36. package/out-tsc/src/flow/actions/add_input_labels.js +2 -1
  37. package/out-tsc/src/flow/actions/add_input_labels.js.map +1 -1
  38. package/out-tsc/src/flow/actions/play_audio.js +2 -1
  39. package/out-tsc/src/flow/actions/play_audio.js.map +1 -1
  40. package/out-tsc/src/flow/actions/remove_contact_groups.js +2 -1
  41. package/out-tsc/src/flow/actions/remove_contact_groups.js.map +1 -1
  42. package/out-tsc/src/flow/actions/request_optin.js +1 -0
  43. package/out-tsc/src/flow/actions/request_optin.js.map +1 -1
  44. package/out-tsc/src/flow/actions/say_msg.js +2 -1
  45. package/out-tsc/src/flow/actions/say_msg.js.map +1 -1
  46. package/out-tsc/src/flow/actions/send_broadcast.js +2 -1
  47. package/out-tsc/src/flow/actions/send_broadcast.js.map +1 -1
  48. package/out-tsc/src/flow/actions/send_email.js +2 -1
  49. package/out-tsc/src/flow/actions/send_email.js.map +1 -1
  50. package/out-tsc/src/flow/actions/send_msg.js +93 -3
  51. package/out-tsc/src/flow/actions/send_msg.js.map +1 -1
  52. package/out-tsc/src/flow/actions/set_contact_channel.js +2 -1
  53. package/out-tsc/src/flow/actions/set_contact_channel.js.map +1 -1
  54. package/out-tsc/src/flow/actions/set_contact_field.js +2 -1
  55. package/out-tsc/src/flow/actions/set_contact_field.js.map +1 -1
  56. package/out-tsc/src/flow/actions/set_contact_language.js +2 -1
  57. package/out-tsc/src/flow/actions/set_contact_language.js.map +1 -1
  58. package/out-tsc/src/flow/actions/set_contact_name.js +2 -1
  59. package/out-tsc/src/flow/actions/set_contact_name.js.map +1 -1
  60. package/out-tsc/src/flow/actions/set_contact_status.js +2 -1
  61. package/out-tsc/src/flow/actions/set_contact_status.js.map +1 -1
  62. package/out-tsc/src/flow/actions/set_run_result.js +2 -1
  63. package/out-tsc/src/flow/actions/set_run_result.js.map +1 -1
  64. package/out-tsc/src/flow/actions/start_session.js +2 -1
  65. package/out-tsc/src/flow/actions/start_session.js.map +1 -1
  66. package/out-tsc/src/flow/config.js +19 -14
  67. package/out-tsc/src/flow/config.js.map +1 -1
  68. package/out-tsc/src/flow/nodes/shared.js +54 -0
  69. package/out-tsc/src/flow/nodes/shared.js.map +1 -1
  70. package/out-tsc/src/flow/nodes/split_by_airtime.js +9 -3
  71. package/out-tsc/src/flow/nodes/split_by_airtime.js.map +1 -1
  72. package/out-tsc/src/flow/nodes/split_by_contact_field.js +8 -3
  73. package/out-tsc/src/flow/nodes/split_by_contact_field.js.map +1 -1
  74. package/out-tsc/src/flow/nodes/split_by_expression.js +8 -3
  75. package/out-tsc/src/flow/nodes/split_by_expression.js.map +1 -1
  76. package/out-tsc/src/flow/nodes/split_by_groups.js +8 -3
  77. package/out-tsc/src/flow/nodes/split_by_groups.js.map +1 -1
  78. package/out-tsc/src/flow/nodes/split_by_intent.js +3 -2
  79. package/out-tsc/src/flow/nodes/split_by_intent.js.map +1 -1
  80. package/out-tsc/src/flow/nodes/split_by_llm.js +9 -2
  81. package/out-tsc/src/flow/nodes/split_by_llm.js.map +1 -1
  82. package/out-tsc/src/flow/nodes/split_by_llm_categorize.js +9 -2
  83. package/out-tsc/src/flow/nodes/split_by_llm_categorize.js.map +1 -1
  84. package/out-tsc/src/flow/nodes/split_by_random.js +8 -2
  85. package/out-tsc/src/flow/nodes/split_by_random.js.map +1 -1
  86. package/out-tsc/src/flow/nodes/split_by_resthook.js +8 -3
  87. package/out-tsc/src/flow/nodes/split_by_resthook.js.map +1 -1
  88. package/out-tsc/src/flow/nodes/split_by_run_result.js +14 -3
  89. package/out-tsc/src/flow/nodes/split_by_run_result.js.map +1 -1
  90. package/out-tsc/src/flow/nodes/split_by_scheme.js +8 -3
  91. package/out-tsc/src/flow/nodes/split_by_scheme.js.map +1 -1
  92. package/out-tsc/src/flow/nodes/split_by_subflow.js +8 -2
  93. package/out-tsc/src/flow/nodes/split_by_subflow.js.map +1 -1
  94. package/out-tsc/src/flow/nodes/split_by_ticket.js +8 -2
  95. package/out-tsc/src/flow/nodes/split_by_ticket.js.map +1 -1
  96. package/out-tsc/src/flow/nodes/split_by_webhook.js +8 -2
  97. package/out-tsc/src/flow/nodes/split_by_webhook.js.map +1 -1
  98. package/out-tsc/src/flow/nodes/wait_for_digits.js +3 -2
  99. package/out-tsc/src/flow/nodes/wait_for_digits.js.map +1 -1
  100. package/out-tsc/src/flow/nodes/wait_for_menu.js +3 -2
  101. package/out-tsc/src/flow/nodes/wait_for_menu.js.map +1 -1
  102. package/out-tsc/src/flow/nodes/wait_for_response.js +8 -3
  103. package/out-tsc/src/flow/nodes/wait_for_response.js.map +1 -1
  104. package/out-tsc/src/flow/types.js +15 -0
  105. package/out-tsc/src/flow/types.js.map +1 -1
  106. package/out-tsc/src/layout/FloatingWindow.js +346 -0
  107. package/out-tsc/src/layout/FloatingWindow.js.map +1 -0
  108. package/out-tsc/src/live/ContactChat.js +41 -49
  109. package/out-tsc/src/live/ContactChat.js.map +1 -1
  110. package/out-tsc/src/locales/es.js +5 -5
  111. package/out-tsc/src/locales/es.js.map +1 -1
  112. package/out-tsc/src/locales/fr.js +5 -5
  113. package/out-tsc/src/locales/fr.js.map +1 -1
  114. package/out-tsc/src/locales/locale-codes.js +11 -2
  115. package/out-tsc/src/locales/locale-codes.js.map +1 -1
  116. package/out-tsc/src/locales/pt.js +5 -5
  117. package/out-tsc/src/locales/pt.js.map +1 -1
  118. package/out-tsc/src/store/AppState.js +75 -1
  119. package/out-tsc/src/store/AppState.js.map +1 -1
  120. package/out-tsc/temba-modules.js +4 -0
  121. package/out-tsc/temba-modules.js.map +1 -1
  122. package/out-tsc/test/nodes/split_by_run_result.test.js +83 -0
  123. package/out-tsc/test/nodes/split_by_run_result.test.js.map +1 -1
  124. package/out-tsc/test/temba-backwards-compatibility.test.js +30 -0
  125. package/out-tsc/test/temba-backwards-compatibility.test.js.map +1 -0
  126. package/out-tsc/test/temba-contact-chat.test.js +27 -12
  127. package/out-tsc/test/temba-contact-chat.test.js.map +1 -1
  128. package/out-tsc/test/temba-floating-tab.test.js +91 -0
  129. package/out-tsc/test/temba-floating-tab.test.js.map +1 -0
  130. package/out-tsc/test/temba-floating-window.test.js +301 -0
  131. package/out-tsc/test/temba-floating-window.test.js.map +1 -0
  132. package/out-tsc/test/temba-flow-editor-node.test.js +117 -0
  133. package/out-tsc/test/temba-flow-editor-node.test.js.map +1 -1
  134. package/out-tsc/test/temba-localization.test.js +490 -0
  135. package/out-tsc/test/temba-localization.test.js.map +1 -0
  136. package/out-tsc/test/temba-node-type-selector.test.js +217 -0
  137. package/out-tsc/test/temba-node-type-selector.test.js.map +1 -1
  138. package/out-tsc/test/utils.test.js +18 -0
  139. package/out-tsc/test/utils.test.js.map +1 -1
  140. package/package.json +1 -1
  141. package/screenshots/truth/floating-tab/default.png +0 -0
  142. package/screenshots/truth/floating-tab/gray.png +0 -0
  143. package/screenshots/truth/floating-tab/green.png +0 -0
  144. package/screenshots/truth/floating-tab/hidden.png +0 -0
  145. package/screenshots/truth/floating-tab/hover.png +0 -0
  146. package/screenshots/truth/floating-tab/purple.png +0 -0
  147. package/screenshots/truth/floating-window/chromeless.png +0 -0
  148. package/screenshots/truth/floating-window/custom-size.png +0 -0
  149. package/screenshots/truth/floating-window/default.png +0 -0
  150. package/screenshots/truth/floating-window/with-header.png +0 -0
  151. package/screenshots/truth/node-type-selector/action-mode.png +0 -0
  152. package/screenshots/truth/node-type-selector/split-mode.png +0 -0
  153. package/screenshots/truth/nodes/split_by_llm_categorize/editor/feedback-categorization.png +0 -0
  154. package/src/display/FloatingTab.ts +174 -0
  155. package/src/display/ProgressBar.ts +22 -2
  156. package/src/events.ts +2 -4
  157. package/src/flow/CanvasNode.ts +190 -32
  158. package/src/flow/Editor.ts +1054 -4
  159. package/src/flow/NodeEditor.ts +317 -19
  160. package/src/flow/NodeTypeSelector.ts +54 -4
  161. package/src/flow/StickyNote.ts +12 -3
  162. package/src/flow/actions/add_contact_groups.ts +2 -1
  163. package/src/flow/actions/add_contact_urn.ts +3 -1
  164. package/src/flow/actions/add_input_labels.ts +2 -1
  165. package/src/flow/actions/play_audio.ts +2 -1
  166. package/src/flow/actions/remove_contact_groups.ts +3 -1
  167. package/src/flow/actions/request_optin.ts +1 -0
  168. package/src/flow/actions/say_msg.ts +2 -1
  169. package/src/flow/actions/send_broadcast.ts +2 -1
  170. package/src/flow/actions/send_email.ts +3 -1
  171. package/src/flow/actions/send_msg.ts +134 -3
  172. package/src/flow/actions/set_contact_channel.ts +2 -1
  173. package/src/flow/actions/set_contact_field.ts +2 -1
  174. package/src/flow/actions/set_contact_language.ts +3 -1
  175. package/src/flow/actions/set_contact_name.ts +2 -1
  176. package/src/flow/actions/set_contact_status.ts +2 -1
  177. package/src/flow/actions/set_run_result.ts +2 -1
  178. package/src/flow/actions/start_session.ts +3 -1
  179. package/src/flow/config.ts +24 -16
  180. package/src/flow/nodes/shared.ts +70 -1
  181. package/src/flow/nodes/split_by_airtime.ts +20 -3
  182. package/src/flow/nodes/split_by_contact_field.ts +13 -3
  183. package/src/flow/nodes/split_by_expression.ts +13 -3
  184. package/src/flow/nodes/split_by_groups.ts +13 -3
  185. package/src/flow/nodes/split_by_intent.ts +3 -2
  186. package/src/flow/nodes/split_by_llm.ts +19 -2
  187. package/src/flow/nodes/split_by_llm_categorize.ts +13 -2
  188. package/src/flow/nodes/split_by_random.ts +12 -2
  189. package/src/flow/nodes/split_by_resthook.ts +13 -3
  190. package/src/flow/nodes/split_by_run_result.ts +20 -3
  191. package/src/flow/nodes/split_by_scheme.ts +13 -3
  192. package/src/flow/nodes/split_by_subflow.ts +12 -2
  193. package/src/flow/nodes/split_by_ticket.ts +12 -2
  194. package/src/flow/nodes/split_by_webhook.ts +12 -2
  195. package/src/flow/nodes/wait_for_digits.ts +3 -2
  196. package/src/flow/nodes/wait_for_menu.ts +3 -2
  197. package/src/flow/nodes/wait_for_response.ts +13 -3
  198. package/src/flow/types.ts +49 -0
  199. package/src/layout/FloatingWindow.ts +386 -0
  200. package/src/live/ContactChat.ts +42 -49
  201. package/src/locales/es.ts +18 -13
  202. package/src/locales/fr.ts +18 -13
  203. package/src/locales/locale-codes.ts +11 -2
  204. package/src/locales/pt.ts +18 -13
  205. package/src/store/AppState.ts +116 -1
  206. package/static/api/llms.json +18 -0
  207. package/temba-modules.ts +4 -0
  208. package/test/nodes/split_by_run_result.test.ts +99 -0
  209. package/test/temba-backwards-compatibility.test.ts +37 -0
  210. package/test/temba-contact-chat.test.ts +27 -12
  211. package/test/temba-floating-tab.test.ts +110 -0
  212. package/test/temba-floating-window.test.ts +477 -0
  213. package/test/temba-flow-editor-node.test.ts +144 -0
  214. package/test/temba-localization.test.ts +635 -0
  215. package/test/temba-node-type-selector.test.ts +289 -0
  216. package/test/utils.test.ts +20 -0
  217. package/test-assets/contacts/history.json +5 -6
  218. package/test-assets/select/llms.json +2 -2
  219. package/web-dev-server.config.mjs +47 -1
  220. package/web-test-runner.config.mjs +0 -1
  221. package/out-tsc/src/flow/nodes/wait_for_audio.js +0 -7
  222. package/out-tsc/src/flow/nodes/wait_for_audio.js.map +0 -1
  223. package/out-tsc/src/flow/nodes/wait_for_image.js +0 -7
  224. package/out-tsc/src/flow/nodes/wait_for_image.js.map +0 -1
  225. package/out-tsc/src/flow/nodes/wait_for_location.js +0 -7
  226. package/out-tsc/src/flow/nodes/wait_for_location.js.map +0 -1
  227. package/out-tsc/src/flow/nodes/wait_for_video.js +0 -7
  228. package/out-tsc/src/flow/nodes/wait_for_video.js.map +0 -1
  229. package/src/flow/nodes/wait_for_audio.ts +0 -7
  230. package/src/flow/nodes/wait_for_image.ts +0 -7
  231. package/src/flow/nodes/wait_for_location.ts +0 -7
  232. package/src/flow/nodes/wait_for_video.ts +0 -7
@@ -1 +1 @@
1
- {"version":3,"file":"split_by_run_result.test.js","sourceRoot":"","sources":["../../../test/nodes/split_by_run_result.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE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,sBAAsB,CACvB,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expect } from '@open-wc/testing';\nimport { split_by_run_result } from '../../src/flow/nodes/split_by_run_result';\nimport { Node } from '../../src/store/flow-definition';\nimport { NodeTest } from '../NodeHelper';\nimport { zustand } from '../../src/store/AppState';\n\n/**\n * Test suite for the split_by_run_result node configuration.\n */\ndescribe('split_by_run_result node config', () => {\n const helper = new NodeTest(split_by_run_result, 'split_by_run_result');\n\n // Setup mock flow results in the store before each test\n beforeEach(() => {\n // Mock the store with flow results\n zustand.setState({\n flowInfo: {\n results: [\n {\n key: 'favorite_color',\n name: 'Favorite Color',\n categories: ['Red', 'Blue', 'Green'],\n node_uuids: ['node-1']\n },\n {\n key: 'age',\n name: 'Age',\n categories: ['Adult', 'Teen', 'Child'],\n node_uuids: ['node-2']\n }\n ],\n dependencies: [],\n counts: { nodes: 0, languages: 0 },\n locals: []\n }\n } as any);\n });\n\n describe('basic properties', () => {\n helper.testBasicProperties();\n\n it('has correct name', () => {\n expect(split_by_run_result.name).to.equal('Split by Result');\n });\n\n it('has correct type', () => {\n expect(split_by_run_result.type).to.equal('split_by_run_result');\n });\n\n it('has correct dialog size', () => {\n expect(split_by_run_result.dialogSize).to.equal('large');\n });\n });\n\n describe('toFormData', () => {\n it('should transform node with rules to form data correctly', () => {\n const node: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.favorite_color',\n cases: [\n {\n uuid: 'case-1',\n type: 'has_phrase',\n arguments: ['red'],\n category_uuid: 'cat-1'\n },\n {\n uuid: 'case-2',\n type: 'has_any_word',\n arguments: ['blue', 'azure'],\n category_uuid: 'cat-2'\n }\n ],\n categories: [\n { uuid: 'cat-1', name: 'Red', exit_uuid: 'exit-1' },\n { uuid: 'cat-2', name: 'Blue', exit_uuid: 'exit-2' },\n { uuid: 'cat-other', name: 'Other', exit_uuid: 'exit-other' }\n ],\n default_category_uuid: 'cat-other',\n result_name: 'color_category'\n },\n exits: [\n { uuid: 'exit-1', destination_uuid: null },\n { uuid: 'exit-2', destination_uuid: null },\n { uuid: 'exit-other', destination_uuid: null }\n ]\n };\n\n const nodeUI = {\n config: {\n operand: {\n value: 'favorite_color',\n name: 'Favorite Color'\n }\n }\n };\n\n const formData = split_by_run_result.toFormData!(node, nodeUI);\n\n expect(formData.uuid).to.equal('test-node-uuid');\n expect(formData.result).to.be.an('array');\n expect(formData.result[0].value).to.equal('favorite_color');\n expect(formData.result[0].name).to.equal('Favorite Color');\n expect(formData.rules).to.have.lengthOf(2);\n\n // Check first rule\n expect(formData.rules[0].operator.value).to.equal('has_phrase');\n expect(formData.rules[0].value1).to.equal('red');\n expect(formData.rules[0].category).to.equal('Red');\n\n // Check second rule\n expect(formData.rules[1].operator.value).to.equal('has_any_word');\n expect(formData.rules[1].value1).to.equal('blue azure');\n expect(formData.rules[1].category).to.equal('Blue');\n\n expect(formData.result_name).to.equal('color_category');\n });\n\n it('should transform node with no rules to form data correctly', () => {\n const node: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.age',\n cases: [],\n categories: [\n {\n uuid: 'cat-all',\n name: 'All Responses',\n exit_uuid: 'exit-all'\n }\n ],\n default_category_uuid: 'cat-all'\n },\n exits: [{ uuid: 'exit-all', destination_uuid: null }]\n };\n\n const nodeUI = {\n config: {\n operand: {\n value: 'age',\n name: 'Age'\n }\n }\n };\n\n const formData = split_by_run_result.toFormData!(node, nodeUI);\n\n expect(formData.uuid).to.equal('test-node-uuid');\n expect(formData.result).to.be.an('array');\n expect(formData.result[0].value).to.equal('age');\n expect(formData.result[0].name).to.equal('Age');\n expect(formData.rules).to.have.lengthOf(0);\n expect(formData.result_name).to.equal('');\n });\n\n it('should handle missing nodeUI config gracefully', () => {\n const node: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.favorite_color',\n cases: [],\n categories: [\n {\n uuid: 'cat-all',\n name: 'All Responses',\n exit_uuid: 'exit-all'\n }\n ],\n default_category_uuid: 'cat-all'\n },\n exits: [{ uuid: 'exit-all', destination_uuid: null }]\n };\n\n const formData = split_by_run_result.toFormData!(node);\n\n expect(formData.uuid).to.equal('test-node-uuid');\n expect(formData.result).to.be.an('array');\n expect(formData.result).to.have.lengthOf(0);\n });\n\n it('should transform node with two-operand operators correctly', () => {\n const node: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.age',\n cases: [\n {\n uuid: 'case-1',\n type: 'has_number_between',\n arguments: ['13', '17'],\n category_uuid: 'cat-1'\n }\n ],\n categories: [\n { uuid: 'cat-1', name: 'Teen', exit_uuid: 'exit-1' },\n { uuid: 'cat-other', name: 'Other', exit_uuid: 'exit-other' }\n ],\n default_category_uuid: 'cat-other'\n },\n exits: [\n { uuid: 'exit-1', destination_uuid: null },\n { uuid: 'exit-other', destination_uuid: null }\n ]\n };\n\n const nodeUI = {\n config: {\n operand: {\n value: 'age',\n name: 'Age'\n }\n }\n };\n\n const formData = split_by_run_result.toFormData!(node, nodeUI);\n\n expect(formData.rules).to.have.lengthOf(1);\n expect(formData.rules[0].operator.value).to.equal('has_number_between');\n expect(formData.rules[0].value1).to.equal('13');\n expect(formData.rules[0].value2).to.equal('17');\n expect(formData.rules[0].category).to.equal('Teen');\n });\n\n it('should transform node with zero-operand operators correctly', () => {\n const node: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.age',\n cases: [\n {\n uuid: 'case-1',\n type: 'has_number',\n arguments: [],\n category_uuid: 'cat-1'\n }\n ],\n categories: [\n { uuid: 'cat-1', name: 'Has Number', exit_uuid: 'exit-1' },\n { uuid: 'cat-other', name: 'Other', exit_uuid: 'exit-other' }\n ],\n default_category_uuid: 'cat-other'\n },\n exits: [\n { uuid: 'exit-1', destination_uuid: null },\n { uuid: 'exit-other', destination_uuid: null }\n ]\n };\n\n const nodeUI = {\n config: {\n operand: {\n value: 'age',\n name: 'Age'\n }\n }\n };\n\n const formData = split_by_run_result.toFormData!(node, nodeUI);\n\n expect(formData.rules).to.have.lengthOf(1);\n expect(formData.rules[0].operator.value).to.equal('has_number');\n expect(formData.rules[0].value1).to.equal('');\n expect(formData.rules[0].value2).to.equal('');\n });\n });\n\n describe('fromFormData', () => {\n it('should transform form data with rules to node correctly', () => {\n const formData = {\n uuid: 'test-node-uuid',\n result: [{ value: 'favorite_color', name: 'Favorite Color' }],\n rules: [\n {\n operator: { value: 'has_phrase', name: 'has the phrase' },\n value1: 'red',\n value2: '',\n category: 'Red'\n },\n {\n operator: { value: 'has_any_word', name: 'has any of the words' },\n value1: 'blue azure',\n value2: '',\n category: 'Blue'\n }\n ],\n result_name: 'color_category'\n };\n\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.old_result',\n cases: [],\n categories: [],\n default_category_uuid: ''\n },\n exits: []\n };\n\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n expect(resultNode.uuid).to.equal('test-node-uuid');\n expect(resultNode.router).to.exist;\n expect(resultNode.router!.type).to.equal('switch');\n expect(resultNode.router!.operand).to.equal('@results.favorite_color');\n expect(resultNode.router!.result_name).to.equal('color_category');\n\n // Verify cases\n expect(resultNode.router!.cases).to.have.lengthOf(2);\n expect(resultNode.router!.cases![0].type).to.equal('has_phrase');\n expect(resultNode.router!.cases![0].arguments).to.deep.equal(['red']);\n expect(resultNode.router!.cases![1].type).to.equal('has_any_word');\n expect(resultNode.router!.cases![1].arguments).to.deep.equal([\n 'blue',\n 'azure'\n ]);\n\n // Verify categories\n expect(resultNode.router!.categories).to.have.lengthOf(3); // Red, Blue, Other\n expect(resultNode.router!.categories[0].name).to.equal('Red');\n expect(resultNode.router!.categories[1].name).to.equal('Blue');\n expect(resultNode.router!.categories[2].name).to.equal('Other');\n\n // Verify exits\n expect(resultNode.exits).to.have.lengthOf(3);\n });\n\n it('should transform form data without rules to node correctly', () => {\n const formData = {\n uuid: 'test-node-uuid',\n result: [{ value: 'age', name: 'Age' }],\n rules: [],\n result_name: ''\n };\n\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.old_result',\n cases: [],\n categories: [],\n default_category_uuid: ''\n },\n exits: []\n };\n\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n expect(resultNode.uuid).to.equal('test-node-uuid');\n expect(resultNode.router).to.exist;\n expect(resultNode.router!.type).to.equal('switch');\n expect(resultNode.router!.operand).to.equal('@results.age');\n expect(resultNode.router!.result_name).to.be.undefined;\n\n // Should have only the default 'All Responses' category (no rules means \"All Responses\")\n expect(resultNode.router!.categories).to.have.lengthOf(1);\n expect(resultNode.router!.categories[0].name).to.equal('All Responses');\n\n // Should have one exit\n expect(resultNode.exits).to.have.lengthOf(1);\n });\n\n it('should not set result_name if empty', () => {\n const formData = {\n uuid: 'test-node-uuid',\n result: [{ value: 'favorite_color', name: 'Favorite Color' }],\n rules: [],\n result_name: ''\n };\n\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.old_result',\n cases: [],\n categories: [],\n default_category_uuid: ''\n },\n exits: []\n };\n\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n expect(resultNode.router!.result_name).to.be.undefined;\n });\n\n it('should preserve existing UUIDs when updating categories', () => {\n const formData = {\n uuid: 'test-node-uuid',\n result: [{ value: 'favorite_color', name: 'Favorite Color' }],\n rules: [\n {\n operator: { value: 'has_phrase', name: 'has the phrase' },\n value1: 'red',\n value2: '',\n category: 'Red'\n }\n ],\n result_name: ''\n };\n\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.favorite_color',\n cases: [\n {\n uuid: 'existing-case-uuid',\n type: 'has_phrase',\n arguments: ['red'],\n category_uuid: 'existing-cat-uuid'\n }\n ],\n categories: [\n {\n uuid: 'existing-cat-uuid',\n name: 'Red',\n exit_uuid: 'existing-exit-uuid'\n },\n {\n uuid: 'existing-other-uuid',\n name: 'Other',\n exit_uuid: 'existing-other-exit-uuid'\n }\n ],\n default_category_uuid: 'existing-other-uuid'\n },\n exits: [\n { uuid: 'existing-exit-uuid', destination_uuid: 'some-node' },\n { uuid: 'existing-other-exit-uuid', destination_uuid: null }\n ]\n };\n\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n // Should preserve existing category UUIDs\n const redCategory = resultNode.router!.categories.find(\n (cat) => cat.name === 'Red'\n );\n expect(redCategory!.uuid).to.equal('existing-cat-uuid');\n expect(redCategory!.exit_uuid).to.equal('existing-exit-uuid');\n\n const otherCategory = resultNode.router!.categories.find(\n (cat) => cat.name === 'Other'\n );\n expect(otherCategory!.uuid).to.equal('existing-other-uuid');\n expect(otherCategory!.exit_uuid).to.equal('existing-other-exit-uuid');\n\n // Should preserve exit destinations\n const redExit = resultNode.exits.find(\n (exit) => exit.uuid === 'existing-exit-uuid'\n );\n expect(redExit!.destination_uuid).to.equal('some-node');\n });\n\n it('should handle form data without result selection', () => {\n const formData = {\n uuid: 'test-node-uuid',\n result: [],\n rules: [],\n result_name: ''\n };\n\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.old_result',\n cases: [],\n categories: [],\n default_category_uuid: ''\n },\n exits: []\n };\n\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n // Should return the original node unchanged\n expect(resultNode).to.equal(originalNode);\n });\n\n it('should handle incomplete rules gracefully', () => {\n const formData = {\n uuid: 'test-node-uuid',\n result: [{ value: 'age', name: 'Age' }],\n rules: [\n {\n operator: { value: 'has_number_gte', name: 'has a number above' },\n value1: '18',\n value2: '',\n category: 'Adult'\n },\n {\n operator: { value: 'has_number_lt', name: 'has a number below' },\n value1: '', // Missing value1\n value2: '',\n category: 'Child'\n },\n {\n operator: {\n value: 'has_number_between',\n name: 'has a number between'\n },\n value1: '10',\n value2: '', // Missing value2 for 2-operand operator\n category: 'Teen'\n }\n ],\n result_name: ''\n };\n\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.age',\n cases: [],\n categories: [],\n default_category_uuid: ''\n },\n exits: []\n };\n\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n // Only the first complete rule should be included\n expect(resultNode.router!.cases).to.have.lengthOf(1);\n expect(resultNode.router!.cases![0].type).to.equal('has_number_gte');\n\n // Should have Adult category and Other\n expect(resultNode.router!.categories).to.have.lengthOf(2);\n expect(resultNode.router!.categories[0].name).to.equal('Adult');\n expect(resultNode.router!.categories[1].name).to.equal('Other');\n });\n\n it('should handle two-operand operators correctly', () => {\n const formData = {\n uuid: 'test-node-uuid',\n result: [{ value: 'age', name: 'Age' }],\n rules: [\n {\n operator: {\n value: 'has_number_between',\n name: 'has a number between'\n },\n value1: '13',\n value2: '17',\n category: 'Teen'\n }\n ],\n result_name: ''\n };\n\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.age',\n cases: [],\n categories: [],\n default_category_uuid: ''\n },\n exits: []\n };\n\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n expect(resultNode.router!.cases).to.have.lengthOf(1);\n expect(resultNode.router!.cases![0].type).to.equal('has_number_between');\n expect(resultNode.router!.cases![0].arguments).to.deep.equal([\n '13',\n '17'\n ]);\n });\n });\n\n describe('validation', () => {\n it('should validate that a result is required', () => {\n const formData = {\n result: [],\n rules: [],\n result_name: ''\n };\n\n const validation = split_by_run_result.validate!(formData);\n\n expect(validation.valid).to.be.false;\n expect(validation.errors).to.have.property('result');\n expect(validation.errors.result).to.equal('A flow result is required');\n });\n\n it('should pass validation with valid result', () => {\n const formData = {\n result: [{ value: 'favorite_color', name: 'Favorite Color' }],\n rules: [],\n result_name: ''\n };\n\n const validation = split_by_run_result.validate!(formData);\n\n expect(validation.valid).to.be.true;\n expect(validation.errors).to.deep.equal({});\n });\n\n it('should pass validation with result and rules', () => {\n const formData = {\n result: [{ value: 'age', name: 'Age' }],\n rules: [\n {\n operator: { value: 'has_number_gte', name: 'has a number above' },\n value1: '18',\n value2: '',\n category: 'Adult'\n }\n ],\n result_name: 'age_category'\n };\n\n const validation = split_by_run_result.validate!(formData);\n\n expect(validation.valid).to.be.true;\n expect(validation.errors).to.deep.equal({});\n });\n });\n\n describe('delimiter functionality', () => {\n describe('toFormData', () => {\n it('should extract delimiter configuration when enabled', () => {\n const node: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@(field(results.favorite_color, 2, \".\"))',\n cases: [\n {\n uuid: 'case-1',\n type: 'has_phrase',\n arguments: ['red'],\n category_uuid: 'cat-1'\n }\n ],\n categories: [\n { uuid: 'cat-1', name: 'Red', exit_uuid: 'exit-1' },\n { uuid: 'cat-other', name: 'Other', exit_uuid: 'exit-other' }\n ],\n default_category_uuid: 'cat-other',\n result_name: 'color_category'\n },\n exits: [\n { uuid: 'exit-1', destination_uuid: null },\n { uuid: 'exit-other', destination_uuid: null }\n ]\n };\n\n const nodeUI = {\n config: {\n operand: {\n value: 'favorite_color',\n name: 'Favorite Color'\n },\n index: 2,\n delimiter: '.'\n }\n };\n\n const formData = split_by_run_result.toFormData!(node, nodeUI);\n\n expect(formData.delimit_by).to.be.an('array');\n expect(formData.delimit_by[0].value).to.equal('.');\n expect(formData.delimit_by[0].name).to.equal('Delimited by periods');\n expect(formData.delimit_index).to.be.an('array');\n expect(formData.delimit_index[0].value).to.equal('2');\n expect(formData.delimit_index[0].name).to.equal('third result');\n });\n\n it('should handle delimiter not enabled', () => {\n const node: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.favorite_color',\n cases: [],\n categories: [\n {\n uuid: 'cat-all',\n name: 'All Responses',\n exit_uuid: 'exit-all'\n }\n ],\n default_category_uuid: 'cat-all'\n },\n exits: [{ uuid: 'exit-all', destination_uuid: null }]\n };\n\n const nodeUI = {\n config: {\n operand: {\n value: 'favorite_color',\n name: 'Favorite Color'\n }\n }\n };\n\n const formData = split_by_run_result.toFormData!(node, nodeUI);\n\n expect(formData.delimit_by).to.be.an('array');\n expect(formData.delimit_by[0].value).to.equal('');\n expect(formData.delimit_by[0].name).to.equal(\"Don't delimit result\");\n expect(formData.delimit_index).to.be.an('array');\n expect(formData.delimit_index[0].value).to.equal('0');\n });\n });\n\n describe('fromFormData', () => {\n it('should generate operand with field() function when delimiter enabled', () => {\n const formData = {\n uuid: 'test-node-uuid',\n result: [{ value: 'favorite_color', name: 'Favorite Color' }],\n delimit_by: [{ value: '+', name: 'plusses' }],\n delimit_index: [{ value: '1', name: 'second' }],\n rules: [\n {\n operator: { value: 'has_phrase', name: 'has the phrase' },\n value1: 'red',\n value2: '',\n category: 'Red'\n }\n ],\n result_name: 'color_category'\n };\n\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.old_result',\n cases: [],\n categories: [],\n default_category_uuid: ''\n },\n exits: []\n };\n\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n expect(resultNode.router!.operand).to.equal(\n '@(field(results.favorite_color, 1, \"+\"))'\n );\n });\n\n it('should generate standard operand when delimiter not enabled', () => {\n const formData = {\n uuid: 'test-node-uuid',\n result: [{ value: 'favorite_color', name: 'Favorite Color' }],\n delimit_by: [{ value: '', name: \"Don't delimit\" }],\n delimit_index: [{ value: '0', name: 'first' }],\n rules: [],\n result_name: ''\n };\n\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.old_result',\n cases: [],\n categories: [],\n default_category_uuid: ''\n },\n exits: []\n };\n\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n expect(resultNode.router!.operand).to.equal('@results.favorite_color');\n });\n\n it('should handle different field numbers correctly', () => {\n const formData = {\n uuid: 'test-node-uuid',\n result: [{ value: 'age', name: 'Age' }],\n delimit_by: [{ value: '.', name: 'periods' }],\n delimit_index: [{ value: '9', name: 'tenth' }],\n rules: [],\n result_name: ''\n };\n\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.age',\n cases: [],\n categories: [],\n default_category_uuid: ''\n },\n exits: []\n };\n\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n expect(resultNode.router!.operand).to.equal(\n '@(field(results.age, 9, \".\"))'\n );\n });\n\n it('should use default values when delimiter fields missing', () => {\n const formData = {\n uuid: 'test-node-uuid',\n result: [{ value: 'favorite_color', name: 'Favorite Color' }],\n delimit_by: [{ value: ' ', name: 'spaces' }],\n rules: [],\n result_name: ''\n };\n\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.old_result',\n cases: [],\n categories: [],\n default_category_uuid: ''\n },\n exits: []\n };\n\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n expect(resultNode.router!.operand).to.equal(\n '@(field(results.favorite_color, 0, \" \"))'\n );\n });\n });\n\n describe('toUIConfig', () => {\n it('should persist delimiter configuration when enabled', () => {\n const formData = {\n result: [{ value: 'favorite_color', name: 'Favorite Color' }],\n delimit_by: [{ value: '+', name: 'plusses' }],\n delimit_index: [{ value: '3', name: 'fourth' }],\n rules: [],\n result_name: ''\n };\n\n const config = split_by_run_result.toUIConfig!(formData);\n\n expect(config.operand).to.exist;\n expect(config.operand.id).to.equal('favorite_color');\n expect(config.index).to.equal(3);\n expect(config.delimiter).to.equal('+');\n });\n\n it('should not include delimiter config when not enabled', () => {\n const formData = {\n result: [{ value: 'favorite_color', name: 'Favorite Color' }],\n delimit_by: [{ value: '', name: \"Don't delimit\" }],\n delimit_index: [{ value: '0', name: 'first' }],\n rules: [],\n result_name: ''\n };\n\n const config = split_by_run_result.toUIConfig!(formData);\n\n expect(config.operand).to.exist;\n expect(config.operand.id).to.equal('favorite_color');\n expect(config.index).to.be.undefined;\n expect(config.delimiter).to.be.undefined;\n });\n });\n\n describe('round-trip tests', () => {\n it('should preserve delimiter configuration through toFormData and fromFormData', () => {\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@(field(results.favorite_color, 5, \".\"))',\n cases: [\n {\n uuid: 'case-1',\n type: 'has_phrase',\n arguments: ['red'],\n category_uuid: 'cat-1'\n }\n ],\n categories: [\n { uuid: 'cat-1', name: 'Red', exit_uuid: 'exit-1' },\n { uuid: 'cat-other', name: 'Other', exit_uuid: 'exit-other' }\n ],\n default_category_uuid: 'cat-other',\n result_name: 'color_category'\n },\n exits: [\n { uuid: 'exit-1', destination_uuid: null },\n { uuid: 'exit-other', destination_uuid: null }\n ]\n };\n\n const nodeUI = {\n config: {\n operand: {\n value: 'favorite_color',\n name: 'Favorite Color'\n },\n index: 5,\n delimiter: '.'\n }\n };\n\n // Convert to form data\n const formData = split_by_run_result.toFormData!(originalNode, nodeUI);\n\n // Convert back to node\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n // Verify operand is preserved\n expect(resultNode.router!.operand).to.equal(\n '@(field(results.favorite_color, 5, \".\"))'\n );\n });\n\n it('should handle toggling delimiter on and off', () => {\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.favorite_color',\n cases: [],\n categories: [\n {\n uuid: 'cat-all',\n name: 'All Responses',\n exit_uuid: 'exit-all'\n }\n ],\n default_category_uuid: 'cat-all'\n },\n exits: [{ uuid: 'exit-all', destination_uuid: null }]\n };\n\n // Start with delimiter disabled\n const nodeUI = {\n config: {\n operand: {\n value: 'favorite_color',\n name: 'Favorite Color'\n }\n }\n };\n\n // Convert to form data\n const formData = split_by_run_result.toFormData!(originalNode, nodeUI);\n expect(formData.delimit_by[0].value).to.equal('');\n\n // Enable delimiter\n formData.delimit_by = [{ value: '+', name: 'plusses' }];\n formData.delimit_index = [{ value: '2', name: 'third' }];\n\n // Convert to node\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n expect(resultNode.router!.operand).to.equal(\n '@(field(results.favorite_color, 2, \"+\"))'\n );\n\n // Get UI config and verify it persists delimiter settings\n const config = split_by_run_result.toUIConfig!(formData);\n expect(config.index).to.equal(2);\n expect(config.delimiter).to.equal('+');\n });\n\n it('should properly remove delimiter when switching from delimited to non-delimited', () => {\n // Start with a node that has delimiter enabled\n const nodeWithDelimiter: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@(field(results.favorite_color, 2, \".\"))',\n cases: [],\n categories: [\n {\n uuid: 'cat-all',\n name: 'All Responses',\n exit_uuid: 'exit-all'\n }\n ],\n default_category_uuid: 'cat-all'\n },\n exits: [{ uuid: 'exit-all', destination_uuid: null }]\n };\n\n const nodeUI = {\n config: {\n operand: {\n value: 'favorite_color',\n name: 'Favorite Color'\n }\n }\n };\n\n // Convert to form data - should show delimiter is enabled\n const formData = split_by_run_result.toFormData!(\n nodeWithDelimiter,\n nodeUI\n );\n expect(formData.delimit_by[0].value).to.equal('.');\n expect(formData.delimit_index[0].value).to.equal('2');\n\n // Now remove the delimiter by selecting \"Don't delimit result\"\n formData.delimit_by = [{ value: '', name: \"Don't delimit result\" }];\n\n // Convert back to node\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n nodeWithDelimiter\n );\n\n // Operand should now be standard without field() function\n expect(resultNode.router!.operand).to.equal('@results.favorite_color');\n\n // Get UI config - should NOT have index or delimiter\n const config = split_by_run_result.toUIConfig!(formData);\n expect(config.index).to.be.undefined;\n expect(config.delimiter).to.be.undefined;\n\n // Re-open the dialog - toFormData should show no delimiter\n const formDataReopened = split_by_run_result.toFormData!(\n resultNode,\n nodeUI\n );\n expect(formDataReopened.delimit_by[0].value).to.equal('');\n expect(formDataReopened.delimit_by[0].name).to.equal(\n \"Don't delimit result\"\n );\n });\n });\n });\n});\n"]}
1
+ {"version":3,"file":"split_by_run_result.test.js","sourceRoot":"","sources":["../../../test/nodes/split_by_run_result.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAE/E,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD;;GAEG;AACH,QAAQ,CAAC,iCAAiC,EAAE,GAAG,EAAE;IAC/C,MAAM,MAAM,GAAG,IAAI,QAAQ,CAAC,mBAAmB,EAAE,qBAAqB,CAAC,CAAC;IAExE,wDAAwD;IACxD,UAAU,CAAC,GAAG,EAAE;QACd,mCAAmC;QACnC,OAAO,CAAC,QAAQ,CAAC;YACf,QAAQ,EAAE;gBACR,OAAO,EAAE;oBACP;wBACE,GAAG,EAAE,gBAAgB;wBACrB,IAAI,EAAE,gBAAgB;wBACtB,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC;wBACpC,UAAU,EAAE,CAAC,QAAQ,CAAC;qBACvB;oBACD;wBACE,GAAG,EAAE,KAAK;wBACV,IAAI,EAAE,KAAK;wBACX,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC;wBACtC,UAAU,EAAE,CAAC,QAAQ,CAAC;qBACvB;iBACF;gBACD,YAAY,EAAE,EAAE;gBAChB,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE;gBAClC,MAAM,EAAE,EAAE;aACX;SACK,CAAC,CAAC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AC,KAAK,CAAC,OAAO,CAAC,CAAC;YAClD,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACnD,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expect } from '@open-wc/testing';\nimport { split_by_run_result } from '../../src/flow/nodes/split_by_run_result';\nimport { Node } from '../../src/store/flow-definition';\nimport { NodeTest } from '../NodeHelper';\nimport { zustand } from '../../src/store/AppState';\nimport { NODE_CONFIG } from '../../src/flow/config';\n\n/**\n * Test suite for the split_by_run_result node configuration.\n */\ndescribe('split_by_run_result node config', () => {\n const helper = new NodeTest(split_by_run_result, 'split_by_run_result');\n\n // Setup mock flow results in the store before each test\n beforeEach(() => {\n // Mock the store with flow results\n zustand.setState({\n flowInfo: {\n results: [\n {\n key: 'favorite_color',\n name: 'Favorite Color',\n categories: ['Red', 'Blue', 'Green'],\n node_uuids: ['node-1']\n },\n {\n key: 'age',\n name: 'Age',\n categories: ['Adult', 'Teen', 'Child'],\n node_uuids: ['node-2']\n }\n ],\n dependencies: [],\n counts: { nodes: 0, languages: 0 },\n locals: []\n }\n } as any);\n });\n\n describe('basic properties', () => {\n helper.testBasicProperties();\n\n it('has correct name', () => {\n expect(split_by_run_result.name).to.equal('Split by Result');\n });\n\n it('has correct type', () => {\n expect(split_by_run_result.type).to.equal('split_by_run_result');\n });\n\n it('has correct dialog size', () => {\n expect(split_by_run_result.dialogSize).to.equal('large');\n });\n });\n\n describe('toFormData', () => {\n it('should transform node with rules to form data correctly', () => {\n const node: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.favorite_color',\n cases: [\n {\n uuid: 'case-1',\n type: 'has_phrase',\n arguments: ['red'],\n category_uuid: 'cat-1'\n },\n {\n uuid: 'case-2',\n type: 'has_any_word',\n arguments: ['blue', 'azure'],\n category_uuid: 'cat-2'\n }\n ],\n categories: [\n { uuid: 'cat-1', name: 'Red', exit_uuid: 'exit-1' },\n { uuid: 'cat-2', name: 'Blue', exit_uuid: 'exit-2' },\n { uuid: 'cat-other', name: 'Other', exit_uuid: 'exit-other' }\n ],\n default_category_uuid: 'cat-other',\n result_name: 'color_category'\n },\n exits: [\n { uuid: 'exit-1', destination_uuid: null },\n { uuid: 'exit-2', destination_uuid: null },\n { uuid: 'exit-other', destination_uuid: null }\n ]\n };\n\n const nodeUI = {\n config: {\n operand: {\n value: 'favorite_color',\n name: 'Favorite Color'\n }\n }\n };\n\n const formData = split_by_run_result.toFormData!(node, nodeUI);\n\n expect(formData.uuid).to.equal('test-node-uuid');\n expect(formData.result).to.be.an('array');\n expect(formData.result[0].value).to.equal('favorite_color');\n expect(formData.result[0].name).to.equal('Favorite Color');\n expect(formData.rules).to.have.lengthOf(2);\n\n // Check first rule\n expect(formData.rules[0].operator.value).to.equal('has_phrase');\n expect(formData.rules[0].value1).to.equal('red');\n expect(formData.rules[0].category).to.equal('Red');\n\n // Check second rule\n expect(formData.rules[1].operator.value).to.equal('has_any_word');\n expect(formData.rules[1].value1).to.equal('blue azure');\n expect(formData.rules[1].category).to.equal('Blue');\n\n expect(formData.result_name).to.equal('color_category');\n });\n\n it('should transform node with no rules to form data correctly', () => {\n const node: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.age',\n cases: [],\n categories: [\n {\n uuid: 'cat-all',\n name: 'All Responses',\n exit_uuid: 'exit-all'\n }\n ],\n default_category_uuid: 'cat-all'\n },\n exits: [{ uuid: 'exit-all', destination_uuid: null }]\n };\n\n const nodeUI = {\n config: {\n operand: {\n value: 'age',\n name: 'Age'\n }\n }\n };\n\n const formData = split_by_run_result.toFormData!(node, nodeUI);\n\n expect(formData.uuid).to.equal('test-node-uuid');\n expect(formData.result).to.be.an('array');\n expect(formData.result[0].value).to.equal('age');\n expect(formData.result[0].name).to.equal('Age');\n expect(formData.rules).to.have.lengthOf(0);\n expect(formData.result_name).to.equal('');\n });\n\n it('should handle missing nodeUI config gracefully', () => {\n const node: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.favorite_color',\n cases: [],\n categories: [\n {\n uuid: 'cat-all',\n name: 'All Responses',\n exit_uuid: 'exit-all'\n }\n ],\n default_category_uuid: 'cat-all'\n },\n exits: [{ uuid: 'exit-all', destination_uuid: null }]\n };\n\n const formData = split_by_run_result.toFormData!(node);\n\n expect(formData.uuid).to.equal('test-node-uuid');\n expect(formData.result).to.be.an('array');\n expect(formData.result).to.have.lengthOf(0);\n });\n\n it('should transform node with two-operand operators correctly', () => {\n const node: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.age',\n cases: [\n {\n uuid: 'case-1',\n type: 'has_number_between',\n arguments: ['13', '17'],\n category_uuid: 'cat-1'\n }\n ],\n categories: [\n { uuid: 'cat-1', name: 'Teen', exit_uuid: 'exit-1' },\n { uuid: 'cat-other', name: 'Other', exit_uuid: 'exit-other' }\n ],\n default_category_uuid: 'cat-other'\n },\n exits: [\n { uuid: 'exit-1', destination_uuid: null },\n { uuid: 'exit-other', destination_uuid: null }\n ]\n };\n\n const nodeUI = {\n config: {\n operand: {\n value: 'age',\n name: 'Age'\n }\n }\n };\n\n const formData = split_by_run_result.toFormData!(node, nodeUI);\n\n expect(formData.rules).to.have.lengthOf(1);\n expect(formData.rules[0].operator.value).to.equal('has_number_between');\n expect(formData.rules[0].value1).to.equal('13');\n expect(formData.rules[0].value2).to.equal('17');\n expect(formData.rules[0].category).to.equal('Teen');\n });\n\n it('should transform node with zero-operand operators correctly', () => {\n const node: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.age',\n cases: [\n {\n uuid: 'case-1',\n type: 'has_number',\n arguments: [],\n category_uuid: 'cat-1'\n }\n ],\n categories: [\n { uuid: 'cat-1', name: 'Has Number', exit_uuid: 'exit-1' },\n { uuid: 'cat-other', name: 'Other', exit_uuid: 'exit-other' }\n ],\n default_category_uuid: 'cat-other'\n },\n exits: [\n { uuid: 'exit-1', destination_uuid: null },\n { uuid: 'exit-other', destination_uuid: null }\n ]\n };\n\n const nodeUI = {\n config: {\n operand: {\n value: 'age',\n name: 'Age'\n }\n }\n };\n\n const formData = split_by_run_result.toFormData!(node, nodeUI);\n\n expect(formData.rules).to.have.lengthOf(1);\n expect(formData.rules[0].operator.value).to.equal('has_number');\n expect(formData.rules[0].value1).to.equal('');\n expect(formData.rules[0].value2).to.equal('');\n });\n });\n\n describe('fromFormData', () => {\n it('should transform form data with rules to node correctly', () => {\n const formData = {\n uuid: 'test-node-uuid',\n result: [{ value: 'favorite_color', name: 'Favorite Color' }],\n rules: [\n {\n operator: { value: 'has_phrase', name: 'has the phrase' },\n value1: 'red',\n value2: '',\n category: 'Red'\n },\n {\n operator: { value: 'has_any_word', name: 'has any of the words' },\n value1: 'blue azure',\n value2: '',\n category: 'Blue'\n }\n ],\n result_name: 'color_category'\n };\n\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.old_result',\n cases: [],\n categories: [],\n default_category_uuid: ''\n },\n exits: []\n };\n\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n expect(resultNode.uuid).to.equal('test-node-uuid');\n expect(resultNode.router).to.exist;\n expect(resultNode.router!.type).to.equal('switch');\n expect(resultNode.router!.operand).to.equal('@results.favorite_color');\n expect(resultNode.router!.result_name).to.equal('color_category');\n\n // Verify cases\n expect(resultNode.router!.cases).to.have.lengthOf(2);\n expect(resultNode.router!.cases![0].type).to.equal('has_phrase');\n expect(resultNode.router!.cases![0].arguments).to.deep.equal(['red']);\n expect(resultNode.router!.cases![1].type).to.equal('has_any_word');\n expect(resultNode.router!.cases![1].arguments).to.deep.equal([\n 'blue',\n 'azure'\n ]);\n\n // Verify categories\n expect(resultNode.router!.categories).to.have.lengthOf(3); // Red, Blue, Other\n expect(resultNode.router!.categories[0].name).to.equal('Red');\n expect(resultNode.router!.categories[1].name).to.equal('Blue');\n expect(resultNode.router!.categories[2].name).to.equal('Other');\n\n // Verify exits\n expect(resultNode.exits).to.have.lengthOf(3);\n });\n\n it('should transform form data without rules to node correctly', () => {\n const formData = {\n uuid: 'test-node-uuid',\n result: [{ value: 'age', name: 'Age' }],\n rules: [],\n result_name: ''\n };\n\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.old_result',\n cases: [],\n categories: [],\n default_category_uuid: ''\n },\n exits: []\n };\n\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n expect(resultNode.uuid).to.equal('test-node-uuid');\n expect(resultNode.router).to.exist;\n expect(resultNode.router!.type).to.equal('switch');\n expect(resultNode.router!.operand).to.equal('@results.age');\n expect(resultNode.router!.result_name).to.be.undefined;\n\n // Should have only the default 'All Responses' category (no rules means \"All Responses\")\n expect(resultNode.router!.categories).to.have.lengthOf(1);\n expect(resultNode.router!.categories[0].name).to.equal('All Responses');\n\n // Should have one exit\n expect(resultNode.exits).to.have.lengthOf(1);\n });\n\n it('should not set result_name if empty', () => {\n const formData = {\n uuid: 'test-node-uuid',\n result: [{ value: 'favorite_color', name: 'Favorite Color' }],\n rules: [],\n result_name: ''\n };\n\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.old_result',\n cases: [],\n categories: [],\n default_category_uuid: ''\n },\n exits: []\n };\n\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n expect(resultNode.router!.result_name).to.be.undefined;\n });\n\n it('should preserve existing UUIDs when updating categories', () => {\n const formData = {\n uuid: 'test-node-uuid',\n result: [{ value: 'favorite_color', name: 'Favorite Color' }],\n rules: [\n {\n operator: { value: 'has_phrase', name: 'has the phrase' },\n value1: 'red',\n value2: '',\n category: 'Red'\n }\n ],\n result_name: ''\n };\n\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.favorite_color',\n cases: [\n {\n uuid: 'existing-case-uuid',\n type: 'has_phrase',\n arguments: ['red'],\n category_uuid: 'existing-cat-uuid'\n }\n ],\n categories: [\n {\n uuid: 'existing-cat-uuid',\n name: 'Red',\n exit_uuid: 'existing-exit-uuid'\n },\n {\n uuid: 'existing-other-uuid',\n name: 'Other',\n exit_uuid: 'existing-other-exit-uuid'\n }\n ],\n default_category_uuid: 'existing-other-uuid'\n },\n exits: [\n { uuid: 'existing-exit-uuid', destination_uuid: 'some-node' },\n { uuid: 'existing-other-exit-uuid', destination_uuid: null }\n ]\n };\n\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n // Should preserve existing category UUIDs\n const redCategory = resultNode.router!.categories.find(\n (cat) => cat.name === 'Red'\n );\n expect(redCategory!.uuid).to.equal('existing-cat-uuid');\n expect(redCategory!.exit_uuid).to.equal('existing-exit-uuid');\n\n const otherCategory = resultNode.router!.categories.find(\n (cat) => cat.name === 'Other'\n );\n expect(otherCategory!.uuid).to.equal('existing-other-uuid');\n expect(otherCategory!.exit_uuid).to.equal('existing-other-exit-uuid');\n\n // Should preserve exit destinations\n const redExit = resultNode.exits.find(\n (exit) => exit.uuid === 'existing-exit-uuid'\n );\n expect(redExit!.destination_uuid).to.equal('some-node');\n });\n\n it('should handle form data without result selection', () => {\n const formData = {\n uuid: 'test-node-uuid',\n result: [],\n rules: [],\n result_name: ''\n };\n\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.old_result',\n cases: [],\n categories: [],\n default_category_uuid: ''\n },\n exits: []\n };\n\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n // Should return the original node unchanged\n expect(resultNode).to.equal(originalNode);\n });\n\n it('should handle incomplete rules gracefully', () => {\n const formData = {\n uuid: 'test-node-uuid',\n result: [{ value: 'age', name: 'Age' }],\n rules: [\n {\n operator: { value: 'has_number_gte', name: 'has a number above' },\n value1: '18',\n value2: '',\n category: 'Adult'\n },\n {\n operator: { value: 'has_number_lt', name: 'has a number below' },\n value1: '', // Missing value1\n value2: '',\n category: 'Child'\n },\n {\n operator: {\n value: 'has_number_between',\n name: 'has a number between'\n },\n value1: '10',\n value2: '', // Missing value2 for 2-operand operator\n category: 'Teen'\n }\n ],\n result_name: ''\n };\n\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.age',\n cases: [],\n categories: [],\n default_category_uuid: ''\n },\n exits: []\n };\n\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n // Only the first complete rule should be included\n expect(resultNode.router!.cases).to.have.lengthOf(1);\n expect(resultNode.router!.cases![0].type).to.equal('has_number_gte');\n\n // Should have Adult category and Other\n expect(resultNode.router!.categories).to.have.lengthOf(2);\n expect(resultNode.router!.categories[0].name).to.equal('Adult');\n expect(resultNode.router!.categories[1].name).to.equal('Other');\n });\n\n it('should handle two-operand operators correctly', () => {\n const formData = {\n uuid: 'test-node-uuid',\n result: [{ value: 'age', name: 'Age' }],\n rules: [\n {\n operator: {\n value: 'has_number_between',\n name: 'has a number between'\n },\n value1: '13',\n value2: '17',\n category: 'Teen'\n }\n ],\n result_name: ''\n };\n\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.age',\n cases: [],\n categories: [],\n default_category_uuid: ''\n },\n exits: []\n };\n\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n expect(resultNode.router!.cases).to.have.lengthOf(1);\n expect(resultNode.router!.cases![0].type).to.equal('has_number_between');\n expect(resultNode.router!.cases![0].arguments).to.deep.equal([\n '13',\n '17'\n ]);\n });\n });\n\n describe('validation', () => {\n it('should validate that a result is required', () => {\n const formData = {\n result: [],\n rules: [],\n result_name: ''\n };\n\n const validation = split_by_run_result.validate!(formData);\n\n expect(validation.valid).to.be.false;\n expect(validation.errors).to.have.property('result');\n expect(validation.errors.result).to.equal('A flow result is required');\n });\n\n it('should pass validation with valid result', () => {\n const formData = {\n result: [{ value: 'favorite_color', name: 'Favorite Color' }],\n rules: [],\n result_name: ''\n };\n\n const validation = split_by_run_result.validate!(formData);\n\n expect(validation.valid).to.be.true;\n expect(validation.errors).to.deep.equal({});\n });\n\n it('should pass validation with result and rules', () => {\n const formData = {\n result: [{ value: 'age', name: 'Age' }],\n rules: [\n {\n operator: { value: 'has_number_gte', name: 'has a number above' },\n value1: '18',\n value2: '',\n category: 'Adult'\n }\n ],\n result_name: 'age_category'\n };\n\n const validation = split_by_run_result.validate!(formData);\n\n expect(validation.valid).to.be.true;\n expect(validation.errors).to.deep.equal({});\n });\n });\n\n describe('delimiter functionality', () => {\n describe('toFormData', () => {\n it('should extract delimiter configuration when enabled', () => {\n const node: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@(field(results.favorite_color, 2, \".\"))',\n cases: [\n {\n uuid: 'case-1',\n type: 'has_phrase',\n arguments: ['red'],\n category_uuid: 'cat-1'\n }\n ],\n categories: [\n { uuid: 'cat-1', name: 'Red', exit_uuid: 'exit-1' },\n { uuid: 'cat-other', name: 'Other', exit_uuid: 'exit-other' }\n ],\n default_category_uuid: 'cat-other',\n result_name: 'color_category'\n },\n exits: [\n { uuid: 'exit-1', destination_uuid: null },\n { uuid: 'exit-other', destination_uuid: null }\n ]\n };\n\n const nodeUI = {\n config: {\n operand: {\n value: 'favorite_color',\n name: 'Favorite Color'\n },\n index: 2,\n delimiter: '.'\n }\n };\n\n const formData = split_by_run_result.toFormData!(node, nodeUI);\n\n expect(formData.delimit_by).to.be.an('array');\n expect(formData.delimit_by[0].value).to.equal('.');\n expect(formData.delimit_by[0].name).to.equal('Delimited by periods');\n expect(formData.delimit_index).to.be.an('array');\n expect(formData.delimit_index[0].value).to.equal('2');\n expect(formData.delimit_index[0].name).to.equal('third result');\n });\n\n it('should handle delimiter not enabled', () => {\n const node: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.favorite_color',\n cases: [],\n categories: [\n {\n uuid: 'cat-all',\n name: 'All Responses',\n exit_uuid: 'exit-all'\n }\n ],\n default_category_uuid: 'cat-all'\n },\n exits: [{ uuid: 'exit-all', destination_uuid: null }]\n };\n\n const nodeUI = {\n config: {\n operand: {\n value: 'favorite_color',\n name: 'Favorite Color'\n }\n }\n };\n\n const formData = split_by_run_result.toFormData!(node, nodeUI);\n\n expect(formData.delimit_by).to.be.an('array');\n expect(formData.delimit_by[0].value).to.equal('');\n expect(formData.delimit_by[0].name).to.equal(\"Don't delimit result\");\n expect(formData.delimit_index).to.be.an('array');\n expect(formData.delimit_index[0].value).to.equal('0');\n });\n });\n\n describe('fromFormData', () => {\n it('should generate operand with field() function when delimiter enabled', () => {\n const formData = {\n uuid: 'test-node-uuid',\n result: [{ value: 'favorite_color', name: 'Favorite Color' }],\n delimit_by: [{ value: '+', name: 'plusses' }],\n delimit_index: [{ value: '1', name: 'second' }],\n rules: [\n {\n operator: { value: 'has_phrase', name: 'has the phrase' },\n value1: 'red',\n value2: '',\n category: 'Red'\n }\n ],\n result_name: 'color_category'\n };\n\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.old_result',\n cases: [],\n categories: [],\n default_category_uuid: ''\n },\n exits: []\n };\n\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n expect(resultNode.router!.operand).to.equal(\n '@(field(results.favorite_color, 1, \"+\"))'\n );\n });\n\n it('should generate standard operand when delimiter not enabled', () => {\n const formData = {\n uuid: 'test-node-uuid',\n result: [{ value: 'favorite_color', name: 'Favorite Color' }],\n delimit_by: [{ value: '', name: \"Don't delimit\" }],\n delimit_index: [{ value: '0', name: 'first' }],\n rules: [],\n result_name: ''\n };\n\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.old_result',\n cases: [],\n categories: [],\n default_category_uuid: ''\n },\n exits: []\n };\n\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n expect(resultNode.router!.operand).to.equal('@results.favorite_color');\n });\n\n it('should handle different field numbers correctly', () => {\n const formData = {\n uuid: 'test-node-uuid',\n result: [{ value: 'age', name: 'Age' }],\n delimit_by: [{ value: '.', name: 'periods' }],\n delimit_index: [{ value: '9', name: 'tenth' }],\n rules: [],\n result_name: ''\n };\n\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.age',\n cases: [],\n categories: [],\n default_category_uuid: ''\n },\n exits: []\n };\n\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n expect(resultNode.router!.operand).to.equal(\n '@(field(results.age, 9, \".\"))'\n );\n });\n\n it('should use default values when delimiter fields missing', () => {\n const formData = {\n uuid: 'test-node-uuid',\n result: [{ value: 'favorite_color', name: 'Favorite Color' }],\n delimit_by: [{ value: ' ', name: 'spaces' }],\n rules: [],\n result_name: ''\n };\n\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.old_result',\n cases: [],\n categories: [],\n default_category_uuid: ''\n },\n exits: []\n };\n\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n expect(resultNode.router!.operand).to.equal(\n '@(field(results.favorite_color, 0, \" \"))'\n );\n });\n });\n\n describe('toUIConfig', () => {\n it('should persist delimiter configuration when enabled', () => {\n const formData = {\n result: [{ value: 'favorite_color', name: 'Favorite Color' }],\n delimit_by: [{ value: '+', name: 'plusses' }],\n delimit_index: [{ value: '3', name: 'fourth' }],\n rules: [],\n result_name: ''\n };\n\n const config = split_by_run_result.toUIConfig!(formData);\n\n expect(config.operand).to.exist;\n expect(config.operand.id).to.equal('favorite_color');\n expect(config.index).to.equal(3);\n expect(config.delimiter).to.equal('+');\n });\n\n it('should not include delimiter config when not enabled', () => {\n const formData = {\n result: [{ value: 'favorite_color', name: 'Favorite Color' }],\n delimit_by: [{ value: '', name: \"Don't delimit\" }],\n delimit_index: [{ value: '0', name: 'first' }],\n rules: [],\n result_name: ''\n };\n\n const config = split_by_run_result.toUIConfig!(formData);\n\n expect(config.operand).to.exist;\n expect(config.operand.id).to.equal('favorite_color');\n expect(config.index).to.be.undefined;\n expect(config.delimiter).to.be.undefined;\n });\n\n it('should set type to split_by_run_result_delimited when delimiter is enabled', () => {\n const formData = {\n result: [{ value: 'favorite_color', name: 'Favorite Color' }],\n delimit_by: [{ value: '+', name: 'plusses' }],\n delimit_index: [{ value: '3', name: 'fourth' }],\n rules: [],\n result_name: ''\n };\n\n const config = split_by_run_result.toUIConfig!(formData);\n\n expect(config.type).to.equal('split_by_run_result_delimited');\n });\n\n it('should set type to split_by_run_result when delimiter is not enabled', () => {\n const formData = {\n result: [{ value: 'favorite_color', name: 'Favorite Color' }],\n delimit_by: [{ value: '', name: \"Don't delimit\" }],\n delimit_index: [{ value: '0', name: 'first' }],\n rules: [],\n result_name: ''\n };\n\n const config = split_by_run_result.toUIConfig!(formData);\n\n expect(config.type).to.equal('split_by_run_result');\n });\n });\n\n describe('round-trip tests', () => {\n it('should preserve delimiter configuration through toFormData and fromFormData', () => {\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@(field(results.favorite_color, 5, \".\"))',\n cases: [\n {\n uuid: 'case-1',\n type: 'has_phrase',\n arguments: ['red'],\n category_uuid: 'cat-1'\n }\n ],\n categories: [\n { uuid: 'cat-1', name: 'Red', exit_uuid: 'exit-1' },\n { uuid: 'cat-other', name: 'Other', exit_uuid: 'exit-other' }\n ],\n default_category_uuid: 'cat-other',\n result_name: 'color_category'\n },\n exits: [\n { uuid: 'exit-1', destination_uuid: null },\n { uuid: 'exit-other', destination_uuid: null }\n ]\n };\n\n const nodeUI = {\n config: {\n operand: {\n value: 'favorite_color',\n name: 'Favorite Color'\n },\n index: 5,\n delimiter: '.'\n }\n };\n\n // Convert to form data\n const formData = split_by_run_result.toFormData!(originalNode, nodeUI);\n\n // Convert back to node\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n // Verify operand is preserved\n expect(resultNode.router!.operand).to.equal(\n '@(field(results.favorite_color, 5, \".\"))'\n );\n });\n\n it('should handle toggling delimiter on and off', () => {\n const originalNode: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@results.favorite_color',\n cases: [],\n categories: [\n {\n uuid: 'cat-all',\n name: 'All Responses',\n exit_uuid: 'exit-all'\n }\n ],\n default_category_uuid: 'cat-all'\n },\n exits: [{ uuid: 'exit-all', destination_uuid: null }]\n };\n\n // Start with delimiter disabled\n const nodeUI = {\n config: {\n operand: {\n value: 'favorite_color',\n name: 'Favorite Color'\n }\n }\n };\n\n // Convert to form data\n const formData = split_by_run_result.toFormData!(originalNode, nodeUI);\n expect(formData.delimit_by[0].value).to.equal('');\n\n // Enable delimiter\n formData.delimit_by = [{ value: '+', name: 'plusses' }];\n formData.delimit_index = [{ value: '2', name: 'third' }];\n\n // Convert to node\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n originalNode\n );\n\n expect(resultNode.router!.operand).to.equal(\n '@(field(results.favorite_color, 2, \"+\"))'\n );\n\n // Get UI config and verify it persists delimiter settings\n const config = split_by_run_result.toUIConfig!(formData);\n expect(config.index).to.equal(2);\n expect(config.delimiter).to.equal('+');\n });\n\n it('should properly remove delimiter when switching from delimited to non-delimited', () => {\n // Start with a node that has delimiter enabled\n const nodeWithDelimiter: Node = {\n uuid: 'test-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@(field(results.favorite_color, 2, \".\"))',\n cases: [],\n categories: [\n {\n uuid: 'cat-all',\n name: 'All Responses',\n exit_uuid: 'exit-all'\n }\n ],\n default_category_uuid: 'cat-all'\n },\n exits: [{ uuid: 'exit-all', destination_uuid: null }]\n };\n\n const nodeUI = {\n config: {\n operand: {\n value: 'favorite_color',\n name: 'Favorite Color'\n }\n }\n };\n\n // Convert to form data - should show delimiter is enabled\n const formData = split_by_run_result.toFormData!(\n nodeWithDelimiter,\n nodeUI\n );\n expect(formData.delimit_by[0].value).to.equal('.');\n expect(formData.delimit_index[0].value).to.equal('2');\n\n // Now remove the delimiter by selecting \"Don't delimit result\"\n formData.delimit_by = [{ value: '', name: \"Don't delimit result\" }];\n\n // Convert back to node\n const resultNode = split_by_run_result.fromFormData!(\n formData,\n nodeWithDelimiter\n );\n\n // Operand should now be standard without field() function\n expect(resultNode.router!.operand).to.equal('@results.favorite_color');\n\n // Get UI config - should NOT have index or delimiter\n const config = split_by_run_result.toUIConfig!(formData);\n expect(config.index).to.be.undefined;\n expect(config.delimiter).to.be.undefined;\n\n // Re-open the dialog - toFormData should show no delimiter\n const formDataReopened = split_by_run_result.toFormData!(\n resultNode,\n nodeUI\n );\n expect(formDataReopened.delimit_by[0].value).to.equal('');\n expect(formDataReopened.delimit_by[0].name).to.equal(\n \"Don't delimit result\"\n );\n });\n });\n });\n\n describe('backwards compatibility', () => {\n it('should support split_by_run_result_delimited type from old flows', () => {\n // Verify that split_by_run_result_delimited points to the same config as split_by_run_result\n expect(NODE_CONFIG['split_by_run_result_delimited']).to.equal(\n NODE_CONFIG['split_by_run_result']\n );\n expect(NODE_CONFIG['split_by_run_result_delimited']).to.equal(\n split_by_run_result\n );\n\n // Verify we can look up the config with the old type name\n const config = NODE_CONFIG['split_by_run_result_delimited'];\n expect(config).to.not.be.undefined;\n expect(config.name).to.equal('Split by Result');\n });\n\n it('should correctly process old flow with split_by_run_result_delimited type', () => {\n // Simulate a node from an old flow with the delimited type\n const oldNode: Node = {\n uuid: 'old-node-uuid',\n actions: [],\n router: {\n type: 'switch',\n operand: '@(field(results.bloop, 0, \"+\"))',\n cases: [\n {\n uuid: 'case-1',\n type: 'has_any_word',\n arguments: ['red'],\n category_uuid: 'cat-1'\n }\n ],\n categories: [\n { uuid: 'cat-1', name: 'Red', exit_uuid: 'exit-1' },\n { uuid: 'cat-other', name: 'Other', exit_uuid: 'exit-other' }\n ],\n default_category_uuid: 'cat-other'\n },\n exits: [\n { uuid: 'exit-1', destination_uuid: null },\n { uuid: 'exit-other', destination_uuid: null }\n ]\n };\n\n const oldNodeUI = {\n type: 'split_by_run_result_delimited',\n config: {\n operand: {\n id: 'bloop',\n name: 'Bloop',\n type: 'result'\n },\n index: 0,\n delimiter: '+'\n }\n };\n\n // Get config using the old type name - this should work due to backwards compatibility\n const config = NODE_CONFIG[oldNodeUI.type];\n expect(config).to.not.be.undefined;\n\n // Verify we can convert to form data\n const formData = config.toFormData!(oldNode, oldNodeUI);\n expect(formData.result[0].id).to.equal('bloop');\n expect(formData.result[0].name).to.equal('Bloop');\n expect(formData.delimit_by[0].value).to.equal('+');\n expect(formData.delimit_index[0].value).to.equal('0');\n });\n });\n});\n"]}
@@ -0,0 +1,30 @@
1
+ import { expect } from '@open-wc/testing';
2
+ import { NODE_CONFIG } from '../src/flow/config';
3
+ describe('Backwards Compatibility', () => {
4
+ describe('split_by_run_result_delimited alias', () => {
5
+ it('should map split_by_run_result_delimited to split_by_run_result config', () => {
6
+ // verify the alias exists in NODE_CONFIG
7
+ expect(NODE_CONFIG['split_by_run_result_delimited']).to.exist;
8
+ // verify it points to the same config as split_by_run_result
9
+ expect(NODE_CONFIG['split_by_run_result_delimited']).to.equal(NODE_CONFIG['split_by_run_result']);
10
+ });
11
+ it('should have the correct type on the split_by_run_result config', () => {
12
+ const config = NODE_CONFIG['split_by_run_result'];
13
+ expect(config.type).to.equal('split_by_run_result');
14
+ });
15
+ it('should declare the alias in the config', () => {
16
+ const config = NODE_CONFIG['split_by_run_result'];
17
+ expect(config.aliases).to.exist;
18
+ expect(config.aliases).to.include('split_by_run_result_delimited');
19
+ });
20
+ it('should allow old flows with split_by_run_result_delimited type to load', () => {
21
+ // simulate loading an old flow with the delimited type
22
+ const oldType = 'split_by_run_result_delimited';
23
+ const config = NODE_CONFIG[oldType];
24
+ expect(config).to.exist;
25
+ expect(config.name).to.equal('Split by Result');
26
+ expect(config.group).to.equal('split');
27
+ });
28
+ });
29
+ });
30
+ //# sourceMappingURL=temba-backwards-compatibility.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"temba-backwards-compatibility.test.js","sourceRoot":"","sources":["../../test/temba-backwards-compatibility.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,QAAQ,CAAC,qCAAqC,EAAE,GAAG,EAAE;QACnD,EAAE,CAAC,wEAAwE,EAAE,GAAG,EAAE;YAChF,yCAAyC;YACzC,MAAM,CAAC,WAAW,CAAC,+BAA+B,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;YAE9D,6DAA6D;YAC7D,MAAM,CAAC,WAAW,CAAC,+BAA+B,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAC3D,WAAW,CAAC,qBAAqB,CAAC,CACnC,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,gEAAgE,EAAE,GAAG,EAAE;YACxE,MAAM,MAAM,GAAG,WAAW,CAAC,qBAAqB,CAAC,CAAC;YAClD,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;QACtD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;YAChD,MAAM,MAAM,GAAG,WAAW,CAAC,qBAAqB,CAAC,CAAC;YAClD,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;YAChC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,+BAA+B,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,wEAAwE,EAAE,GAAG,EAAE;YAChF,uDAAuD;YACvD,MAAM,OAAO,GAAG,+BAA+B,CAAC;YAChD,MAAM,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;YAEpC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;YACxB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;YAChD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expect } from '@open-wc/testing';\nimport { NODE_CONFIG } from '../src/flow/config';\n\ndescribe('Backwards Compatibility', () => {\n describe('split_by_run_result_delimited alias', () => {\n it('should map split_by_run_result_delimited to split_by_run_result config', () => {\n // verify the alias exists in NODE_CONFIG\n expect(NODE_CONFIG['split_by_run_result_delimited']).to.exist;\n\n // verify it points to the same config as split_by_run_result\n expect(NODE_CONFIG['split_by_run_result_delimited']).to.equal(\n NODE_CONFIG['split_by_run_result']\n );\n });\n\n it('should have the correct type on the split_by_run_result config', () => {\n const config = NODE_CONFIG['split_by_run_result'];\n expect(config.type).to.equal('split_by_run_result');\n });\n\n it('should declare the alias in the config', () => {\n const config = NODE_CONFIG['split_by_run_result'];\n expect(config.aliases).to.exist;\n expect(config.aliases).to.include('split_by_run_result_delimited');\n });\n\n it('should allow old flows with split_by_run_result_delimited type to load', () => {\n // simulate loading an old flow with the delimited type\n const oldType = 'split_by_run_result_delimited';\n const config = NODE_CONFIG[oldType];\n\n expect(config).to.exist;\n expect(config.name).to.equal('Split by Result');\n expect(config.group).to.equal('split');\n });\n });\n});\n"]}
@@ -78,11 +78,16 @@ describe('temba-contact-chat', () => {
78
78
  const text = getValidText();
79
79
  await updateComponent(compose, text);
80
80
  const response_body = {
81
- contact: { uuid: 'contact-dave-active', name: 'Dave Matthews' },
82
- text: text,
83
- attachments: []
81
+ event: {
82
+ uuid: 'msg-uuid',
83
+ contact: { uuid: 'contact-dave-active', name: 'Dave Matthews' },
84
+ msg: {
85
+ text: text,
86
+ attachments: []
87
+ }
88
+ }
84
89
  };
85
- mockPOST(/api\/v2\/messages\.json/, response_body);
90
+ mockPOST(/contact\/chat\/contact-dave-active\//, response_body);
86
91
  const listener = oneEvent(compose, CustomEventType.Submitted, false);
87
92
  await typeInto('temba-contact-chat:temba-compose', text, true, true);
88
93
  expect(await listener).to.exist;
@@ -99,13 +104,18 @@ describe('temba-contact-chat', () => {
99
104
  await updateComponent(compose, null, attachments);
100
105
  const response_attachments = getResponseSuccessFiles(attachments);
101
106
  const response_body = {
102
- contact: { uuid: 'contact-dave-active', name: 'Dave Matthews' },
103
- text: '',
104
- attachments: response_attachments
107
+ event: {
108
+ uuid: 'msg-uuid',
109
+ contact: { uuid: 'contact-dave-active', name: 'Dave Matthews' },
110
+ msg: {
111
+ text: '',
112
+ attachments: response_attachments
113
+ }
114
+ }
105
115
  };
106
116
  const response_headers = {};
107
117
  const response_status = '200';
108
- mockPOST(/api\/v2\/messages\.json/, response_body, response_headers, response_status);
118
+ mockPOST(/contact\/chat\/contact-dave-active\//, response_body, response_headers, response_status);
109
119
  const listener = oneEvent(compose, CustomEventType.Submitted, false);
110
120
  await typeInto('temba-contact-chat:temba-compose', '', false, true);
111
121
  expect(await listener).to.exist;
@@ -123,11 +133,16 @@ describe('temba-contact-chat', () => {
123
133
  await updateComponent(compose, text, attachments);
124
134
  const response_attachments = getResponseSuccessFiles(attachments);
125
135
  const response_body = {
126
- contact: { uuid: 'contact-dave-active', name: 'Dave Matthews' },
127
- text: text,
128
- attachments: response_attachments
136
+ event: {
137
+ uuid: 'msg-uuid',
138
+ contact: { uuid: 'contact-dave-active', name: 'Dave Matthews' },
139
+ msg: {
140
+ text,
141
+ attachments: response_attachments
142
+ }
143
+ }
129
144
  };
130
- mockPOST(/api\/v2\/messages\.json/, response_body);
145
+ mockPOST(/contact\/chat\/contact-dave-active\//, response_body);
131
146
  // press enter
132
147
  const listener = oneEvent(compose, CustomEventType.Submitted, false);
133
148
  await typeInto('temba-contact-chat:temba-compose', '', false, true);
@@ -1 +1 @@
1
- {"version":3,"file":"temba-contact-chat.test.js","sourceRoot":"","sources":["../../test/temba-contact-chat.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,aAAa,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAc,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,OAAO,EACP,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,OAAO,EACP,OAAO,EACP,OAAO,EACP,QAAQ,EACR,eAAe,EAChB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEpD,IAAI,KAAU,CAAC;AAEf,MAAM,GAAG,GAAG,oBAAoB,CAAC;AACjC,MAAM,cAAc,GAAG,KAAK,EAAE,QAAa,EAAE,EAAE,EAAE;IAC/C,KAAK,CAAC,UAAU,CAAC,GAAG,wBAAwB,CAAC;IAC7C,gEAAgE;IAChE,MAAM,IAAI,GAAG,CAAC,MAAM,YAAY,CAC9B,GAAG,EACH,KAAK,EACL,EAAE,EACF,GAAG,EACH,GAAG,EACH,8DAA8D,CAC/D,CAAgB,CAAC;IAElB,oDAAoD;IACpD,MAAM,OAAO,CAAC,GAAG,CAAC,C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AK,EAAE,IAAI,CAAC,CAAC;QACpE,MAAM,CAAC,MAAM,QAAQ,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;QAEhC,MAAM,gBAAgB,CACpB,0CAA0C,EAC1C,OAAO,CAAC,IAAI,CAAC,CACd,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kCAAkC,EAAE,KAAK,IAAI,EAAE;QAChD,+CAA+C;QAC/C,MAAM,SAAS,EAAE,CAAC;QAClB,MAAM,IAAI,GAAgB,MAAM,cAAc,CAAC;YAC7C,OAAO,EAAE,qBAAqB;SAC/B,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,eAAe,CAAY,CAAC;QAC1E,MAAM,eAAe,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,mBAAmB,EAAE,CAAC,CAAC;QAEtE,MAAM,aAAa,GAAG,EAAE,CAAC;QACzB,MAAM,gBAAgB,GAAG,EAAE,CAAC;QAC5B,MAAM,eAAe,GAAG,KAAK,CAAC;QAC9B,QAAQ,CACN,yBAAyB,EACzB,aAAa,EACb,gBAAgB,EAChB,eAAe,CAChB,CAAC;QAEF,QAAQ;QACR,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QACrE,MAAM,QAAQ,CAAC,kCAAkC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QACpE,MAAM,CAAC,MAAM,QAAQ,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;QAEhC,MAAM,gBAAgB,CAAC,uBAAuB,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACjE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { SinonStub, useFakeTimers } from 'sinon';\nimport { Compose } from '../src/form/Compose';\nimport { ContactChat } from '../src/live/ContactChat';\nimport { Attachment, CustomEventType } from '../src/interfaces';\nimport {\n assertScreenshot,\n clearMockPosts,\n getClip,\n getComponent,\n getValidAttachments,\n getValidText,\n loadStore,\n mockAPI,\n mockGET,\n mockNow,\n mockPOST,\n updateComponent\n} from '../test/utils.test';\n\nimport { expect, oneEvent } from '@open-wc/testing';\n\nlet clock: any;\n\nconst TAG = 'temba-contact-chat';\nconst getContactChat = async (attrs: any = {}) => {\n attrs['endpoint'] = '/test-assets/contacts/';\n // add some sizes and styles to force our chat history to scroll\n const chat = (await getComponent(\n TAG,\n attrs,\n '',\n 500,\n 500,\n 'display:flex;flex-direction:column;flex-grow:1;min-height:0;'\n )) as ContactChat;\n\n // TODO: this should be waiting for an event instead\n await waitFor(100);\n await clock.tick(0);\n return chat;\n};\n\nconst getResponseSuccessFiles = (attachments: Attachment[]) => {\n const response_attachments = attachments.map((attachment) => {\n return { content_type: attachment.content_type, url: attachment.url };\n });\n return response_attachments;\n};\n\ndescribe('temba-contact-chat', () => {\n let mockedNow: SinonStub;\n // map requests for contact history to our static files\n // we'll just us the same historylist for everybody for now\n beforeEach(() => {\n mockedNow = mockNow('2021-03-31T00:31:00.000-00:00');\n clearMockPosts();\n mockGET(\n /\\/contact\\/history\\/contact-.*/,\n '/test-assets/contacts/history.json'\n );\n\n mockGET(\n /\\/api\\/v2\\/users\\.json\\?email=admin1%40nyaruka\\.com/,\n '/test-assets/api/users/admin1.json'\n );\n\n mockAPI();\n clock = useFakeTimers();\n });\n\n afterEach(function () {\n clock.restore();\n mockedNow.restore();\n });\n\n // temporarily disabled as it's too flaky in CI\n xit('show history and show chatbox if contact is active', async () => {\n // we are a StoreElement, so load a store first\n await loadStore();\n const chat: ContactChat = await getContactChat({\n contact: 'contact-dave-active'\n });\n\n await assertScreenshot('contacts/chat-for-active-contact', getClip(chat));\n });\n\n it('show history and hide chatbox if contact is archived', async () => {\n // we are a StoreElement, so load a store first\n await loadStore();\n const chat: ContactChat = await getContactChat({\n contact: 'contact-barack-archived'\n });\n\n await assertScreenshot('contacts/chat-for-archived-contact', getClip(chat));\n });\n\n it('show history and hide chatbox if contact is blocked', async () => {\n // we are a StoreElement, so load a store first\n await loadStore();\n const chat: ContactChat = await getContactChat({\n contact: 'contact-michelle-blocked'\n });\n\n await assertScreenshot('contacts/chat-for-blocked-contact', getClip(chat));\n });\n\n it('show history and hide chatbox if contact is stopped', async () => {\n // we are a StoreElement, so load a store first\n await loadStore();\n const chat: ContactChat = await getContactChat({\n contact: 'contact-tim-stopped'\n });\n\n await assertScreenshot('contacts/chat-for-stopped-contact', getClip(chat));\n });\n\n it('sends text without attachments', async () => {\n // we are a StoreElement, so load a store first\n await loadStore();\n const chat: ContactChat = await getContactChat({\n contact: 'contact-dave-active'\n });\n const compose = chat.shadowRoot.querySelector('temba-compose') as Compose;\n const text = getValidText();\n await updateComponent(compose, text);\n\n const response_body = {\n contact: { uuid: 'contact-dave-active', name: 'Dave Matthews' },\n text: text,\n attachments: []\n };\n mockPOST(/api\\/v2\\/messages\\.json/, response_body);\n\n const listener = oneEvent(compose, CustomEventType.Submitted, false);\n await typeInto('temba-contact-chat:temba-compose', text, true, true);\n expect(await listener).to.exist;\n\n await assertScreenshot('contacts/chat-sends-text-only', getClip(chat));\n });\n\n it('sends attachments without text', async () => {\n // we are a StoreElement, so load a store first\n await loadStore();\n const chat: ContactChat = await getContactChat({\n contact: 'contact-dave-active'\n });\n const compose = chat.shadowRoot.querySelector('temba-compose') as Compose;\n const attachments = getValidAttachments();\n await updateComponent(compose, null, attachments);\n const response_attachments = getResponseSuccessFiles(attachments);\n const response_body = {\n contact: { uuid: 'contact-dave-active', name: 'Dave Matthews' },\n text: '',\n attachments: response_attachments\n };\n const response_headers = {};\n const response_status = '200';\n mockPOST(\n /api\\/v2\\/messages\\.json/,\n response_body,\n response_headers,\n response_status\n );\n\n const listener = oneEvent(compose, CustomEventType.Submitted, false);\n await typeInto('temba-contact-chat:temba-compose', '', false, true);\n expect(await listener).to.exist;\n\n await assertScreenshot(\n 'contacts/chat-sends-attachments-only',\n getClip(chat)\n );\n });\n\n it('sends text with attachments', async () => {\n // we are a StoreElement, so load a store first\n await loadStore();\n const chat: ContactChat = await getContactChat({\n contact: 'contact-dave-active'\n });\n const compose = chat.shadowRoot.querySelector('temba-compose') as Compose;\n const text = getValidText();\n const attachments = getValidAttachments();\n await updateComponent(compose, text, attachments);\n const response_attachments = getResponseSuccessFiles(attachments);\n const response_body = {\n contact: { uuid: 'contact-dave-active', name: 'Dave Matthews' },\n text: text,\n attachments: response_attachments\n };\n mockPOST(/api\\/v2\\/messages\\.json/, response_body);\n\n // press enter\n const listener = oneEvent(compose, CustomEventType.Submitted, false);\n await typeInto('temba-contact-chat:temba-compose', '', false, true);\n expect(await listener).to.exist;\n\n await assertScreenshot(\n 'contacts/chat-sends-text-and-attachments',\n getClip(chat)\n );\n });\n\n it('shows failure message with retry', async () => {\n // we are a StoreElement, so load a store first\n await loadStore();\n const chat: ContactChat = await getContactChat({\n contact: 'contact-dave-active'\n });\n const compose = chat.shadowRoot.querySelector('temba-compose') as Compose;\n await updateComponent(compose, getValidText(), getValidAttachments());\n\n const response_body = {};\n const response_headers = {};\n const response_status = '500';\n mockPOST(\n /api\\/v2\\/messages\\.json/,\n response_body,\n response_headers,\n response_status\n );\n\n // press\n const listener = oneEvent(compose, CustomEventType.Submitted, false);\n await typeInto('temba-contact-chat:temba-compose', '', false, true);\n expect(await listener).to.exist;\n\n await assertScreenshot('contacts/chat-failure', getClip(chat));\n });\n});\n"]}
1
+ {"version":3,"file":"temba-contact-chat.test.js","sourceRoot":"","sources":["../../test/temba-contact-chat.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,aAAa,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAc,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,OAAO,EACP,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,OAAO,EACP,OAAO,EACP,OAAO,EACP,QAAQ,EAC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AEtE,MAAM,aAAa,GAAG,EAAE,CAAC;QACzB,MAAM,gBAAgB,GAAG,EAAE,CAAC;QAC5B,MAAM,eAAe,GAAG,KAAK,CAAC;QAC9B,QAAQ,CACN,yBAAyB,EACzB,aAAa,EACb,gBAAgB,EAChB,eAAe,CAChB,CAAC;QAEF,QAAQ;QACR,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QACrE,MAAM,QAAQ,CAAC,kCAAkC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QACpE,MAAM,CAAC,MAAM,QAAQ,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;QAEhC,MAAM,gBAAgB,CAAC,uBAAuB,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACjE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { SinonStub, useFakeTimers } from 'sinon';\nimport { Compose } from '../src/form/Compose';\nimport { ContactChat } from '../src/live/ContactChat';\nimport { Attachment, CustomEventType } from '../src/interfaces';\nimport {\n assertScreenshot,\n clearMockPosts,\n getClip,\n getComponent,\n getValidAttachments,\n getValidText,\n loadStore,\n mockAPI,\n mockGET,\n mockNow,\n mockPOST,\n updateComponent\n} from '../test/utils.test';\n\nimport { expect, oneEvent } from '@open-wc/testing';\n\nlet clock: any;\n\nconst TAG = 'temba-contact-chat';\nconst getContactChat = async (attrs: any = {}) => {\n attrs['endpoint'] = '/test-assets/contacts/';\n // add some sizes and styles to force our chat history to scroll\n const chat = (await getComponent(\n TAG,\n attrs,\n '',\n 500,\n 500,\n 'display:flex;flex-direction:column;flex-grow:1;min-height:0;'\n )) as ContactChat;\n\n // TODO: this should be waiting for an event instead\n await waitFor(100);\n await clock.tick(0);\n return chat;\n};\n\nconst getResponseSuccessFiles = (attachments: Attachment[]) => {\n const response_attachments = attachments.map((attachment) => {\n return { content_type: attachment.content_type, url: attachment.url };\n });\n return response_attachments;\n};\n\ndescribe('temba-contact-chat', () => {\n let mockedNow: SinonStub;\n // map requests for contact history to our static files\n // we'll just us the same historylist for everybody for now\n beforeEach(() => {\n mockedNow = mockNow('2021-03-31T00:31:00.000-00:00');\n clearMockPosts();\n mockGET(\n /\\/contact\\/history\\/contact-.*/,\n '/test-assets/contacts/history.json'\n );\n\n mockGET(\n /\\/api\\/v2\\/users\\.json\\?email=admin1%40nyaruka\\.com/,\n '/test-assets/api/users/admin1.json'\n );\n\n mockAPI();\n clock = useFakeTimers();\n });\n\n afterEach(function () {\n clock.restore();\n mockedNow.restore();\n });\n\n // temporarily disabled as it's too flaky in CI\n xit('show history and show chatbox if contact is active', async () => {\n // we are a StoreElement, so load a store first\n await loadStore();\n const chat: ContactChat = await getContactChat({\n contact: 'contact-dave-active'\n });\n\n await assertScreenshot('contacts/chat-for-active-contact', getClip(chat));\n });\n\n it('show history and hide chatbox if contact is archived', async () => {\n // we are a StoreElement, so load a store first\n await loadStore();\n const chat: ContactChat = await getContactChat({\n contact: 'contact-barack-archived'\n });\n\n await assertScreenshot('contacts/chat-for-archived-contact', getClip(chat));\n });\n\n it('show history and hide chatbox if contact is blocked', async () => {\n // we are a StoreElement, so load a store first\n await loadStore();\n const chat: ContactChat = await getContactChat({\n contact: 'contact-michelle-blocked'\n });\n\n await assertScreenshot('contacts/chat-for-blocked-contact', getClip(chat));\n });\n\n it('show history and hide chatbox if contact is stopped', async () => {\n // we are a StoreElement, so load a store first\n await loadStore();\n const chat: ContactChat = await getContactChat({\n contact: 'contact-tim-stopped'\n });\n\n await assertScreenshot('contacts/chat-for-stopped-contact', getClip(chat));\n });\n\n it('sends text without attachments', async () => {\n // we are a StoreElement, so load a store first\n await loadStore();\n const chat: ContactChat = await getContactChat({\n contact: 'contact-dave-active'\n });\n const compose = chat.shadowRoot.querySelector('temba-compose') as Compose;\n const text = getValidText();\n await updateComponent(compose, text);\n\n const response_body = {\n event: {\n uuid: 'msg-uuid',\n contact: { uuid: 'contact-dave-active', name: 'Dave Matthews' },\n msg: {\n text: text,\n attachments: []\n }\n }\n };\n mockPOST(/contact\\/chat\\/contact-dave-active\\//, response_body);\n\n const listener = oneEvent(compose, CustomEventType.Submitted, false);\n await typeInto('temba-contact-chat:temba-compose', text, true, true);\n expect(await listener).to.exist;\n\n await assertScreenshot('contacts/chat-sends-text-only', getClip(chat));\n });\n\n it('sends attachments without text', async () => {\n // we are a StoreElement, so load a store first\n await loadStore();\n const chat: ContactChat = await getContactChat({\n contact: 'contact-dave-active'\n });\n const compose = chat.shadowRoot.querySelector('temba-compose') as Compose;\n const attachments = getValidAttachments();\n await updateComponent(compose, null, attachments);\n const response_attachments = getResponseSuccessFiles(attachments);\n const response_body = {\n event: {\n uuid: 'msg-uuid',\n contact: { uuid: 'contact-dave-active', name: 'Dave Matthews' },\n msg: {\n text: '',\n attachments: response_attachments\n }\n }\n };\n const response_headers = {};\n const response_status = '200';\n mockPOST(\n /contact\\/chat\\/contact-dave-active\\//,\n response_body,\n response_headers,\n response_status\n );\n\n const listener = oneEvent(compose, CustomEventType.Submitted, false);\n await typeInto('temba-contact-chat:temba-compose', '', false, true);\n expect(await listener).to.exist;\n\n await assertScreenshot(\n 'contacts/chat-sends-attachments-only',\n getClip(chat)\n );\n });\n\n it('sends text with attachments', async () => {\n // we are a StoreElement, so load a store first\n await loadStore();\n const chat: ContactChat = await getContactChat({\n contact: 'contact-dave-active'\n });\n const compose = chat.shadowRoot.querySelector('temba-compose') as Compose;\n const text = getValidText();\n const attachments = getValidAttachments();\n await updateComponent(compose, text, attachments);\n const response_attachments = getResponseSuccessFiles(attachments);\n const response_body = {\n event: {\n uuid: 'msg-uuid',\n contact: { uuid: 'contact-dave-active', name: 'Dave Matthews' },\n msg: {\n text,\n attachments: response_attachments\n }\n }\n };\n mockPOST(/contact\\/chat\\/contact-dave-active\\//, response_body);\n\n // press enter\n const listener = oneEvent(compose, CustomEventType.Submitted, false);\n await typeInto('temba-contact-chat:temba-compose', '', false, true);\n expect(await listener).to.exist;\n\n await assertScreenshot(\n 'contacts/chat-sends-text-and-attachments',\n getClip(chat)\n );\n });\n\n it('shows failure message with retry', async () => {\n // we are a StoreElement, so load a store first\n await loadStore();\n const chat: ContactChat = await getContactChat({\n contact: 'contact-dave-active'\n });\n const compose = chat.shadowRoot.querySelector('temba-compose') as Compose;\n await updateComponent(compose, getValidText(), getValidAttachments());\n\n const response_body = {};\n const response_headers = {};\n const response_status = '500';\n mockPOST(\n /api\\/v2\\/messages\\.json/,\n response_body,\n response_headers,\n response_status\n );\n\n // press\n const listener = oneEvent(compose, CustomEventType.Submitted, false);\n await typeInto('temba-contact-chat:temba-compose', '', false, true);\n expect(await listener).to.exist;\n\n await assertScreenshot('contacts/chat-failure', getClip(chat));\n });\n});\n"]}
@@ -0,0 +1,91 @@
1
+ import { expect, assert } from '@open-wc/testing';
2
+ import { FloatingTab } from '../src/display/FloatingTab';
3
+ import { assertScreenshot, getClip, getComponent } from './utils.test';
4
+ describe('temba-floating-tab', () => {
5
+ it('can be created', async () => {
6
+ const tab = (await getComponent('temba-floating-tab', {
7
+ icon: 'phone',
8
+ label: 'Phone Simulator',
9
+ color: '#10b981',
10
+ top: 100
11
+ }));
12
+ assert.instanceOf(tab, FloatingTab);
13
+ expect(tab.icon).to.equal('phone');
14
+ expect(tab.label).to.equal('Phone Simulator');
15
+ expect(tab.color).to.equal('#10b981');
16
+ expect(tab.top).to.equal(100);
17
+ expect(tab.hidden).to.equal(false);
18
+ await assertScreenshot('floating-tab/default', getClip(tab));
19
+ });
20
+ it('can be hidden', async () => {
21
+ const tab = (await getComponent('temba-floating-tab', {
22
+ icon: 'phone',
23
+ label: 'Phone Simulator',
24
+ color: '#10b981',
25
+ hidden: true
26
+ }));
27
+ expect(tab.hidden).to.equal(true);
28
+ expect(tab.classList.contains('hidden')).to.equal(true);
29
+ await assertScreenshot('floating-tab/hidden', getClip(tab));
30
+ });
31
+ it('shows label on hover', async () => {
32
+ const tab = (await getComponent('temba-floating-tab', {
33
+ icon: 'phone',
34
+ label: 'Phone Simulator',
35
+ color: '#6366f1'
36
+ }));
37
+ const tabElement = tab.shadowRoot.querySelector('.tab');
38
+ expect(tabElement).to.exist;
39
+ // simulate hover state
40
+ const labelElement = tab.shadowRoot.querySelector('.label');
41
+ expect(labelElement).to.exist;
42
+ await assertScreenshot('floating-tab/hover', getClip(tab));
43
+ });
44
+ it('fires click event', async () => {
45
+ const tab = (await getComponent('temba-floating-tab', {
46
+ icon: 'clock',
47
+ label: 'History',
48
+ color: '#8b5cf6'
49
+ }));
50
+ let clicked = false;
51
+ tab.addEventListener('temba-button-clicked', () => {
52
+ clicked = true;
53
+ });
54
+ const tabElement = tab.shadowRoot.querySelector('.tab');
55
+ tabElement.click();
56
+ expect(clicked).to.equal(true);
57
+ });
58
+ it('supports different colors', async () => {
59
+ const tab1 = (await getComponent('temba-floating-tab', {
60
+ icon: 'phone',
61
+ label: 'Phone',
62
+ color: '#10b981',
63
+ top: 100
64
+ }));
65
+ const tab2 = (await getComponent('temba-floating-tab', {
66
+ icon: 'globe',
67
+ label: 'Translation',
68
+ color: '#6b7280',
69
+ top: 200
70
+ }));
71
+ const tab3 = (await getComponent('temba-floating-tab', {
72
+ icon: 'clock',
73
+ label: 'History',
74
+ color: '#8b5cf6',
75
+ top: 300
76
+ }));
77
+ await assertScreenshot('floating-tab/green', getClip(tab1));
78
+ await assertScreenshot('floating-tab/gray', getClip(tab2));
79
+ await assertScreenshot('floating-tab/purple', getClip(tab3));
80
+ });
81
+ it('supports custom positioning', async () => {
82
+ const tab = (await getComponent('temba-floating-tab', {
83
+ icon: 'phone',
84
+ label: 'Phone Simulator',
85
+ color: '#10b981',
86
+ top: 250
87
+ }));
88
+ expect(tab.top).to.equal(250);
89
+ });
90
+ });
91
+ //# sourceMappingURL=temba-floating-tab.test.js.map