@coveo/quantic 3.33.0 → 3.33.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.
- package/README.md +15 -15
- package/force-app/main/default/lwc/quanticAriaLive/__tests__/quanticAriaLive.test.js +106 -0
- package/force-app/main/default/lwc/quanticBreadcrumbManager/__tests__/quanticBreadcrumbManager.test.js +752 -0
- package/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/fixture.ts +76 -0
- package/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/pageObject.ts +282 -0
- package/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/quanticBreadcrumbManager.e2e.ts +167 -0
- package/force-app/main/default/lwc/quanticCarousel/__tests__/quanticCarousel.test.js +262 -0
- package/force-app/main/default/lwc/quanticCaseClassification/__tests__/quanticCaseClassification.test.js +819 -0
- package/force-app/main/default/lwc/quanticCaseClassification/e2e/data.ts +23 -0
- package/force-app/main/default/lwc/quanticCaseClassification/e2e/fixture.ts +51 -0
- package/force-app/main/default/lwc/quanticCaseClassification/e2e/pageObject.ts +152 -0
- package/force-app/main/default/lwc/quanticCaseClassification/e2e/quanticCaseClassification.e2e.ts +269 -0
- package/force-app/main/default/lwc/quanticCategoryFacet/__tests__/quanticCategoryFacet.test.js +1183 -0
- package/force-app/main/default/lwc/quanticCategoryFacet/e2e/data.ts +27 -0
- package/force-app/main/default/lwc/quanticCategoryFacet/e2e/fixture.ts +75 -0
- package/force-app/main/default/lwc/quanticCategoryFacet/e2e/pageObject.ts +55 -0
- package/force-app/main/default/lwc/quanticCategoryFacet/e2e/quanticCategoryFacet.e2e.ts +199 -0
- package/force-app/main/default/lwc/quanticCitation/__tests__/quanticCitation.test.js +371 -0
- package/force-app/main/default/lwc/quanticColoredResultBadge/__tests__/quanticColoredResultBadge.test.js +212 -0
- package/force-app/main/default/lwc/quanticDateFacet/__tests__/quanticDateFacet.test.js +688 -0
- package/force-app/main/default/lwc/quanticDateFacet/e2e/data.ts +24 -0
- package/force-app/main/default/lwc/quanticDateFacet/e2e/fixture.ts +68 -0
- package/force-app/main/default/lwc/quanticDateFacet/e2e/pageObject.ts +27 -0
- package/force-app/main/default/lwc/quanticDateFacet/e2e/quanticDateFacet.e2e.ts +145 -0
- package/force-app/main/default/lwc/quanticDidYouMean/__tests__/quanticDidYouMean.test.js +348 -0
- package/force-app/main/default/lwc/quanticDidYouMean/e2e/data.ts +48 -0
- package/force-app/main/default/lwc/quanticDidYouMean/e2e/fixture.ts +80 -0
- package/force-app/main/default/lwc/quanticDidYouMean/e2e/pageObject.ts +173 -0
- package/force-app/main/default/lwc/quanticDidYouMean/e2e/quanticDidYouMean.e2e.ts +219 -0
- package/force-app/main/default/lwc/quanticDocumentSuggestion/__tests__/quanticDocumentSuggestion.test.js +404 -0
- package/force-app/main/default/lwc/quanticDocumentSuggestion/e2e/fixture.ts +38 -0
- package/force-app/main/default/lwc/quanticDocumentSuggestion/e2e/pageObject.ts +52 -0
- package/force-app/main/default/lwc/quanticDocumentSuggestion/e2e/quanticDocumentSuggestion.e2e.ts +102 -0
- package/force-app/main/default/lwc/quanticFacet/__tests__/quanticFacet.test.js +1105 -0
- package/force-app/main/default/lwc/quanticFacet/e2e/data.ts +21 -0
- package/force-app/main/default/lwc/quanticFacet/e2e/fixture.ts +73 -0
- package/force-app/main/default/lwc/quanticFacet/e2e/pageObject.ts +67 -0
- package/force-app/main/default/lwc/quanticFacet/e2e/quanticFacet.e2e.ts +208 -0
- package/force-app/main/default/lwc/quanticFacetCaption/__tests__/quanticFacetCaption.test.js +28 -0
- package/force-app/main/default/lwc/quanticFacetManager/__tests__/quanticFacetManager.test.js +178 -0
- package/force-app/main/default/lwc/quanticFacetManager/e2e/fixture.ts +64 -0
- package/force-app/main/default/lwc/quanticFacetManager/e2e/pageObject.ts +23 -0
- package/force-app/main/default/lwc/quanticFacetManager/e2e/quanticFacetManager.e2e.ts +82 -0
- package/force-app/main/default/lwc/quanticFeedback/__tests__/quanticFeedback.test.js +392 -0
- package/force-app/main/default/lwc/quanticFeedbackModal/__tests__/quanticFeedbackModal.test.js +448 -0
- package/force-app/main/default/lwc/quanticFeedbackModalQna/__tests__/quanticFeedbackModalQna.test.js +298 -0
- package/force-app/main/default/lwc/quanticFoldedResultList/__tests__/quanticFoldedResultList.test.js +323 -0
- package/force-app/main/default/lwc/quanticFoldedResultList/e2e/fixture.ts +70 -0
- package/force-app/main/default/lwc/quanticFoldedResultList/e2e/pageObject.ts +81 -0
- package/force-app/main/default/lwc/quanticFoldedResultList/e2e/quanticFoldedResultList.e2e.ts +69 -0
- package/force-app/main/default/lwc/quanticGeneratedAnswer/__tests__/quanticGeneratedAnswer.test.js +1158 -0
- package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/data.ts +56 -0
- package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/fixture.ts +185 -0
- package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/pageObject.ts +451 -0
- package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/quanticGeneratedAnswer.e2e.ts +337 -0
- package/force-app/main/default/lwc/quanticGeneratedAnswerContent/__tests__/quanticGeneratedAnswerContent.test.js +151 -0
- package/force-app/main/default/lwc/quanticHeading/__tests__/quanticHeading.test.js +71 -0
- package/force-app/main/default/lwc/quanticHeadlessLoader/__tests__/quanticHeadlessLoader.test.js +651 -0
- package/force-app/main/default/lwc/quanticInsightInterface/__tests__/quanticInsightInterface.test.js +194 -0
- package/force-app/main/default/lwc/quanticInsightSummary/__tests__/quanticInsightSummary.test.js +230 -0
- package/force-app/main/default/lwc/quanticModal/__tests__/quanticModal.test.js +205 -0
- package/force-app/main/default/lwc/quanticNotifications/__tests__/quanticNotifications.test.js +309 -0
- package/force-app/main/default/lwc/quanticNotifications/e2e/fixture.ts +58 -0
- package/force-app/main/default/lwc/quanticNotifications/e2e/pageObject.ts +55 -0
- package/force-app/main/default/lwc/quanticNotifications/e2e/quanticNotifications.e2e.ts +47 -0
- package/force-app/main/default/lwc/quanticNumericFacet/__tests__/quanticNumericFacet.test.js +953 -0
- package/force-app/main/default/lwc/quanticNumericFacet/e2e/data.ts +28 -0
- package/force-app/main/default/lwc/quanticNumericFacet/e2e/fixture.ts +71 -0
- package/force-app/main/default/lwc/quanticNumericFacet/e2e/pageObject.ts +59 -0
- package/force-app/main/default/lwc/quanticNumericFacet/e2e/quanticNumericFacet.e2e.ts +164 -0
- package/force-app/main/default/lwc/quanticPager/__tests__/quanticPager.test.js +430 -0
- package/force-app/main/default/lwc/quanticPager/e2e/fixture.ts +65 -0
- package/force-app/main/default/lwc/quanticPager/e2e/pageObject.ts +69 -0
- package/force-app/main/default/lwc/quanticPager/e2e/quanticPager.e2e.ts +106 -0
- package/force-app/main/default/lwc/quanticPlaceholder/__tests__/quanticPlaceholder.test.js +47 -0
- package/force-app/main/default/lwc/quanticQuickviewContent/__tests__/data/defaultTestCase.json +13 -0
- package/force-app/main/default/lwc/quanticQuickviewContent/__tests__/data/youtubeTestCase.json +14 -0
- package/force-app/main/default/lwc/quanticQuickviewContent/__tests__/quanticQuickviewContent.test.js +82 -0
- package/force-app/main/default/lwc/quanticRadioButtonsGroup/__tests__/quanticRadioButtonsGroup.test.js +273 -0
- package/force-app/main/default/lwc/quanticRecentQueriesList/__tests__/quanticRecentQueriesList.test.js +448 -0
- package/force-app/main/default/lwc/quanticRecentQueriesList/e2e/fixture.ts +42 -0
- package/force-app/main/default/lwc/quanticRecentQueriesList/e2e/pageObject.ts +55 -0
- package/force-app/main/default/lwc/quanticRecentQueriesList/e2e/quanticRecentQueriesList.e2e.ts +93 -0
- package/force-app/main/default/lwc/quanticRecentResultsList/__tests__/quanticRecentResultsList.test.js +516 -0
- package/force-app/main/default/lwc/quanticRecentResultsList/e2e/fixture.ts +42 -0
- package/force-app/main/default/lwc/quanticRecentResultsList/e2e/pageObject.ts +61 -0
- package/force-app/main/default/lwc/quanticRecentResultsList/e2e/quanticRecentResultsList.e2e.ts +48 -0
- package/force-app/main/default/lwc/quanticRecommendationList/__tests__/quanticRecommendationList.test.js +491 -0
- package/force-app/main/default/lwc/quanticRecommendationList/e2e/fixture.ts +35 -0
- package/force-app/main/default/lwc/quanticRecommendationList/e2e/pageObject.ts +52 -0
- package/force-app/main/default/lwc/quanticRecommendationList/e2e/quanticRecommendationList.e2e.ts +53 -0
- package/force-app/main/default/lwc/quanticRefineModalContent/__tests__/quanticRefineModalContent.test.js +747 -0
- package/force-app/main/default/lwc/quanticRefineToggle/__tests__/quanticRefineToggle.test.js +542 -0
- package/force-app/main/default/lwc/quanticResultAction/__tests__/quanticResultAction.test.js +262 -0
- package/force-app/main/default/lwc/quanticResultActionBar/__tests__/quanticResultActionBar.test.js +141 -0
- package/force-app/main/default/lwc/quanticResultChildren/__tests__/quanticResultChildren.test.js +340 -0
- package/force-app/main/default/lwc/quanticResultCopyToClipboard/__tests__/quanticResultCopyToClipboard.test.js +300 -0
- package/force-app/main/default/lwc/quanticResultCopyToClipboard/e2e/fixture.ts +46 -0
- package/force-app/main/default/lwc/quanticResultCopyToClipboard/e2e/pageObject.ts +49 -0
- package/force-app/main/default/lwc/quanticResultCopyToClipboard/e2e/quanticResultCopyToClipboard.e2e.ts +40 -0
- package/force-app/main/default/lwc/quanticResultDate/__tests__/quanticResultDate.test.js +144 -0
- package/force-app/main/default/lwc/quanticResultField/__tests__/quanticResultField.test.js +120 -0
- package/force-app/main/default/lwc/quanticResultHighlightedTextField/__tests__/quanticResultHighlightedTextField.test.js +209 -0
- package/force-app/main/default/lwc/quanticResultLink/__tests__/quanticResultLink.test.js +261 -0
- package/force-app/main/default/lwc/quanticResultList/__tests__/quanticResultList.test.js +342 -0
- package/force-app/main/default/lwc/quanticResultList/e2e/fixture.ts +66 -0
- package/force-app/main/default/lwc/quanticResultList/e2e/pageObject.ts +81 -0
- package/force-app/main/default/lwc/quanticResultList/e2e/quanticResultList.e2e.ts +69 -0
- package/force-app/main/default/lwc/quanticResultMultiValueText/__tests__/quanticResultMultiValueText.test.js +235 -0
- package/force-app/main/default/lwc/quanticResultNumber/__tests__/quanticResultNumber.test.js +144 -0
- package/force-app/main/default/lwc/quanticResultPrintableUri/__tests__/quanticResultPrintableUri.test.js +324 -0
- package/force-app/main/default/lwc/quanticResultQuickview/__tests__/quanticResultQuickview.test.js +301 -0
- package/force-app/main/default/lwc/quanticResultQuickview/e2e/fixture.ts +81 -0
- package/force-app/main/default/lwc/quanticResultQuickview/e2e/pageObject.ts +38 -0
- package/force-app/main/default/lwc/quanticResultQuickview/e2e/quanticResultQuickView.e2e.ts +66 -0
- package/force-app/main/default/lwc/quanticResultTemplate/__tests__/quanticResultTemplate.test.js +90 -0
- package/force-app/main/default/lwc/quanticResultText/__tests__/quanticResultText.test.js +155 -0
- package/force-app/main/default/lwc/quanticResultsPerPage/__tests__/quanticResultsPerPage.test.js +464 -0
- package/force-app/main/default/lwc/quanticResultsPerPage/e2e/fixture.ts +74 -0
- package/force-app/main/default/lwc/quanticResultsPerPage/e2e/pageObject.ts +85 -0
- package/force-app/main/default/lwc/quanticResultsPerPage/e2e/quanticResultsPerPage.e2e.ts +97 -0
- package/force-app/main/default/lwc/quanticSearchBox/__tests__/quanticSearchBox.test.js +487 -0
- package/force-app/main/default/lwc/quanticSearchBox/e2e/fixture.ts +84 -0
- package/force-app/main/default/lwc/quanticSearchBox/e2e/pageObject.ts +45 -0
- package/force-app/main/default/lwc/quanticSearchBox/e2e/quanticSearchBox.e2e.ts +159 -0
- package/force-app/main/default/lwc/quanticSearchBoxInput/__tests__/quanticSearchBoxInput.test.js +743 -0
- package/force-app/main/default/lwc/quanticSearchBoxSuggestionsList/__tests__/quanticSearchBoxSuggestionsList.test.js +571 -0
- package/force-app/main/default/lwc/quanticSearchBoxSuggestionsList/e2e/fixture.ts +110 -0
- package/force-app/main/default/lwc/quanticSearchBoxSuggestionsList/e2e/pageObject.ts +113 -0
- package/force-app/main/default/lwc/quanticSearchBoxSuggestionsList/e2e/quanticSearchBoxSuggestionsList.e2e.ts +299 -0
- package/force-app/main/default/lwc/quanticSmartSnippet/__tests__/quanticSmartSnippet.test.js +341 -0
- package/force-app/main/default/lwc/quanticSmartSnippet/e2e/data.ts +21 -0
- package/force-app/main/default/lwc/quanticSmartSnippet/e2e/fixture.ts +91 -0
- package/force-app/main/default/lwc/quanticSmartSnippet/e2e/pageObject.ts +196 -0
- package/force-app/main/default/lwc/quanticSmartSnippet/e2e/quanticSmartSnippet.e2e.ts +192 -0
- package/force-app/main/default/lwc/quanticSmartSnippetAnswer/__tests__/quanticSmartSnippetAnswer.test.js +126 -0
- package/force-app/main/default/lwc/quanticSmartSnippetSource/__tests__/quanticSmartSnippetSource.test.js +290 -0
- package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/__tests__/quanticSmartSnippetSuggestions.test.js +329 -0
- package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/e2e/data.ts +31 -0
- package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/e2e/fixture.ts +93 -0
- package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/e2e/pageObject.ts +160 -0
- package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/e2e/quanticSmartSnippetSuggestions.e2e.ts +127 -0
- package/force-app/main/default/lwc/quanticSort/__tests__/quanticSort.test.js +416 -0
- package/force-app/main/default/lwc/quanticSort/e2e/fixture.ts +61 -0
- package/force-app/main/default/lwc/quanticSort/e2e/pageObject.ts +89 -0
- package/force-app/main/default/lwc/quanticSort/e2e/quanticSort.e2e.ts +91 -0
- package/force-app/main/default/lwc/quanticSourceCitations/__tests__/quanticSourceCitations.test.js +136 -0
- package/force-app/main/default/lwc/quanticStandaloneSearchBox/__tests__/quanticStandaloneSearchBox.test.js +387 -0
- package/force-app/main/default/lwc/quanticStandaloneSearchBox/e2e/fixture.ts +53 -0
- package/force-app/main/default/lwc/quanticStandaloneSearchBox/e2e/pageObject.ts +54 -0
- package/force-app/main/default/lwc/quanticStandaloneSearchBox/e2e/quanticStandaloneSearchBox.e2e.ts +72 -0
- package/force-app/main/default/lwc/quanticStatefulButton/__tests__/quanticStatefulButton.test.js +222 -0
- package/force-app/main/default/lwc/quanticSummary/__tests__/quanticSummary.test.js +244 -0
- package/force-app/main/default/lwc/quanticTab/__tests__/quanticTab.test.js +333 -0
- package/force-app/main/default/lwc/quanticTab/e2e/fixture.ts +56 -0
- package/force-app/main/default/lwc/quanticTab/e2e/pageObject.ts +68 -0
- package/force-app/main/default/lwc/quanticTab/e2e/quanticTab.e2e.ts +72 -0
- package/force-app/main/default/lwc/quanticTabBar/__tests__/quanticTabBar.test.js +331 -0
- package/force-app/main/default/lwc/quanticTabBar/e2e/fixture.ts +61 -0
- package/force-app/main/default/lwc/quanticTabBar/e2e/pageObject.ts +80 -0
- package/force-app/main/default/lwc/quanticTabBar/e2e/quanticTabBar.e2e.ts +171 -0
- package/force-app/main/default/lwc/quanticTimeframeFacet/__tests__/quanticTimeframeFacet.test.js +1037 -0
- package/force-app/main/default/lwc/quanticTimeframeFacet/e2e/fixture.ts +58 -0
- package/force-app/main/default/lwc/quanticTimeframeFacet/e2e/pageObject.ts +43 -0
- package/force-app/main/default/lwc/quanticTimeframeFacet/e2e/quanticTimeframeFacet.e2e.ts +160 -0
- package/force-app/main/default/lwc/quanticTooltip/__tests__/quanticTooltip.test.js +107 -0
- package/force-app/main/default/lwc/quanticUserAction/__tests__/quanticUserAction.test.js +427 -0
- package/force-app/main/default/lwc/quanticUserActionsSession/__tests__/quanticUserActionsSession.test.js +269 -0
- package/force-app/main/default/lwc/quanticUserActionsTimeline/__tests__/data/userActionsState.json +89 -0
- package/force-app/main/default/lwc/quanticUserActionsTimeline/__tests__/quanticUserActionsTimeline.test.js +511 -0
- package/force-app/main/default/lwc/quanticUserActionsToggle/__tests__/quanticUserActionsToggle.test.js +229 -0
- package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/data.ts +32 -0
- package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/fixture.ts +32 -0
- package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/pageObject.ts +71 -0
- package/force-app/main/default/lwc/quanticUserActionsToggle/e2e/quanticUserActionsToggle.e2e.ts +39 -0
- package/force-app/main/default/lwc/quanticUtils/__tests__/citationAnchoringUtils.test.js +84 -0
- package/force-app/main/default/lwc/quanticUtils/__tests__/facetDependenciesUtils.test.js +92 -0
- package/force-app/main/default/lwc/quanticUtils/__tests__/markdownUtils.test.js +71 -0
- package/force-app/main/default/lwc/quanticUtils/__tests__/quanticUtils.test.js +223 -0
- package/force-app/main/default/lwc/quanticViewedByCustomerBadge/__tests__/quanticViewedByCustomerBadge.test.js +131 -0
- package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/case-assist-engine/case-assist-engine.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/commerce-engine/commerce-engine.d.ts +16 -16
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/common-reducers.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/insight-engine/insight-engine.d.ts +5 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/recommendation-engine/recommendation-engine.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/search-engine/search-engine.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/store.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/facets/headless-core-commerce-facet.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/range-facet/headless-core-range-facet.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/actions-history/ipx-actions-history-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/advanced-search-queries/advanced-search-queries-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/attached-results/attached-results-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-assist-configuration/case-assist-configuration-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-context/case-context-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-field/case-field-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-field/case-field-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/case-input/case-input-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/configuration/configuration-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/context/cart/cart-actions.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/context/cart/cart-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/context/context-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/did-you-mean/did-you-mean-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/facet-search-set/commerce-facet-search-actions.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/facet-set/facet-set-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/field-suggestions-order/field-suggestions-order-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/numeric-facet/manual-numeric-facet-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/instant-products/instant-products-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/pagination/pagination-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/parameters/parameters-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/product/product-actions.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/product-listing/product-listing-actions.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/product-listing/product-listing-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/query/query-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/query-suggest/query-suggest-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/recent-queries/recent-queries-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/recommendations/recommendations-actions.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/recommendations/recommendations-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/search/search-actions.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/search/search-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/sort/sort-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/standalone-search-box-set/standalone-search-box-set-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/standalone-search-box-set/standalone-search-box-set-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/triggers/triggers-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/configuration/configuration-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/context/context-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/debug/debug-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/debug/version-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/dictionary-field-context/dictionary-field-context-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/did-you-mean/did-you-mean-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/document-suggestion/document-suggestion-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/document-suggestion/document-suggestion-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/excerpt-length/excerpt-length-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facet-options/facet-options-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/automatic-facet-set/automatic-facet-set-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/category-facet-set/category-facet-set-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/facet-order/facet-order-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/facet-search-set/category/category-facet-search-set-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/facet-search-set/generic/generic-facet-search-actions.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/facet-search-set/specific/specific-facet-search-set-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/facet-set/facet-set-controller-actions.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/facet-set/facet-set-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/date-facet-set/date-facet-controller-actions.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/date-facet-set/date-facet-set-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/numeric-facet-set/numeric-facet-controller-actions.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/facets/range-facets/numeric-facet-set/numeric-facet-set-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/fields/fields-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/fields/fields-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/folding/folding-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/folding/folding-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/folding/insight-folding-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-actions.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/history/history-actions.d.ts +3 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/history/history-slice.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/insight-configuration/insight-configuration-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/insight-interface/insight-interface-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/insight-interface/insight-interface-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/insight-search/insight-search-actions.d.ts +5 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/insight-search/legacy/insight-search-actions.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/insight-user-actions/insight-user-actions-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/insight-user-actions/insight-user-actions-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/instant-results/instant-results-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/pagination/pagination-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/pipeline/pipeline-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/query/query-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/query-set/query-set-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/query-suggest/query-suggest-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/query-suggest/query-suggest-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/question-answering/question-answering-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/recent-queries/recent-queries-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/recent-results/recent-results-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/recommendation/recommendation-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/recommendation/recommendation-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/result-preview/result-preview-actions.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/result-preview/result-preview-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/legacy/search-actions.d.ts +5 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-actions.d.ts +6 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search-hub/search-hub-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/sort-criteria/sort-criteria-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/standalone-search-box-set/standalone-search-box-set-actions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/standalone-search-box-set/standalone-search-box-set-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/static-filter-set/static-filter-set-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/tab-set/tab-set-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/triggers/triggers-slice.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/factories/build-factory.d.ts +6 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/access-token-manager.d.ts +19 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/engine.d.ts +4 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/common/access-token-manager.d.ts +19 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/engine/search-engine.ssr.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/test/mock-ssr-controller-definitions.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/headless.js +2 -2
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +2 -2
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +2 -2
- package/package.json +46 -44
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import {BreadcrumbManagerObject} from './pageObject';
|
|
2
|
+
import {quanticBase} from '../../../../../../playwright/fixtures/baseFixture';
|
|
3
|
+
import {SearchObject} from '../../../../../../playwright/page-object/searchObject';
|
|
4
|
+
import {
|
|
5
|
+
searchRequestRegex,
|
|
6
|
+
insightSearchRequestRegex,
|
|
7
|
+
} from '../../../../../../playwright/utils/requests';
|
|
8
|
+
import {InsightSetupObject} from '../../../../../../playwright/page-object/insightSetupObject';
|
|
9
|
+
import {useCaseEnum} from '../../../../../../playwright/utils/useCase';
|
|
10
|
+
|
|
11
|
+
const breadcrumbManagerUrl = 's/quantic-breadcrumb-manager';
|
|
12
|
+
|
|
13
|
+
interface BreadcrumbManagerOptions {
|
|
14
|
+
categoryDivider: string;
|
|
15
|
+
collapseThreshold: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
type QuanticBreadcrumbManagerE2EFixtures = {
|
|
19
|
+
breadcrumbManager: BreadcrumbManagerObject;
|
|
20
|
+
search: SearchObject;
|
|
21
|
+
options: Partial<BreadcrumbManagerOptions>;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
type QuanticBreadcrumbManagerE2ESearchFixtures =
|
|
25
|
+
QuanticBreadcrumbManagerE2EFixtures & {
|
|
26
|
+
urlHash: string;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
type QuanticBreadcrumbManagerE2eInsightFixtures =
|
|
30
|
+
QuanticBreadcrumbManagerE2ESearchFixtures & {
|
|
31
|
+
insightSetup: InsightSetupObject;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const testSearch =
|
|
35
|
+
quanticBase.extend<QuanticBreadcrumbManagerE2ESearchFixtures>({
|
|
36
|
+
options: {},
|
|
37
|
+
urlHash: '',
|
|
38
|
+
search: async ({page}, use) => {
|
|
39
|
+
await use(new SearchObject(page, searchRequestRegex));
|
|
40
|
+
},
|
|
41
|
+
breadcrumbManager: async (
|
|
42
|
+
{page, options, configuration, search, urlHash},
|
|
43
|
+
use
|
|
44
|
+
) => {
|
|
45
|
+
await page.goto(
|
|
46
|
+
urlHash ? `${breadcrumbManagerUrl}#${urlHash}` : breadcrumbManagerUrl
|
|
47
|
+
);
|
|
48
|
+
configuration.configure(options);
|
|
49
|
+
await search.waitForSearchResponse();
|
|
50
|
+
await use(new BreadcrumbManagerObject(page));
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export const testInsight =
|
|
55
|
+
quanticBase.extend<QuanticBreadcrumbManagerE2eInsightFixtures>({
|
|
56
|
+
options: {},
|
|
57
|
+
search: async ({page}, use) => {
|
|
58
|
+
await use(new SearchObject(page, insightSearchRequestRegex));
|
|
59
|
+
},
|
|
60
|
+
insightSetup: async ({page}, use) => {
|
|
61
|
+
await use(new InsightSetupObject(page));
|
|
62
|
+
},
|
|
63
|
+
breadcrumbManager: async (
|
|
64
|
+
{page, options, search, configuration, insightSetup},
|
|
65
|
+
use
|
|
66
|
+
) => {
|
|
67
|
+
await page.goto(breadcrumbManagerUrl);
|
|
68
|
+
configuration.configure({...options, useCase: useCaseEnum.insight});
|
|
69
|
+
await insightSetup.waitForInsightInterfaceInitialization();
|
|
70
|
+
await search.performSearch();
|
|
71
|
+
await search.waitForSearchResponse();
|
|
72
|
+
await use(new BreadcrumbManagerObject(page));
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
export {expect} from '@playwright/test';
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import type {Locator, Page, Request} from '@playwright/test';
|
|
2
|
+
import {isUaSearchEvent} from '../../../../../../playwright/utils/requests';
|
|
3
|
+
|
|
4
|
+
const breadcrumbElementsSelectors = {
|
|
5
|
+
regularFacet: {
|
|
6
|
+
component: 'c-quantic-facet',
|
|
7
|
+
facetValueComponent: 'c-quantic-facet-value',
|
|
8
|
+
breadcrumbElementTestId: 'facet-breadcrumb',
|
|
9
|
+
breadcrumbValueElementTestId: 'facet-breadcrumb-value',
|
|
10
|
+
},
|
|
11
|
+
numericFacet: {
|
|
12
|
+
component: 'c-quantic-numeric-facet',
|
|
13
|
+
facetValueComponent: 'c-quantic-facet-value',
|
|
14
|
+
breadcrumbElementTestId: 'numeric-facet-breadcrumb',
|
|
15
|
+
breadcrumbValueElementTestId: 'numeric-facet-breadcrumb-value',
|
|
16
|
+
},
|
|
17
|
+
categoryFacet: {
|
|
18
|
+
component: 'c-quantic-category-facet',
|
|
19
|
+
facetValueComponent: 'c-quantic-category-facet-value',
|
|
20
|
+
breadcrumbElementTestId: 'category-facet-breadcrumb',
|
|
21
|
+
breadcrumbValueElementTestId: 'category-facet-breadcrumb-value',
|
|
22
|
+
},
|
|
23
|
+
timeframeFacet: {
|
|
24
|
+
component: 'c-quantic-timeframe-facet',
|
|
25
|
+
facetValueComponent: 'c-quantic-facet-value',
|
|
26
|
+
breadcrumbElementTestId: 'date-facet-breadcrumb',
|
|
27
|
+
breadcrumbValueElementTestId: 'date-facet-breadcrumb-value',
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export class BreadcrumbManagerObject {
|
|
32
|
+
constructor(public page: Page) {
|
|
33
|
+
this.page = page;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
async countAllFacetsBreadcrumb() {
|
|
37
|
+
return (
|
|
38
|
+
(await this.allRegularFacetBreadcrumb.count()) +
|
|
39
|
+
(await this.allNumericFacetBreadcrumb.count()) +
|
|
40
|
+
(await this.allCategoryFacetBreadcrumb.count()) +
|
|
41
|
+
(await this.allTimeframeFacetBreadcrumb.count())
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** REGULAR FACET */
|
|
46
|
+
get allRegularFacetBreadcrumb(): Locator {
|
|
47
|
+
return this.page.getByTestId(
|
|
48
|
+
breadcrumbElementsSelectors.regularFacet.breadcrumbElementTestId
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
get firstRegularFacetBreadcrumb(): Locator {
|
|
53
|
+
return this.page
|
|
54
|
+
.getByTestId(
|
|
55
|
+
breadcrumbElementsSelectors.regularFacet.breadcrumbElementTestId
|
|
56
|
+
)
|
|
57
|
+
.first();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async clickFirstRegularFacetBreadcrumbValue(): Promise<void> {
|
|
61
|
+
await this.firstRegularFacetBreadcrumb
|
|
62
|
+
.getByTestId(
|
|
63
|
+
breadcrumbElementsSelectors.regularFacet.breadcrumbValueElementTestId
|
|
64
|
+
)
|
|
65
|
+
.click();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
get firstRegularFacet(): Locator {
|
|
69
|
+
return this.page
|
|
70
|
+
.locator(breadcrumbElementsSelectors.regularFacet.component)
|
|
71
|
+
.first();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
get firstRegularFacetValue(): Promise<string | null> {
|
|
75
|
+
return this.firstRegularFacet
|
|
76
|
+
.locator(breadcrumbElementsSelectors.regularFacet.facetValueComponent)
|
|
77
|
+
.first()
|
|
78
|
+
.locator('.facet__value-text')
|
|
79
|
+
.textContent();
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
async clickFirstRegularFacetLink(): Promise<void> {
|
|
83
|
+
await this.clickFirstFacetLink(this.firstRegularFacet);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
async clickFirstFacetLink(facetLocator: Locator): Promise<void> {
|
|
87
|
+
await facetLocator
|
|
88
|
+
.locator(breadcrumbElementsSelectors.regularFacet.facetValueComponent)
|
|
89
|
+
.first()
|
|
90
|
+
.click();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** NUMERIC FACET */
|
|
94
|
+
get allNumericFacetBreadcrumb(): Locator {
|
|
95
|
+
return this.page.getByTestId(
|
|
96
|
+
breadcrumbElementsSelectors.numericFacet.breadcrumbElementTestId
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
get firstNumericFacetBreadcrumb(): Locator {
|
|
101
|
+
return this.page
|
|
102
|
+
.getByTestId(
|
|
103
|
+
breadcrumbElementsSelectors.numericFacet.breadcrumbElementTestId
|
|
104
|
+
)
|
|
105
|
+
.first();
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
async clickFirstNumericFacetBreadcrumbValue(): Promise<void> {
|
|
109
|
+
await this.firstNumericFacetBreadcrumb
|
|
110
|
+
.getByTestId(
|
|
111
|
+
breadcrumbElementsSelectors.numericFacet.breadcrumbValueElementTestId
|
|
112
|
+
)
|
|
113
|
+
.click();
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
get firstNumericFacet(): Locator {
|
|
117
|
+
return this.page
|
|
118
|
+
.locator(breadcrumbElementsSelectors.numericFacet.component)
|
|
119
|
+
.first();
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
get firstNumericFacetValue(): Promise<string | null> {
|
|
123
|
+
return this.firstNumericFacet
|
|
124
|
+
.locator(breadcrumbElementsSelectors.numericFacet.facetValueComponent)
|
|
125
|
+
.first()
|
|
126
|
+
.locator('.facet__value-text')
|
|
127
|
+
.textContent();
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
async clickFirstNumericFacetLink(): Promise<void> {
|
|
131
|
+
await this.clickFirstFacetLink(this.firstNumericFacet);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/** DATE|TIMEFRAME FACET */
|
|
135
|
+
get allTimeframeFacetBreadcrumb(): Locator {
|
|
136
|
+
return this.page.getByTestId(
|
|
137
|
+
breadcrumbElementsSelectors.timeframeFacet.breadcrumbElementTestId
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
get firstTimeframeFacetBreadcrumb(): Locator {
|
|
142
|
+
return this.page
|
|
143
|
+
.getByTestId(
|
|
144
|
+
breadcrumbElementsSelectors.timeframeFacet.breadcrumbElementTestId
|
|
145
|
+
)
|
|
146
|
+
.first();
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
async clickFirstTimeframeFacetBreadcrumbValue(): Promise<void> {
|
|
150
|
+
await this.firstTimeframeFacetBreadcrumb
|
|
151
|
+
.getByTestId(
|
|
152
|
+
breadcrumbElementsSelectors.timeframeFacet.breadcrumbValueElementTestId
|
|
153
|
+
)
|
|
154
|
+
.click();
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
get firstTimeframeFacet(): Locator {
|
|
158
|
+
return this.page
|
|
159
|
+
.locator(breadcrumbElementsSelectors.timeframeFacet.component)
|
|
160
|
+
.first();
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
get firstTimeframeFacetValue(): Promise<string | null> {
|
|
164
|
+
return this.firstTimeframeFacet
|
|
165
|
+
.locator(breadcrumbElementsSelectors.timeframeFacet.facetValueComponent)
|
|
166
|
+
.first()
|
|
167
|
+
.locator('.facet__value-text')
|
|
168
|
+
.textContent();
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
async clickFirstTimeframeFacetLink(): Promise<void> {
|
|
172
|
+
await this.clickFirstFacetLink(this.firstTimeframeFacet);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/** CATEGORY FACET */
|
|
176
|
+
get allCategoryFacetBreadcrumb(): Locator {
|
|
177
|
+
return this.page.getByTestId(
|
|
178
|
+
breadcrumbElementsSelectors.categoryFacet.breadcrumbElementTestId
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
get firstCategoryFacetBreadcrumb(): Locator {
|
|
183
|
+
return this.page
|
|
184
|
+
.getByTestId(
|
|
185
|
+
breadcrumbElementsSelectors.categoryFacet.breadcrumbElementTestId
|
|
186
|
+
)
|
|
187
|
+
.first();
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
async clickFirstCategoryFacetBreadcrumbValue(): Promise<void> {
|
|
191
|
+
await this.firstCategoryFacetBreadcrumb
|
|
192
|
+
.getByTestId(
|
|
193
|
+
breadcrumbElementsSelectors.categoryFacet.breadcrumbValueElementTestId
|
|
194
|
+
)
|
|
195
|
+
.click();
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
get firstCategoryFacet(): Locator {
|
|
199
|
+
return this.page
|
|
200
|
+
.locator(breadcrumbElementsSelectors.categoryFacet.component)
|
|
201
|
+
.first();
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
get firstCategoryFacetValue(): Promise<string | null> {
|
|
205
|
+
return this.firstCategoryFacet
|
|
206
|
+
.locator(breadcrumbElementsSelectors.categoryFacet.facetValueComponent)
|
|
207
|
+
.first()
|
|
208
|
+
.locator('.facet__value-option')
|
|
209
|
+
.locator('span:not(.facet__number-of-results)')
|
|
210
|
+
.textContent();
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
async clickFirstCategoryFacetLink(): Promise<void> {
|
|
214
|
+
await this.clickFirstCategoryFacetValue(this.firstCategoryFacet);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
async clickFirstCategoryFacetValue(facetLocator: Locator): Promise<void> {
|
|
218
|
+
await facetLocator
|
|
219
|
+
.locator(breadcrumbElementsSelectors.categoryFacet.facetValueComponent)
|
|
220
|
+
.first()
|
|
221
|
+
.click();
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
get clearAllButton(): Locator {
|
|
225
|
+
return this.page.getByRole('button', {name: /Clear All Filters/i});
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
async clickClearAllButton(): Promise<void> {
|
|
229
|
+
await this.clearAllButton.click();
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
async waitForBreadcrumbSearchUaAnalytics(
|
|
233
|
+
actionCause: string,
|
|
234
|
+
customChecker?: Function
|
|
235
|
+
): Promise<Request> {
|
|
236
|
+
const uaRequest = this.page.waitForRequest((request) => {
|
|
237
|
+
if (isUaSearchEvent(request)) {
|
|
238
|
+
const requestBody = request.postDataJSON?.();
|
|
239
|
+
const {customData} = requestBody;
|
|
240
|
+
|
|
241
|
+
const expectedFields = {
|
|
242
|
+
actionCause: actionCause,
|
|
243
|
+
};
|
|
244
|
+
const matchesExpectedFields = Object.keys(expectedFields).every(
|
|
245
|
+
(key) => requestBody?.[key] === expectedFields[key]
|
|
246
|
+
);
|
|
247
|
+
|
|
248
|
+
return (
|
|
249
|
+
matchesExpectedFields &&
|
|
250
|
+
(customChecker ? customChecker(customData) : true)
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
return false;
|
|
254
|
+
});
|
|
255
|
+
return uaRequest;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
async waitForBreadcrumbFacetUaAnalytics(
|
|
259
|
+
expectedCustomFields: Record<string, any>
|
|
260
|
+
): Promise<Request> {
|
|
261
|
+
return this.waitForBreadcrumbSearchUaAnalytics(
|
|
262
|
+
'breadcrumbFacet',
|
|
263
|
+
(customData: Record<string, any>) => {
|
|
264
|
+
return Object.keys(expectedCustomFields).every((key) =>
|
|
265
|
+
typeof expectedCustomFields[key] === 'object'
|
|
266
|
+
? JSON.stringify(customData?.[key]) ===
|
|
267
|
+
JSON.stringify(expectedCustomFields[key])
|
|
268
|
+
: customData?.[key] === expectedCustomFields[key]
|
|
269
|
+
);
|
|
270
|
+
}
|
|
271
|
+
);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
async waitForBreadcrumbResetAllUaAnalytics(
|
|
275
|
+
customChecker?: Function
|
|
276
|
+
): Promise<Request> {
|
|
277
|
+
return this.waitForBreadcrumbSearchUaAnalytics(
|
|
278
|
+
'breadcrumbResetAll',
|
|
279
|
+
customChecker
|
|
280
|
+
);
|
|
281
|
+
}
|
|
282
|
+
}
|
package/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/quanticBreadcrumbManager.e2e.ts
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import {testSearch, testInsight} from './fixture';
|
|
2
|
+
import {
|
|
3
|
+
useCaseEnum,
|
|
4
|
+
useCaseTestCases,
|
|
5
|
+
} from '../../../../../../playwright/utils/useCase';
|
|
6
|
+
|
|
7
|
+
const fixtures = {
|
|
8
|
+
search: testSearch,
|
|
9
|
+
insight: testInsight,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const datetimeFacetLabelToValue = {
|
|
13
|
+
'Past week': 'past-1-week..now',
|
|
14
|
+
'Past month': 'past-1-month..now',
|
|
15
|
+
'Past 6 months': 'past-6-month..now',
|
|
16
|
+
'Past year': 'past-1-year..now',
|
|
17
|
+
'Past decade': 'past-10-year..now',
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
useCaseTestCases.forEach((useCase) => {
|
|
21
|
+
let test = fixtures[useCase.value];
|
|
22
|
+
|
|
23
|
+
test.describe(`quantic breadcrumb manager ${useCase.label}`, () => {
|
|
24
|
+
test.describe('when de-selecting a facet value', () => {
|
|
25
|
+
test.describe('with regular facet values', () => {
|
|
26
|
+
test('should trigger a new search and log analytics', async ({
|
|
27
|
+
breadcrumbManager,
|
|
28
|
+
search,
|
|
29
|
+
}) => {
|
|
30
|
+
const firstRegularFacetValue =
|
|
31
|
+
await breadcrumbManager.firstRegularFacetValue;
|
|
32
|
+
const searchResponsePromise = search.waitForSearchResponse();
|
|
33
|
+
await breadcrumbManager.clickFirstRegularFacetLink();
|
|
34
|
+
await searchResponsePromise;
|
|
35
|
+
|
|
36
|
+
const secondSearchResponsePromise = search.waitForSearchResponse();
|
|
37
|
+
const breadcrumbAnalyticsPromise =
|
|
38
|
+
breadcrumbManager.waitForBreadcrumbFacetUaAnalytics({
|
|
39
|
+
facetValue: firstRegularFacetValue,
|
|
40
|
+
});
|
|
41
|
+
await breadcrumbManager.clickFirstRegularFacetBreadcrumbValue();
|
|
42
|
+
await secondSearchResponsePromise;
|
|
43
|
+
await breadcrumbAnalyticsPromise;
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
test.describe('with numeric facet values', () => {
|
|
48
|
+
test('should trigger a new search and log analytics', async ({
|
|
49
|
+
breadcrumbManager,
|
|
50
|
+
search,
|
|
51
|
+
}) => {
|
|
52
|
+
const [facetRangeStart, facetRangeEnd] =
|
|
53
|
+
(await breadcrumbManager.firstNumericFacetValue)?.split(' - ') ??
|
|
54
|
+
[];
|
|
55
|
+
const searchResponsePromise = search.waitForSearchResponse();
|
|
56
|
+
await breadcrumbManager.clickFirstNumericFacetLink();
|
|
57
|
+
await searchResponsePromise;
|
|
58
|
+
|
|
59
|
+
const secondSearchResponsePromise = search.waitForSearchResponse();
|
|
60
|
+
// We use the facet display value to compare, but the display value is localized and can contain non-numeric characters while the analytics request doesn't contain those characters.
|
|
61
|
+
const breadcrumbAnalyticsPromise =
|
|
62
|
+
breadcrumbManager.waitForBreadcrumbFacetUaAnalytics({
|
|
63
|
+
facetRangeStart: facetRangeStart.replace(/[^\d]/g, ''),
|
|
64
|
+
facetRangeEnd: facetRangeEnd.replace(/[^\d]/g, ''),
|
|
65
|
+
});
|
|
66
|
+
await breadcrumbManager.clickFirstNumericFacetBreadcrumbValue();
|
|
67
|
+
await secondSearchResponsePromise;
|
|
68
|
+
await breadcrumbAnalyticsPromise;
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
test.describe('with timeframe|date facet values', () => {
|
|
73
|
+
test('should trigger a new search and log analytics', async ({
|
|
74
|
+
breadcrumbManager,
|
|
75
|
+
search,
|
|
76
|
+
}) => {
|
|
77
|
+
const facetValue = await breadcrumbManager.firstTimeframeFacetValue;
|
|
78
|
+
test.expect(facetValue).not.toBeNull();
|
|
79
|
+
const searchResponsePromise = search.waitForSearchResponse();
|
|
80
|
+
await breadcrumbManager.clickFirstTimeframeFacetLink();
|
|
81
|
+
await searchResponsePromise;
|
|
82
|
+
|
|
83
|
+
const secondSearchResponsePromise = search.waitForSearchResponse();
|
|
84
|
+
// We use the facet display value to compare, but the display value is prettified and is transformed to be human readable, while the analytics request isn't.
|
|
85
|
+
const [expectedFacetRangeStart, expectedFacetRangeEnd] =
|
|
86
|
+
datetimeFacetLabelToValue[facetValue!].split('..');
|
|
87
|
+
const breadcrumbAnalyticsPromise =
|
|
88
|
+
breadcrumbManager.waitForBreadcrumbFacetUaAnalytics({
|
|
89
|
+
facetRangeStart: expectedFacetRangeStart,
|
|
90
|
+
facetRangeEnd: expectedFacetRangeEnd,
|
|
91
|
+
});
|
|
92
|
+
await breadcrumbManager.clickFirstTimeframeFacetBreadcrumbValue();
|
|
93
|
+
await secondSearchResponsePromise;
|
|
94
|
+
await breadcrumbAnalyticsPromise;
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
test.describe('with category facet values', () => {
|
|
99
|
+
test('should trigger a new search and log analytics', async ({
|
|
100
|
+
breadcrumbManager,
|
|
101
|
+
search,
|
|
102
|
+
}) => {
|
|
103
|
+
const facetValue = await breadcrumbManager.firstCategoryFacetValue;
|
|
104
|
+
test.expect(facetValue).not.toBeNull();
|
|
105
|
+
const searchResponsePromise = search.waitForSearchResponse();
|
|
106
|
+
await breadcrumbManager.clickFirstCategoryFacetLink();
|
|
107
|
+
await searchResponsePromise;
|
|
108
|
+
|
|
109
|
+
const secondSearchResponsePromise = search.waitForSearchResponse();
|
|
110
|
+
const expectedFacetValue = facetValue!;
|
|
111
|
+
const breadcrumbAnalyticsPromise =
|
|
112
|
+
breadcrumbManager.waitForBreadcrumbFacetUaAnalytics({
|
|
113
|
+
categoryFacetPath: [expectedFacetValue],
|
|
114
|
+
});
|
|
115
|
+
await breadcrumbManager.clickFirstCategoryFacetBreadcrumbValue();
|
|
116
|
+
await secondSearchResponsePromise;
|
|
117
|
+
await breadcrumbAnalyticsPromise;
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
test.describe('when clicking on the clear all filters button', () => {
|
|
123
|
+
test('should send a clear all filters analytics event and clear all selected facets values', async ({
|
|
124
|
+
breadcrumbManager,
|
|
125
|
+
search,
|
|
126
|
+
}) => {
|
|
127
|
+
const searchResponsePromise = search.waitForSearchResponse();
|
|
128
|
+
await breadcrumbManager.clickFirstRegularFacetLink();
|
|
129
|
+
await searchResponsePromise;
|
|
130
|
+
|
|
131
|
+
const searchResponsePromiseTwo = search.waitForSearchResponse();
|
|
132
|
+
await breadcrumbManager.clickFirstTimeframeFacetLink();
|
|
133
|
+
await searchResponsePromiseTwo;
|
|
134
|
+
|
|
135
|
+
await test.expect(breadcrumbManager.clearAllButton).toBeVisible();
|
|
136
|
+
const clearAllSearchResponsePromise = search.waitForSearchResponse();
|
|
137
|
+
const clearAllAnalyticsPromise =
|
|
138
|
+
breadcrumbManager.waitForBreadcrumbResetAllUaAnalytics();
|
|
139
|
+
await breadcrumbManager.clickClearAllButton();
|
|
140
|
+
await clearAllAnalyticsPromise;
|
|
141
|
+
const clearAllSearchResponse = await clearAllSearchResponsePromise;
|
|
142
|
+
const {facets} = await clearAllSearchResponse.json();
|
|
143
|
+
const activeFacets = facets.filter((facet: any) =>
|
|
144
|
+
facet.values.some((value: any) => value.state !== 'idle')
|
|
145
|
+
);
|
|
146
|
+
test.expect(activeFacets).toHaveLength(0);
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
if (useCase.value === useCaseEnum.search) {
|
|
151
|
+
test.describe('when loading with a facet already selected', () => {
|
|
152
|
+
const facetSelectedHash = 'f-filetype=YouTubeVideo';
|
|
153
|
+
test.use({
|
|
154
|
+
urlHash: facetSelectedHash,
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
test('should have a facet selected in the breadcrumb manager', async ({
|
|
158
|
+
breadcrumbManager,
|
|
159
|
+
}) => {
|
|
160
|
+
test
|
|
161
|
+
.expect(await breadcrumbManager.countAllFacetsBreadcrumb())
|
|
162
|
+
.toBe(1);
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
});
|