@coveo/quantic 3.44.0 → 3.44.2

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 (205) hide show
  1. package/force-app/main/default/classes/OrganizationEndpointsTest.cls +71 -15
  2. package/force-app/main/default/classes/RecommendationsControllerTest.cls +1 -1
  3. package/force-app/main/default/lwc/quanticNumberButton/quanticNumberButton.js +5 -1
  4. package/force-app/main/default/lwc/quanticPager/quanticPager.html +8 -5
  5. package/force-app/main/default/lwc/quanticTabBar/quanticTabBar.js +148 -125
  6. package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +16 -16
  7. package/force-app/main/default/staticresources/coveoheadless/headless.js +17 -17
  8. package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +16 -16
  9. package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +16 -16
  10. package/package.json +37 -34
  11. package/force-app/main/default/lwc/quanticAriaLive/__tests__/quanticAriaLive.test.js +0 -106
  12. package/force-app/main/default/lwc/quanticBreadcrumbManager/__tests__/quanticBreadcrumbManager.test.js +0 -752
  13. package/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/data.ts +0 -130
  14. package/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/fixture.ts +0 -87
  15. package/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/pageObject.ts +0 -282
  16. package/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/quanticBreadcrumbManager.e2e.ts +0 -208
  17. package/force-app/main/default/lwc/quanticCarousel/__tests__/quanticCarousel.test.js +0 -262
  18. package/force-app/main/default/lwc/quanticCaseClassification/__tests__/quanticCaseClassification.test.js +0 -819
  19. package/force-app/main/default/lwc/quanticCaseClassification/e2e/data.ts +0 -23
  20. package/force-app/main/default/lwc/quanticCaseClassification/e2e/fixture.ts +0 -51
  21. package/force-app/main/default/lwc/quanticCaseClassification/e2e/pageObject.ts +0 -152
  22. package/force-app/main/default/lwc/quanticCaseClassification/e2e/quanticCaseClassification.e2e.ts +0 -269
  23. package/force-app/main/default/lwc/quanticCategoryFacet/__tests__/quanticCategoryFacet.test.js +0 -1183
  24. package/force-app/main/default/lwc/quanticCategoryFacet/e2e/data.ts +0 -91
  25. package/force-app/main/default/lwc/quanticCategoryFacet/e2e/fixture.ts +0 -79
  26. package/force-app/main/default/lwc/quanticCategoryFacet/e2e/pageObject.ts +0 -55
  27. package/force-app/main/default/lwc/quanticCategoryFacet/e2e/quanticCategoryFacet.e2e.ts +0 -219
  28. package/force-app/main/default/lwc/quanticCitation/__tests__/quanticCitation.test.js +0 -581
  29. package/force-app/main/default/lwc/quanticColoredResultBadge/__tests__/quanticColoredResultBadge.test.js +0 -212
  30. package/force-app/main/default/lwc/quanticDateFacet/__tests__/quanticDateFacet.test.js +0 -688
  31. package/force-app/main/default/lwc/quanticDateFacet/e2e/data.ts +0 -44
  32. package/force-app/main/default/lwc/quanticDateFacet/e2e/fixture.ts +0 -72
  33. package/force-app/main/default/lwc/quanticDateFacet/e2e/pageObject.ts +0 -27
  34. package/force-app/main/default/lwc/quanticDateFacet/e2e/quanticDateFacet.e2e.ts +0 -167
  35. package/force-app/main/default/lwc/quanticDidYouMean/__tests__/quanticDidYouMean.test.js +0 -348
  36. package/force-app/main/default/lwc/quanticDidYouMean/e2e/data.ts +0 -48
  37. package/force-app/main/default/lwc/quanticDidYouMean/e2e/fixture.ts +0 -84
  38. package/force-app/main/default/lwc/quanticDidYouMean/e2e/pageObject.ts +0 -173
  39. package/force-app/main/default/lwc/quanticDidYouMean/e2e/quanticDidYouMean.e2e.ts +0 -219
  40. package/force-app/main/default/lwc/quanticDocumentSuggestion/__tests__/quanticDocumentSuggestion.test.js +0 -404
  41. package/force-app/main/default/lwc/quanticDocumentSuggestion/e2e/fixture.ts +0 -38
  42. package/force-app/main/default/lwc/quanticDocumentSuggestion/e2e/pageObject.ts +0 -52
  43. package/force-app/main/default/lwc/quanticDocumentSuggestion/e2e/quanticDocumentSuggestion.e2e.ts +0 -102
  44. package/force-app/main/default/lwc/quanticFacet/__tests__/quanticFacet.test.js +0 -1105
  45. package/force-app/main/default/lwc/quanticFacet/e2e/data.ts +0 -62
  46. package/force-app/main/default/lwc/quanticFacet/e2e/fixture.ts +0 -78
  47. package/force-app/main/default/lwc/quanticFacet/e2e/pageObject.ts +0 -67
  48. package/force-app/main/default/lwc/quanticFacet/e2e/quanticFacet.e2e.ts +0 -242
  49. package/force-app/main/default/lwc/quanticFacetCaption/__tests__/quanticFacetCaption.test.js +0 -28
  50. package/force-app/main/default/lwc/quanticFacetManager/__tests__/quanticFacetManager.test.js +0 -178
  51. package/force-app/main/default/lwc/quanticFacetManager/e2e/data.ts +0 -59
  52. package/force-app/main/default/lwc/quanticFacetManager/e2e/fixture.ts +0 -75
  53. package/force-app/main/default/lwc/quanticFacetManager/e2e/pageObject.ts +0 -23
  54. package/force-app/main/default/lwc/quanticFacetManager/e2e/quanticFacetManager.e2e.ts +0 -82
  55. package/force-app/main/default/lwc/quanticFeedback/__tests__/quanticFeedback.test.js +0 -403
  56. package/force-app/main/default/lwc/quanticFeedbackModal/__tests__/quanticFeedbackModal.test.js +0 -448
  57. package/force-app/main/default/lwc/quanticFeedbackModalQna/__tests__/quanticFeedbackModalQna.test.js +0 -298
  58. package/force-app/main/default/lwc/quanticFoldedResultList/__tests__/quanticFoldedResultList.test.js +0 -323
  59. package/force-app/main/default/lwc/quanticFoldedResultList/e2e/fixture.ts +0 -74
  60. package/force-app/main/default/lwc/quanticFoldedResultList/e2e/pageObject.ts +0 -81
  61. package/force-app/main/default/lwc/quanticFoldedResultList/e2e/quanticFoldedResultList.e2e.ts +0 -69
  62. package/force-app/main/default/lwc/quanticGeneratedAnswer/__tests__/quanticGeneratedAnswer.test.js +0 -1575
  63. package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/agentData.ts +0 -279
  64. package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/data.ts +0 -56
  65. package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/fixture-agent.ts +0 -77
  66. package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/fixture.ts +0 -194
  67. package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/pageObject.ts +0 -599
  68. package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/quanticGeneratedAnswer.e2e.ts +0 -333
  69. package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/quanticGeneratedAnswerAgent.e2e.ts +0 -298
  70. package/force-app/main/default/lwc/quanticGeneratedAnswerBody/__tests__/quanticGeneratedAnswerBody.test.js +0 -418
  71. package/force-app/main/default/lwc/quanticGeneratedAnswerContent/__tests__/quanticGeneratedAnswerContent.test.js +0 -447
  72. package/force-app/main/default/lwc/quanticGeneratedAnswerCopyToClipboard/__tests__/quanticGeneratedAnswerCopyToClipboard.test.js +0 -129
  73. package/force-app/main/default/lwc/quanticGeneratedAnswerFollowUpInput/__tests__/quanticGeneratedAnswerFollowUpInput.test.js +0 -466
  74. package/force-app/main/default/lwc/quanticGeneratedAnswerStreamOfThought/__tests__/quanticGeneratedAnswerStreamOfThought.test.js +0 -402
  75. package/force-app/main/default/lwc/quanticGeneratedAnswerStreamOfThought/__tests__/stepsUtils.test.js +0 -118
  76. package/force-app/main/default/lwc/quanticGeneratedAnswerThread/__tests__/quanticGeneratedAnswerThread.test.js +0 -285
  77. package/force-app/main/default/lwc/quanticHeading/__tests__/quanticHeading.test.js +0 -71
  78. package/force-app/main/default/lwc/quanticHeadlessLoader/__tests__/quanticHeadlessLoader.test.js +0 -651
  79. package/force-app/main/default/lwc/quanticInsightInterface/__tests__/quanticInsightInterface.test.js +0 -194
  80. package/force-app/main/default/lwc/quanticInsightSummary/__tests__/quanticInsightSummary.test.js +0 -230
  81. package/force-app/main/default/lwc/quanticModal/__tests__/quanticModal.test.js +0 -205
  82. package/force-app/main/default/lwc/quanticNotifications/__tests__/quanticNotifications.test.js +0 -309
  83. package/force-app/main/default/lwc/quanticNotifications/e2e/fixture.ts +0 -62
  84. package/force-app/main/default/lwc/quanticNotifications/e2e/pageObject.ts +0 -55
  85. package/force-app/main/default/lwc/quanticNotifications/e2e/quanticNotifications.e2e.ts +0 -47
  86. package/force-app/main/default/lwc/quanticNumericFacet/__tests__/quanticNumericFacet.test.js +0 -953
  87. package/force-app/main/default/lwc/quanticNumericFacet/e2e/data.ts +0 -48
  88. package/force-app/main/default/lwc/quanticNumericFacet/e2e/fixture.ts +0 -75
  89. package/force-app/main/default/lwc/quanticNumericFacet/e2e/pageObject.ts +0 -59
  90. package/force-app/main/default/lwc/quanticNumericFacet/e2e/quanticNumericFacet.e2e.ts +0 -186
  91. package/force-app/main/default/lwc/quanticPager/__tests__/quanticPager.test.js +0 -430
  92. package/force-app/main/default/lwc/quanticPager/e2e/fixture.ts +0 -65
  93. package/force-app/main/default/lwc/quanticPager/e2e/pageObject.ts +0 -69
  94. package/force-app/main/default/lwc/quanticPager/e2e/quanticPager.e2e.ts +0 -106
  95. package/force-app/main/default/lwc/quanticPlaceholder/__tests__/quanticPlaceholder.test.js +0 -47
  96. package/force-app/main/default/lwc/quanticQuickviewContent/__tests__/data/defaultTestCase.json +0 -13
  97. package/force-app/main/default/lwc/quanticQuickviewContent/__tests__/data/youtubeTestCase.json +0 -14
  98. package/force-app/main/default/lwc/quanticQuickviewContent/__tests__/quanticQuickviewContent.test.js +0 -82
  99. package/force-app/main/default/lwc/quanticRadioButtonsGroup/__tests__/quanticRadioButtonsGroup.test.js +0 -273
  100. package/force-app/main/default/lwc/quanticRecentQueriesList/__tests__/quanticRecentQueriesList.test.js +0 -448
  101. package/force-app/main/default/lwc/quanticRecentQueriesList/e2e/fixture.ts +0 -43
  102. package/force-app/main/default/lwc/quanticRecentQueriesList/e2e/pageObject.ts +0 -55
  103. package/force-app/main/default/lwc/quanticRecentQueriesList/e2e/quanticRecentQueriesList.e2e.ts +0 -93
  104. package/force-app/main/default/lwc/quanticRecentResultsList/__tests__/quanticRecentResultsList.test.js +0 -516
  105. package/force-app/main/default/lwc/quanticRecentResultsList/e2e/fixture.ts +0 -43
  106. package/force-app/main/default/lwc/quanticRecentResultsList/e2e/pageObject.ts +0 -61
  107. package/force-app/main/default/lwc/quanticRecentResultsList/e2e/quanticRecentResultsList.e2e.ts +0 -48
  108. package/force-app/main/default/lwc/quanticRecommendationList/__tests__/quanticRecommendationList.test.js +0 -491
  109. package/force-app/main/default/lwc/quanticRecommendationList/e2e/fixture.ts +0 -36
  110. package/force-app/main/default/lwc/quanticRecommendationList/e2e/pageObject.ts +0 -52
  111. package/force-app/main/default/lwc/quanticRecommendationList/e2e/quanticRecommendationList.e2e.ts +0 -53
  112. package/force-app/main/default/lwc/quanticRefineModalContent/__tests__/quanticRefineModalContent.test.js +0 -747
  113. package/force-app/main/default/lwc/quanticRefineToggle/__tests__/quanticRefineToggle.test.js +0 -544
  114. package/force-app/main/default/lwc/quanticResultAction/__tests__/quanticResultAction.test.js +0 -262
  115. package/force-app/main/default/lwc/quanticResultActionBar/__tests__/quanticResultActionBar.test.js +0 -141
  116. package/force-app/main/default/lwc/quanticResultChildren/__tests__/quanticResultChildren.test.js +0 -340
  117. package/force-app/main/default/lwc/quanticResultCopyToClipboard/__tests__/quanticResultCopyToClipboard.test.js +0 -300
  118. package/force-app/main/default/lwc/quanticResultCopyToClipboard/e2e/fixture.ts +0 -49
  119. package/force-app/main/default/lwc/quanticResultCopyToClipboard/e2e/pageObject.ts +0 -49
  120. package/force-app/main/default/lwc/quanticResultCopyToClipboard/e2e/quanticResultCopyToClipboard.e2e.ts +0 -40
  121. package/force-app/main/default/lwc/quanticResultDate/__tests__/quanticResultDate.test.js +0 -144
  122. package/force-app/main/default/lwc/quanticResultField/__tests__/quanticResultField.test.js +0 -120
  123. package/force-app/main/default/lwc/quanticResultHighlightedTextField/__tests__/quanticResultHighlightedTextField.test.js +0 -209
  124. package/force-app/main/default/lwc/quanticResultLink/__tests__/quanticResultLink.test.js +0 -302
  125. package/force-app/main/default/lwc/quanticResultList/__tests__/quanticResultList.test.js +0 -342
  126. package/force-app/main/default/lwc/quanticResultList/e2e/fixture.ts +0 -70
  127. package/force-app/main/default/lwc/quanticResultList/e2e/pageObject.ts +0 -81
  128. package/force-app/main/default/lwc/quanticResultList/e2e/quanticResultList.e2e.ts +0 -69
  129. package/force-app/main/default/lwc/quanticResultMultiValueText/__tests__/quanticResultMultiValueText.test.js +0 -235
  130. package/force-app/main/default/lwc/quanticResultNumber/__tests__/quanticResultNumber.test.js +0 -144
  131. package/force-app/main/default/lwc/quanticResultPrintableUri/__tests__/quanticResultPrintableUri.test.js +0 -324
  132. package/force-app/main/default/lwc/quanticResultQuickview/__tests__/quanticResultQuickview.test.js +0 -308
  133. package/force-app/main/default/lwc/quanticResultQuickview/e2e/fixture.ts +0 -85
  134. package/force-app/main/default/lwc/quanticResultQuickview/e2e/pageObject.ts +0 -38
  135. package/force-app/main/default/lwc/quanticResultQuickview/e2e/quanticResultQuickView.e2e.ts +0 -66
  136. package/force-app/main/default/lwc/quanticResultTemplate/__tests__/quanticResultTemplate.test.js +0 -90
  137. package/force-app/main/default/lwc/quanticResultText/__tests__/quanticResultText.test.js +0 -155
  138. package/force-app/main/default/lwc/quanticResultsPerPage/__tests__/quanticResultsPerPage.test.js +0 -464
  139. package/force-app/main/default/lwc/quanticResultsPerPage/e2e/fixture.ts +0 -78
  140. package/force-app/main/default/lwc/quanticResultsPerPage/e2e/pageObject.ts +0 -85
  141. package/force-app/main/default/lwc/quanticResultsPerPage/e2e/quanticResultsPerPage.e2e.ts +0 -97
  142. package/force-app/main/default/lwc/quanticSearchBox/__tests__/quanticSearchBox.test.js +0 -487
  143. package/force-app/main/default/lwc/quanticSearchBox/e2e/fixture.ts +0 -86
  144. package/force-app/main/default/lwc/quanticSearchBox/e2e/pageObject.ts +0 -45
  145. package/force-app/main/default/lwc/quanticSearchBox/e2e/quanticSearchBox.e2e.ts +0 -159
  146. package/force-app/main/default/lwc/quanticSearchBoxInput/__tests__/quanticSearchBoxInput.test.js +0 -743
  147. package/force-app/main/default/lwc/quanticSearchBoxSuggestionsList/__tests__/quanticSearchBoxSuggestionsList.test.js +0 -571
  148. package/force-app/main/default/lwc/quanticSearchBoxSuggestionsList/e2e/fixture.ts +0 -113
  149. package/force-app/main/default/lwc/quanticSearchBoxSuggestionsList/e2e/pageObject.ts +0 -113
  150. package/force-app/main/default/lwc/quanticSearchBoxSuggestionsList/e2e/quanticSearchBoxSuggestionsList.e2e.ts +0 -282
  151. package/force-app/main/default/lwc/quanticSmartSnippet/__tests__/quanticSmartSnippet.test.js +0 -341
  152. package/force-app/main/default/lwc/quanticSmartSnippet/e2e/data.ts +0 -21
  153. package/force-app/main/default/lwc/quanticSmartSnippet/e2e/fixture.ts +0 -93
  154. package/force-app/main/default/lwc/quanticSmartSnippet/e2e/pageObject.ts +0 -196
  155. package/force-app/main/default/lwc/quanticSmartSnippet/e2e/quanticSmartSnippet.e2e.ts +0 -168
  156. package/force-app/main/default/lwc/quanticSmartSnippetAnswer/__tests__/quanticSmartSnippetAnswer.test.js +0 -126
  157. package/force-app/main/default/lwc/quanticSmartSnippetSource/__tests__/quanticSmartSnippetSource.test.js +0 -290
  158. package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/__tests__/quanticSmartSnippetSuggestions.test.js +0 -329
  159. package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/e2e/data.ts +0 -31
  160. package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/e2e/fixture.ts +0 -95
  161. package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/e2e/pageObject.ts +0 -160
  162. package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/e2e/quanticSmartSnippetSuggestions.e2e.ts +0 -127
  163. package/force-app/main/default/lwc/quanticSort/__tests__/quanticSort.test.js +0 -416
  164. package/force-app/main/default/lwc/quanticSort/e2e/fixture.ts +0 -62
  165. package/force-app/main/default/lwc/quanticSort/e2e/pageObject.ts +0 -100
  166. package/force-app/main/default/lwc/quanticSort/e2e/quanticSort.e2e.ts +0 -86
  167. package/force-app/main/default/lwc/quanticSourceCitations/__tests__/quanticSourceCitations.test.js +0 -156
  168. package/force-app/main/default/lwc/quanticStandaloneSearchBox/__tests__/quanticStandaloneSearchBox.test.js +0 -387
  169. package/force-app/main/default/lwc/quanticStandaloneSearchBox/e2e/fixture.ts +0 -54
  170. package/force-app/main/default/lwc/quanticStandaloneSearchBox/e2e/pageObject.ts +0 -54
  171. package/force-app/main/default/lwc/quanticStandaloneSearchBox/e2e/quanticStandaloneSearchBox.e2e.ts +0 -72
  172. package/force-app/main/default/lwc/quanticStatefulButton/__tests__/quanticStatefulButton.test.js +0 -222
  173. package/force-app/main/default/lwc/quanticSummary/__tests__/quanticSummary.test.js +0 -244
  174. package/force-app/main/default/lwc/quanticTab/__tests__/quanticTab.test.js +0 -333
  175. package/force-app/main/default/lwc/quanticTab/e2e/fixture.ts +0 -60
  176. package/force-app/main/default/lwc/quanticTab/e2e/pageObject.ts +0 -68
  177. package/force-app/main/default/lwc/quanticTab/e2e/quanticTab.e2e.ts +0 -72
  178. package/force-app/main/default/lwc/quanticTabBar/__tests__/quanticTabBar.test.js +0 -331
  179. package/force-app/main/default/lwc/quanticTabBar/e2e/fixture.ts +0 -65
  180. package/force-app/main/default/lwc/quanticTabBar/e2e/pageObject.ts +0 -80
  181. package/force-app/main/default/lwc/quanticTabBar/e2e/quanticTabBar.e2e.ts +0 -172
  182. package/force-app/main/default/lwc/quanticThreadItem/__tests__/quanticThreadItem.test.js +0 -314
  183. package/force-app/main/default/lwc/quanticTimeframeFacet/__tests__/quanticTimeframeFacet.test.js +0 -1059
  184. package/force-app/main/default/lwc/quanticTimeframeFacet/e2e/data.ts +0 -66
  185. package/force-app/main/default/lwc/quanticTimeframeFacet/e2e/fixture.ts +0 -74
  186. package/force-app/main/default/lwc/quanticTimeframeFacet/e2e/pageObject.ts +0 -43
  187. package/force-app/main/default/lwc/quanticTimeframeFacet/e2e/quanticTimeframeFacet.e2e.ts +0 -184
  188. package/force-app/main/default/lwc/quanticTooltip/__tests__/quanticTooltip.test.js +0 -107
  189. package/force-app/main/default/lwc/quanticUserAction/__tests__/quanticUserAction.test.js +0 -427
  190. package/force-app/main/default/lwc/quanticUserActionsSession/__tests__/quanticUserActionsSession.test.js +0 -269
  191. package/force-app/main/default/lwc/quanticUserActionsTimeline/__tests__/data/userActionsState.json +0 -89
  192. package/force-app/main/default/lwc/quanticUserActionsTimeline/__tests__/quanticUserActionsTimeline.test.js +0 -511
  193. package/force-app/main/default/lwc/quanticUserActionsToggle/__tests__/quanticUserActionsToggle.test.js +0 -229
  194. package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/data.ts +0 -32
  195. package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/fixture.ts +0 -32
  196. package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/pageObject.ts +0 -71
  197. package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/quanticUserActionsToggle.e2e.ts +0 -39
  198. package/force-app/main/default/lwc/quanticUtils/__tests__/accessibilityUtils.test.js +0 -214
  199. package/force-app/main/default/lwc/quanticUtils/__tests__/citationAnchoringUtils.test.js +0 -84
  200. package/force-app/main/default/lwc/quanticUtils/__tests__/facetDependenciesUtils.test.js +0 -92
  201. package/force-app/main/default/lwc/quanticUtils/__tests__/facetStoreUtils.test.js +0 -86
  202. package/force-app/main/default/lwc/quanticUtils/__tests__/markdownUtils.test.js +0 -109
  203. package/force-app/main/default/lwc/quanticUtils/__tests__/quanticUtils.test.js +0 -233
  204. package/force-app/main/default/lwc/quanticUtils/__tests__/timeAndDateUtils.test.js +0 -22
  205. package/force-app/main/default/lwc/quanticViewedByCustomerBadge/__tests__/quanticViewedByCustomerBadge.test.js +0 -131
@@ -1,66 +0,0 @@
1
- const facetId = 'Date';
2
- const field = 'Date';
3
-
4
- /**
5
- * Facet response before any value is selected.
6
- * The values mirror the relative timeframes declared on the exampleQuanticTimeframeFacet.html file
7
- */
8
- export const initialFacetData = {
9
- facetId,
10
- field,
11
- moreValuesAvailable: false,
12
- values: [
13
- {
14
- start: 'now',
15
- end: 'next-1-year',
16
- endInclusive: false,
17
- state: 'idle',
18
- numberOfResults: 10,
19
- },
20
- {
21
- start: 'past-2-week',
22
- end: 'now',
23
- endInclusive: false,
24
- state: 'idle',
25
- numberOfResults: 20,
26
- },
27
- {
28
- start: 'past-1-month',
29
- end: 'now',
30
- endInclusive: false,
31
- state: 'idle',
32
- numberOfResults: 30,
33
- },
34
- {
35
- start: 'past-1-year',
36
- end: 'now',
37
- endInclusive: false,
38
- state: 'idle',
39
- numberOfResults: 40,
40
- },
41
- {
42
- start: 'past-10-year',
43
- end: 'now',
44
- endInclusive: false,
45
- state: 'idle',
46
- numberOfResults: 50,
47
- },
48
- ],
49
- indexScore: 0.4,
50
- };
51
-
52
- const [firstRange, ...remainingRanges] = initialFacetData.values;
53
-
54
- /**
55
- * Facet response after the first value is selected.
56
- */
57
- export const selectedFacetData = {
58
- ...initialFacetData,
59
- values: [
60
- {
61
- ...firstRange,
62
- state: 'selected',
63
- },
64
- ...remainingRanges,
65
- ],
66
- };
@@ -1,74 +0,0 @@
1
- import {TimeframeFacetObject} from './pageObject';
2
- import {useCaseEnum} from '../../../../../../playwright/utils/useCase';
3
- import {InsightSetupObject} from '../../../../../../playwright/page-object/insightSetupObject';
4
- import {
5
- searchRequestRegex,
6
- insightSearchRequestRegex,
7
- } from '../../../../../../playwright/utils/requests';
8
- import {BaseFacetObject} from '../../../../../../playwright/page-object/baseFacetObject';
9
- import {initialFacetData} from './data';
10
- import {facetBase} from '../../../../../../playwright/fixtures/baseFacetFixture';
11
-
12
- const pageUrl = 's/quantic-timeframe-facet';
13
-
14
- interface FacetOptions {
15
- withDatePicker?: boolean;
16
- }
17
-
18
- type QuanticFacetE2EFixtures = {
19
- facet: TimeframeFacetObject;
20
- options: Partial<FacetOptions>;
21
- insightSetup?: InsightSetupObject;
22
- };
23
-
24
- export const testSearch = facetBase.extend<QuanticFacetE2EFixtures>({
25
- options: {withDatePicker: true},
26
- facetResponses: {responses: [[initialFacetData]]},
27
- baseFacet: async ({page}, use) => {
28
- await use(new BaseFacetObject(page, searchRequestRegex));
29
- },
30
- facet: async (
31
- {page, options, configuration, baseFacet, urlHash, facetResponses},
32
- use
33
- ) => {
34
- // search use case: interface auto-triggers a search on load, hence the mockSearchWithBaseResponse call below
35
- await baseFacet.mockSearchWithBaseResponse();
36
- await page.goto(`${pageUrl}#${urlHash ? urlHash : ''}`);
37
- await baseFacet.mockSearchWithFacetResponseSequence(
38
- facetResponses?.responses
39
- );
40
- configuration.configure(options);
41
- await baseFacet.waitForSearchResponse();
42
-
43
- await use(new TimeframeFacetObject(page));
44
- },
45
- });
46
-
47
- export const testInsight = facetBase.extend<QuanticFacetE2EFixtures>({
48
- options: {withDatePicker: true},
49
- facetResponses: {responses: [[initialFacetData]]},
50
- baseFacet: async ({page}, use) => {
51
- await use(new BaseFacetObject(page, insightSearchRequestRegex));
52
- },
53
- insightSetup: async ({page}, use) => {
54
- await use(new InsightSetupObject(page));
55
- },
56
- facet: async (
57
- {page, options, baseFacet, configuration, insightSetup, facetResponses},
58
- use
59
- ) => {
60
- await page.goto(pageUrl);
61
- await baseFacet.mockSearchWithFacetResponseSequence(
62
- facetResponses?.responses
63
- );
64
- configuration.configure({...options, useCase: useCaseEnum.insight});
65
- await insightSetup?.waitForInsightInterfaceInitialization();
66
- await Promise.all([
67
- baseFacet.waitForSearchResponse(),
68
- baseFacet.performSearch(),
69
- ]);
70
- await use(new TimeframeFacetObject(page));
71
- },
72
- });
73
-
74
- export {expect} from '@playwright/test';
@@ -1,43 +0,0 @@
1
- import type {Locator, Page} from '@playwright/test';
2
-
3
- export class TimeframeFacetObject {
4
- constructor(public page: Page) {
5
- this.page = page;
6
- }
7
-
8
- get facet(): Locator {
9
- return this.page.locator('c-quantic-timeframe-facet');
10
- }
11
-
12
- get facetValue(): Locator {
13
- return this.facet.getByTestId('facet__value');
14
- }
15
-
16
- get clearSelectionButton(): Locator {
17
- return this.facet.getByRole('button', {name: /Clear filter/i});
18
- }
19
-
20
- get filterStartInput(): Locator {
21
- return this.facet.getByRole('textbox', {name: 'Start'});
22
- }
23
-
24
- get filterEndInput(): Locator {
25
- return this.facet.getByRole('textbox', {name: 'End'});
26
- }
27
-
28
- get filterApplyButton(): Locator {
29
- return this.facet.getByRole('button', {name: /apply/i});
30
- }
31
-
32
- async fillFilterStartInput(min: string): Promise<void> {
33
- await this.filterStartInput.fill(min);
34
- }
35
-
36
- async fillFilterEndInput(max: string): Promise<void> {
37
- await this.filterEndInput.fill(max);
38
- }
39
-
40
- async clickOnFacetValue(index: number): Promise<void> {
41
- await this.facetValue.nth(index).click();
42
- }
43
- }
@@ -1,184 +0,0 @@
1
- import {testSearch, testInsight, expect} from './fixture';
2
- import {
3
- useCaseEnum,
4
- useCaseTestCases,
5
- } from '../../../../../../playwright/utils/useCase';
6
- import {initialFacetData, selectedFacetData} from './data';
7
-
8
- const fixtures = {
9
- search: testSearch,
10
- insight: testInsight,
11
- };
12
-
13
- const exampleField = 'Date';
14
-
15
- useCaseTestCases.forEach((useCase) => {
16
- let test = fixtures[useCase.value];
17
- test.describe(`quantic timeframe facet ${useCase.label}`, () => {
18
- test.describe('when selecting and deselecting a facet value', () => {
19
- test.use({
20
- facetResponses: {
21
- responses: [
22
- [initialFacetData],
23
- [selectedFacetData],
24
- [initialFacetData],
25
- ],
26
- },
27
- });
28
-
29
- test('should trigger a new search and log the corresponding UA analytics events', async ({
30
- baseFacet,
31
- facet,
32
- }) => {
33
- const selectedIndex = 0;
34
- const expectedStartDate = 'now';
35
- const expectedEndDate = 'next-1-year';
36
- const expectedFacetData = {
37
- facetId: exampleField,
38
- facetField: exampleField,
39
- facetValue: `${expectedStartDate}..${expectedEndDate}`,
40
- };
41
- const facetSelectUaRequest =
42
- baseFacet.waitForFacetSelectUaAnalytics(expectedFacetData);
43
- const firstSearchResponsePromise = baseFacet.waitForSearchResponse();
44
-
45
- await facet.clickOnFacetValue(selectedIndex);
46
-
47
- await facetSelectUaRequest;
48
- const firstSearchResponse = await firstSearchResponsePromise;
49
- const {analytics: analyticsForFacetSelect} =
50
- baseFacet.extractDataFromResponse(firstSearchResponse);
51
- expect(analyticsForFacetSelect.actionCause).toEqual('facetSelect');
52
- if (useCase.value === useCaseEnum.search) {
53
- expect(analyticsForFacetSelect.customData).toEqual(
54
- expect.objectContaining(expectedFacetData)
55
- );
56
- }
57
-
58
- const facetDeselectUaRequest =
59
- baseFacet.waitForFacetDeselectUaAnalytics(expectedFacetData);
60
- const secondSearchResponsePromise = baseFacet.waitForSearchResponse();
61
-
62
- await facet.clickOnFacetValue(selectedIndex);
63
-
64
- await facetDeselectUaRequest;
65
- const secondSearchResponse = await secondSearchResponsePromise;
66
- const {analytics: analyticsForFacetDeselect} =
67
- baseFacet.extractDataFromResponse(secondSearchResponse);
68
- expect(analyticsForFacetDeselect.actionCause).toEqual('facetDeselect');
69
- });
70
- });
71
-
72
- test.describe('when selecting a facet value and clicking the clear filter button', () => {
73
- test.use({
74
- facetResponses: {
75
- responses: [
76
- [initialFacetData],
77
- [selectedFacetData],
78
- [initialFacetData],
79
- ],
80
- },
81
- });
82
-
83
- test('should trigger a new search and log the corresponding UA analytics events', async ({
84
- baseFacet,
85
- facet,
86
- }) => {
87
- const selectedIndex = 0;
88
- const expectedStartDate = 'now';
89
- const expectedEndDate = 'next-1-year';
90
- const expectedFacetData = {
91
- facetId: exampleField,
92
- facetField: exampleField,
93
- facetValue: `${expectedStartDate}..${expectedEndDate}`,
94
- };
95
- const facetSelectUaRequest =
96
- baseFacet.waitForFacetSelectUaAnalytics(expectedFacetData);
97
- let searchResponsePromise = baseFacet.waitForSearchResponse();
98
-
99
- await facet.clickOnFacetValue(selectedIndex);
100
-
101
- await facetSelectUaRequest;
102
- let searchResponse = await searchResponsePromise;
103
- const {analytics: analyticsForFacetSelect} =
104
- baseFacet.extractDataFromResponse(searchResponse);
105
- expect(analyticsForFacetSelect.actionCause).toEqual('facetSelect');
106
-
107
- const clearAllUaRequest = baseFacet.waitForFacetClearAllUaAnalytics({
108
- facetId: exampleField,
109
- facetField: exampleField,
110
- });
111
- searchResponsePromise = baseFacet.waitForSearchResponse();
112
-
113
- await facet.clearSelectionButton.click();
114
-
115
- await clearAllUaRequest;
116
- searchResponse = await searchResponsePromise;
117
- const {analytics: analyticsForFacetDeselect} =
118
- baseFacet.extractDataFromResponse(searchResponse);
119
- expect(analyticsForFacetDeselect.actionCause).toEqual('facetClearAll');
120
- });
121
- });
122
-
123
- test.describe('when typing in the facet search box input', () => {
124
- test('should fetch facet values according to the query typed', async ({
125
- baseFacet,
126
- facet,
127
- }) => {
128
- const exampleStart = '2025-01-01';
129
- const exampleEnd = '2025-01-02';
130
- const expectedFacetData = {
131
- facetId: `${exampleField}_input`,
132
- facetField: exampleField,
133
- facetValue: `${exampleStart.replaceAll('-', '/')}@00:00:00..${exampleEnd.replaceAll('-', '/')}@23:59:59`,
134
- };
135
-
136
- const facetSelectUaRequest =
137
- baseFacet.waitForFacetSelectUaAnalytics(expectedFacetData);
138
- const searchResponsePromise = baseFacet.waitForSearchResponse();
139
-
140
- await facet.fillFilterStartInput(exampleStart);
141
- await facet.fillFilterEndInput(exampleEnd);
142
- await facet.filterApplyButton.click();
143
-
144
- await facetSelectUaRequest;
145
- const searchResponse = await searchResponsePromise;
146
- const {analytics: analyticsForFacetSelect} =
147
- baseFacet.extractDataFromResponse(searchResponse);
148
- expect(analyticsForFacetSelect.actionCause).toEqual('facetSelect');
149
- if (useCase.value === useCaseEnum.search) {
150
- expect(analyticsForFacetSelect.customData).toEqual(
151
- expect.objectContaining(expectedFacetData)
152
- );
153
- }
154
- });
155
- });
156
-
157
- if (useCase.value === useCaseEnum.search) {
158
- test.describe('with a selected value in the URL', () => {
159
- const selectedIndex = 0;
160
- const date = new Date();
161
- date.setFullYear(date.getFullYear() + 20);
162
- const todayDate = date.toISOString().slice(0, 10);
163
- date.setDate(date.getDate() - 1);
164
- const yesterdayDate = date.toISOString().slice(0, 10);
165
- test.use({
166
- urlHash: `df-${exampleField}=${yesterdayDate.replaceAll('-', '/')}@00:00:00..${todayDate.replaceAll('-', '/')}@23:59:59`,
167
- facetResponses: {
168
- responses: [],
169
- },
170
- });
171
-
172
- test('should select the correct facet value', async ({facet}) => {
173
- await expect(facet.facetValue.nth(selectedIndex)).toHaveAttribute(
174
- 'aria-pressed',
175
- 'true'
176
- );
177
- expect(facet.facetValue.nth(selectedIndex)).toHaveText(
178
- new RegExp(`${yesterdayDate} - ${todayDate}`)
179
- );
180
- });
181
- });
182
- }
183
- });
184
- });
@@ -1,107 +0,0 @@
1
- // @ts-ignore
2
- import {createElement} from 'lwc';
3
- import QuanticTooltip from '../quanticTooltip';
4
-
5
- const exampleItemOne = document.createElement('div');
6
- exampleItemOne.innerText = 'Item One';
7
- const exampleValue = 'Example value';
8
- const exampleAssignedElements = [exampleItemOne];
9
-
10
- const selectors = {
11
- tooltip: '.tooltip__content',
12
- };
13
-
14
- const exampleOptions = {
15
- value: exampleValue,
16
- };
17
-
18
- function createTestComponent(
19
- options = exampleOptions,
20
- assignedElements = exampleAssignedElements
21
- ) {
22
- mockSlotAssignedNodes(assignedElements);
23
-
24
- const element = createElement('c-quantic-tooltip', {
25
- is: QuanticTooltip,
26
- });
27
-
28
- for (const [key, value] of Object.entries(options)) {
29
- element[key] = value;
30
- }
31
-
32
- document.body.appendChild(element);
33
- return element;
34
- }
35
-
36
- // Helper function to wait until the microtask queue is empty.
37
- function flushPromises() {
38
- // eslint-disable-next-line @lwc/lwc/no-async-operation
39
- return new Promise((resolve) => setTimeout(resolve, 0));
40
- }
41
-
42
- /**
43
- * Mocks the return value of the assignedNodes method.
44
- * @param {Array<Element>} assignedElements
45
- */
46
- function mockSlotAssignedNodes(assignedElements) {
47
- HTMLSlotElement.prototype.assignedNodes = function () {
48
- return assignedElements;
49
- };
50
- }
51
-
52
- describe('c-quantic-tooltip', () => {
53
- function cleanup() {
54
- // The jsdom instance is shared across test cases in a single file so reset the DOM
55
- while (document.body.firstChild) {
56
- document.body.removeChild(document.body.firstChild);
57
- }
58
- jest.clearAllMocks();
59
- }
60
-
61
- afterEach(() => {
62
- cleanup();
63
- });
64
-
65
- it('should display the tooltip when the method showTooltip is called', async () => {
66
- const element = createTestComponent();
67
- await flushPromises();
68
-
69
- const tooltip = element.shadowRoot.querySelector(selectors.tooltip);
70
-
71
- expect(tooltip).not.toBeNull();
72
- expect(tooltip.classList.contains('tooltip__content--visible')).toBe(false);
73
-
74
- await element.showTooltip();
75
-
76
- expect(tooltip.classList.contains('tooltip__content--visible')).toBe(true);
77
- });
78
-
79
- it('should hide the tooltip when the method hideTooltip method is called', async () => {
80
- const element = createTestComponent();
81
- await flushPromises();
82
- await element.showTooltip();
83
-
84
- const tooltip = element.shadowRoot.querySelector(selectors.tooltip);
85
-
86
- expect(tooltip).not.toBeNull();
87
- expect(tooltip.classList.contains('tooltip__content--visible')).toBe(true);
88
-
89
- await element.hideTooltip();
90
-
91
- expect(tooltip.classList.contains('tooltip__content--visible')).toBe(false);
92
- });
93
-
94
- it('should not display the tooltip when the slot content is empty', async () => {
95
- const element = createTestComponent(exampleOptions, []);
96
- await flushPromises();
97
-
98
- const tooltip = element.shadowRoot.querySelector(selectors.tooltip);
99
-
100
- expect(tooltip).not.toBeNull();
101
- expect(tooltip.classList.contains('tooltip__content--visible')).toBe(false);
102
-
103
- await element.showTooltip();
104
-
105
- expect(tooltip.classList.contains('tooltip__content--visible')).toBe(false);
106
- });
107
- });