@coveo/quantic 3.43.2 → 3.43.4
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/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/data.ts +130 -0
- package/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/fixture.ts +25 -14
- package/force-app/main/default/lwc/quanticBreadcrumbManager/e2e/quanticBreadcrumbManager.e2e.ts +57 -16
- package/force-app/main/default/lwc/quanticCardContainer/quanticCardContainer.css +3 -4
- package/force-app/main/default/lwc/quanticCardContainer/quanticCardContainer.html +1 -1
- package/force-app/main/default/lwc/quanticCarousel/quanticCarousel.css +5 -5
- package/force-app/main/default/lwc/quanticCaseClassification/quanticCaseClassification.css +3 -3
- package/force-app/main/default/lwc/quanticCategoryFacet/e2e/data.ts +70 -6
- package/force-app/main/default/lwc/quanticCategoryFacet/e2e/fixture.ts +17 -13
- package/force-app/main/default/lwc/quanticCategoryFacet/e2e/quanticCategoryFacet.e2e.ts +34 -14
- package/force-app/main/default/lwc/quanticCategoryFacet/quanticCategoryFacet.css +1 -1
- package/force-app/main/default/lwc/quanticCitation/quanticCitation.css +12 -11
- package/force-app/main/default/lwc/quanticDateFacet/e2e/data.ts +24 -4
- package/force-app/main/default/lwc/quanticDateFacet/e2e/fixture.ts +17 -13
- package/force-app/main/default/lwc/quanticDateFacet/e2e/quanticDateFacet.e2e.ts +26 -4
- package/force-app/main/default/lwc/quanticDidYouMean/e2e/fixture.ts +6 -2
- package/force-app/main/default/lwc/quanticDocumentSuggestion/quanticDocumentSuggestion.css +2 -2
- package/force-app/main/default/lwc/quanticFacet/e2e/data.ts +50 -9
- package/force-app/main/default/lwc/quanticFacet/e2e/fixture.ts +18 -13
- package/force-app/main/default/lwc/quanticFacet/e2e/quanticFacet.e2e.ts +43 -9
- package/force-app/main/default/lwc/quanticFacet/quanticFacet.css +1 -1
- package/force-app/main/default/lwc/quanticFacetManager/e2e/data.ts +59 -0
- package/force-app/main/default/lwc/quanticFacetManager/e2e/fixture.ts +26 -15
- package/force-app/main/default/lwc/quanticFacetManager/e2e/quanticFacetManager.e2e.ts +7 -7
- package/force-app/main/default/lwc/quanticFacetStyles/quanticFacetStyles.css +10 -10
- package/force-app/main/default/lwc/quanticFeedbackModalQna/templates/quanticFeedbackModalQna.css +1 -1
- package/force-app/main/default/lwc/quanticFoldedResultList/e2e/fixture.ts +6 -2
- package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/agentData.ts +32 -1
- package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/pageObject.ts +6 -0
- package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/quanticGeneratedAnswerAgent.e2e.ts +66 -1
- package/force-app/main/default/lwc/quanticGeneratedAnswer/quanticGeneratedAnswer.css +1 -1
- package/force-app/main/default/lwc/quanticGeneratedAnswer/templates/generatedAnswer.css +3 -3
- package/force-app/main/default/lwc/quanticGeneratedAnswer/templates/generatedAnswer.html +3 -3
- package/force-app/main/default/lwc/quanticGeneratedAnswerBody/__tests__/quanticGeneratedAnswerBody.test.js +39 -0
- package/force-app/main/default/lwc/quanticGeneratedAnswerBody/quanticGeneratedAnswerBody.js +4 -1
- package/force-app/main/default/lwc/quanticGeneratedAnswerContent/templates/generatedMarkdownContent.css +21 -21
- package/force-app/main/default/lwc/quanticGeneratedAnswerContent/templates/generatedTextContent.css +2 -2
- package/force-app/main/default/lwc/quanticGeneratedAnswerFollowUpInput/quanticGeneratedAnswerFollowUpInput.css +9 -9
- package/force-app/main/default/lwc/quanticGeneratedAnswerStreamOfThought/quanticGeneratedAnswerStreamOfThought.css +2 -2
- package/force-app/main/default/lwc/quanticGeneratedAnswerThread/quanticGeneratedAnswerThread.css +8 -8
- package/force-app/main/default/lwc/quanticInsightSummary/quanticInsightSummary.css +2 -1
- package/force-app/main/default/lwc/quanticModal/quanticModal.css +3 -3
- package/force-app/main/default/lwc/quanticNotifications/e2e/fixture.ts +6 -2
- package/force-app/main/default/lwc/quanticNotifications/quanticNotifications.css +2 -2
- package/force-app/main/default/lwc/quanticNumericFacet/e2e/data.ts +24 -4
- package/force-app/main/default/lwc/quanticNumericFacet/e2e/fixture.ts +17 -13
- package/force-app/main/default/lwc/quanticNumericFacet/e2e/quanticNumericFacet.e2e.ts +28 -6
- package/force-app/main/default/lwc/quanticPager/e2e/fixture.ts +3 -3
- package/force-app/main/default/lwc/quanticPager/e2e/quanticPager.e2e.ts +1 -1
- package/force-app/main/default/lwc/quanticPill/quanticPill.css +2 -2
- package/force-app/main/default/lwc/quanticPlaceholder/quanticPlaceholder.css +2 -6
- package/force-app/main/default/lwc/quanticPlaceholder/quanticPlaceholder.html +1 -1
- package/force-app/main/default/lwc/quanticRadioButtonsGroup/quanticRadioButtonsGroup.css +9 -9
- package/force-app/main/default/lwc/quanticRecentQueriesList/e2e/fixture.ts +1 -0
- package/force-app/main/default/lwc/quanticRecentQueriesList/quanticRecentQueriesList.css +3 -7
- package/force-app/main/default/lwc/quanticRecentQueriesList/quanticRecentQueriesList.html +1 -1
- package/force-app/main/default/lwc/quanticRecentResultsList/e2e/fixture.ts +1 -0
- package/force-app/main/default/lwc/quanticRecentResultsList/quanticRecentResultsList.css +2 -6
- package/force-app/main/default/lwc/quanticRecentResultsList/quanticRecentResultsList.html +1 -1
- package/force-app/main/default/lwc/quanticRecommendationList/e2e/fixture.ts +1 -0
- package/force-app/main/default/lwc/quanticRecommendationList/quanticRecommendationList.css +1 -1
- package/force-app/main/default/lwc/quanticRefineToggle/quanticRefineToggle.css +4 -4
- package/force-app/main/default/lwc/quanticResultActionStyles/quanticResultActionStyles.css +2 -2
- package/force-app/main/default/lwc/quanticResultCopyToClipboard/e2e/fixture.ts +5 -2
- package/force-app/main/default/lwc/quanticResultLink/quanticResultLink.css +1 -1
- package/force-app/main/default/lwc/quanticResultList/e2e/fixture.ts +6 -2
- package/force-app/main/default/lwc/quanticResultPrintableUri/quanticResultPrintableUri.css +1 -1
- package/force-app/main/default/lwc/quanticResultQuickview/e2e/fixture.ts +7 -3
- package/force-app/main/default/lwc/quanticResultQuickview/quanticResultQuickview.css +6 -6
- package/force-app/main/default/lwc/quanticResultTag/quanticResultTag.css +2 -0
- package/force-app/main/default/lwc/quanticResultTemplate/quanticResultTemplate.css +1 -1
- package/force-app/main/default/lwc/quanticResultsPerPage/e2e/fixture.ts +6 -2
- package/force-app/main/default/lwc/quanticSearchBox/e2e/fixture.ts +3 -1
- package/force-app/main/default/lwc/quanticSearchBoxInput/templates/defaultSearchBoxInput.css +1 -1
- package/force-app/main/default/lwc/quanticSearchBoxInput/templates/expandableSearchBoxInput.css +4 -12
- package/force-app/main/default/lwc/quanticSearchBoxInput/templates/expandableSearchBoxInput.html +2 -2
- package/force-app/main/default/lwc/quanticSearchBoxSuggestionsList/e2e/fixture.ts +3 -0
- package/force-app/main/default/lwc/quanticSmartSnippet/e2e/fixture.ts +6 -4
- package/force-app/main/default/lwc/quanticSmartSnippetSource/quanticSmartSnippetSource.css +1 -1
- package/force-app/main/default/lwc/quanticSmartSnippetSuggestions/e2e/fixture.ts +6 -4
- package/force-app/main/default/lwc/quanticSort/e2e/fixture.ts +3 -2
- package/force-app/main/default/lwc/quanticSort/quanticSort.css +3 -3
- package/force-app/main/default/lwc/quanticSourceCitations/quanticSourceCitations.css +1 -1
- package/force-app/main/default/lwc/quanticStandaloneSearchBox/e2e/fixture.ts +2 -1
- package/force-app/main/default/lwc/quanticStatefulButton/quanticStatefulButton.css +2 -2
- package/force-app/main/default/lwc/quanticTab/e2e/fixture.ts +6 -2
- package/force-app/main/default/lwc/quanticTabBar/e2e/fixture.ts +6 -2
- package/force-app/main/default/lwc/quanticTabBar/e2e/quanticTabBar.e2e.ts +3 -2
- package/force-app/main/default/lwc/quanticThreadItem/__tests__/quanticThreadItem.test.js +138 -0
- package/force-app/main/default/lwc/quanticThreadItem/quanticThreadItem.css +27 -6
- package/force-app/main/default/lwc/quanticThreadItem/quanticThreadItem.html +10 -2
- package/force-app/main/default/lwc/quanticThreadItem/quanticThreadItem.js +37 -1
- package/force-app/main/default/lwc/quanticTimeframeFacet/e2e/data.ts +66 -0
- package/force-app/main/default/lwc/quanticTimeframeFacet/e2e/fixture.ts +20 -4
- package/force-app/main/default/lwc/quanticTimeframeFacet/e2e/quanticTimeframeFacet.e2e.ts +24 -0
- package/force-app/main/default/lwc/quanticTimeframeFacet/quanticTimeframeFacet.css +1 -1
- package/force-app/main/default/lwc/quanticTooltip/quanticTooltip.css +3 -3
- package/force-app/main/default/lwc/quanticUserAction/quanticUserAction.css +7 -7
- package/force-app/main/default/lwc/quanticUserActionsSession/quanticUserActionsSession.css +3 -3
- package/force-app/main/default/lwc/quanticUserActionsTimeline/templates/userActionsTimeline.css +2 -2
- package/force-app/main/default/lwc/searchBoxStyle/searchBoxStyle.css +10 -10
- package/force-app/main/default/staticresources/coveobueno/browser/bueno.js +1 -3
- package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +17 -17
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/analytics/case-assist-analytics.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/analytics/insight-analytics.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/analytics/search-analytics.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/stream-answer-api.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/engine-configuration.d.ts +34 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/insight-engine/insight-engine.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/insight-thunk-extra-arguments.d.ts +2 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/search-thunk-extra-arguments.d.ts +2 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/app/thunk-extra-arguments.d.ts +9 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/case-assist.index.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/commerce.index.d.ts +6 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/breadcrumb-manager/headless-breadcrumb-manager.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/sort/headless-core-commerce-sort.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/core/url-manager/headless-core-url-manager.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/product-listing/headless-product-listing.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/recommendations/headless-recommendations.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/search/headless-search.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/context/headless-core-context.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/did-you-mean/headless-core-did-you-mean.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facet-manager/headless-core-facet-manager.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/category-facet/headless-core-category-facet.d.ts +0 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/facet/headless-core-facet.d.ts +0 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/range-facet/date-facet/headless-core-date-facet.d.ts +1 -5
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/range-facet/date-facet/headless-core-date-filter.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/range-facet/numeric-facet/headless-core-numeric-facet.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/facets/range-facet/numeric-facet/headless-core-numeric-filter.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/folded-result-list/headless-core-folded-result-list.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/generated-answer/headless-core-generated-answer.d.ts +1 -25
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/generated-answer/headless-searchapi-generated-answer.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/pager/headless-core-pager.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/query-error/headless-core-query-error.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/recent-queries-list/headless-core-recent-queries-list.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/result-list/headless-core-result-list.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/results-per-page/headless-core-results-per-page.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/sort/headless-core-sort.d.ts +0 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/status/headless-core-status.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/tab/headless-core-tab.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/triggers/headless-core-notify-trigger.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/triggers/headless-core-query-trigger.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/triggers/headless-core-redirection-trigger.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/dictionary-field-context/headless-dictionary-field-context.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/document-suggestion-list/case-assist-headless-interactive-result.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/facets/automatic-facet-generator/headless-automatic-facet-generator.d.ts +0 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/facets/category-facet/headless-category-facet.d.ts +2 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/facets/facet/headless-facet.d.ts +2 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/field-suggestions/category-facet/headless-category-field-suggestions.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/field-suggestions/facet/headless-field-suggestions.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/generated-answer/headless-interactive-citation.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/history-manager/headless-history-manager.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/insight/facet-conditions-manager/headless-facet-conditions-manager.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/insight/generated-answer/headless-insight-interactive-citation.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/insight/result-list/headless-insight-interactive-result.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/insight/results-per-page/headless-insight-results-per-page.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/instant-results/instant-results.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/knowledge/generated-answer/headless-answerapi-generated-answer.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/knowledge/generated-answer/headless-generated-answer-with-follow-ups.d.ts +2 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/pager/headless-pager.d.ts +2 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/query-summary/headless-query-summary.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/quickview/headless-quickview.d.ts +1 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/recent-results-list/headless-recent-results-list.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/recommendation/headless-recommendation.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/recommendation/result-list/headless-recommendation-interactive-result.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/relevance-inspector/headless-relevance-inspector.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/result-list/headless-interactive-result.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/result-list/headless-result-list.d.ts +2 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/results-per-page/headless-results-per-page.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/smart-snippet-questions-list/headless-smart-snippet-questions-list.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/sort/headless-sort.d.ts +2 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/standalone-search-box/headless-standalone-search-box.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/static-filter/headless-static-filter.d.ts +1 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/triggers/headless-execute-trigger.d.ts +0 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/url-manager/headless-url-manager.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/analytics/analytics-utils.d.ts +1 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/attached-results/attached-results-analytics-actions.d.ts +4 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/configuration/configuration-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/context/cart/cart-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/context/context-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/facets/category-facet/category-facet-actions-loader.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-analytics-client.d.ts +38 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-insight-analytics-actions.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/insight-search/insight-query-set-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/insight-search/insight-search-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/query-set/query-set-actions-loader.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/result/result-insight-analytics-actions.d.ts +1 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/index.d.ts +7 -7
- package/force-app/main/default/staticresources/coveoheadless/definitions/insight.index.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/recommendation.index.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/instant-products/headless-instant-products.ssr.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/controllers/standalone-search-box/headless-standalone-search-box.ssr.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce-next.index.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce.index.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/instant-products/headless-instant-products.ssr.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/controllers/standalone-search-box/headless-standalone-search-box.ssr.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/engine.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next.index.d.ts +6 -6
- package/force-app/main/default/staticresources/coveoheadless/definitions/ssr.index.d.ts +6 -6
- package/force-app/main/default/staticresources/coveoheadless/headless.js +17 -17
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +16 -16
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +16 -16
- package/package.json +4 -4
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
useCaseEnum,
|
|
4
4
|
useCaseTestCases,
|
|
5
5
|
} from '../../../../../../playwright/utils/useCase';
|
|
6
|
-
import
|
|
6
|
+
import {expandedFacetData, initialFacetData, selectedFacetData} from './data';
|
|
7
7
|
|
|
8
8
|
const fixtures = {
|
|
9
9
|
search: testSearch,
|
|
@@ -14,22 +14,34 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
14
14
|
let test = fixtures[useCase.value];
|
|
15
15
|
test.describe(`quantic category facet ${useCase.label}`, () => {
|
|
16
16
|
test.describe('when selecting a facet value and clicking the all categories button', () => {
|
|
17
|
+
const selectedIndex = 0;
|
|
18
|
+
const {facetId, field, values} = initialFacetData;
|
|
19
|
+
const selectedValue = values[selectedIndex].value;
|
|
20
|
+
|
|
21
|
+
test.use({
|
|
22
|
+
facetResponses: {
|
|
23
|
+
responses: [
|
|
24
|
+
[initialFacetData],
|
|
25
|
+
[selectedFacetData],
|
|
26
|
+
[initialFacetData],
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
17
31
|
test('should trigger a new search and log the corresponding UA analytics events', async ({
|
|
18
32
|
baseFacet,
|
|
19
33
|
facet,
|
|
20
34
|
page,
|
|
21
35
|
}) => {
|
|
22
|
-
const selectedIndex = 0;
|
|
23
|
-
const {facetId, field, values} = facetData;
|
|
24
36
|
const expectedFacetData = {
|
|
25
37
|
facetId,
|
|
26
38
|
facetField: field,
|
|
27
|
-
facetValue:
|
|
39
|
+
facetValue: selectedValue,
|
|
28
40
|
};
|
|
41
|
+
|
|
29
42
|
const facetSelectUaRequest =
|
|
30
43
|
baseFacet.waitForFacetSelectUaAnalytics(expectedFacetData);
|
|
31
44
|
const firstSearchResponsePromise = baseFacet.waitForSearchResponse();
|
|
32
|
-
|
|
33
45
|
await facet.clickOnFacetValue(selectedIndex);
|
|
34
46
|
|
|
35
47
|
await facetSelectUaRequest;
|
|
@@ -43,11 +55,11 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
43
55
|
);
|
|
44
56
|
const url = page.url();
|
|
45
57
|
expect(decodeURIComponent(url)).toContain(
|
|
46
|
-
`cf-${field}=${
|
|
58
|
+
`cf-${field}=${selectedValue}`
|
|
47
59
|
);
|
|
48
60
|
}
|
|
49
61
|
|
|
50
|
-
const
|
|
62
|
+
const facetClearAllUaRequest =
|
|
51
63
|
baseFacet.waitForFacetClearAllUaAnalytics({
|
|
52
64
|
facetId,
|
|
53
65
|
facetField: field,
|
|
@@ -56,7 +68,7 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
56
68
|
|
|
57
69
|
await facet.allCategoriesButton.click();
|
|
58
70
|
|
|
59
|
-
await
|
|
71
|
+
await facetClearAllUaRequest;
|
|
60
72
|
const secondSearchResponse = await secondSearchResponsePromise;
|
|
61
73
|
const {analytics: analyticsForFacetDeselect} =
|
|
62
74
|
baseFacet.extractDataFromResponse(secondSearchResponse);
|
|
@@ -66,6 +78,9 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
66
78
|
|
|
67
79
|
test.describe('when expanding and collapsing facet values using Show More/Less buttons', () => {
|
|
68
80
|
test.use({
|
|
81
|
+
facetResponses: {
|
|
82
|
+
responses: [[initialFacetData], [expandedFacetData]],
|
|
83
|
+
},
|
|
69
84
|
options: {
|
|
70
85
|
numberOfValues: 2,
|
|
71
86
|
},
|
|
@@ -75,7 +90,7 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
75
90
|
baseFacet,
|
|
76
91
|
facet,
|
|
77
92
|
}) => {
|
|
78
|
-
const {facetId, field} =
|
|
93
|
+
const {facetId, field} = initialFacetData;
|
|
79
94
|
const uaRequest = baseFacet.waitForShowMoreFacetResultsUaAnalytics({
|
|
80
95
|
facetId,
|
|
81
96
|
facetField: field,
|
|
@@ -116,9 +131,12 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
116
131
|
const facetValueIndex = 0;
|
|
117
132
|
|
|
118
133
|
test.use({
|
|
134
|
+
facetResponses: {
|
|
135
|
+
responses: [[initialFacetData], [selectedFacetData]],
|
|
136
|
+
},
|
|
119
137
|
options: {
|
|
120
138
|
caption: exampleCaption,
|
|
121
|
-
value:
|
|
139
|
+
value: initialFacetData.values[facetValueIndex].value,
|
|
122
140
|
},
|
|
123
141
|
});
|
|
124
142
|
test('should display the custom caption instead of the raw facet value', async ({
|
|
@@ -128,7 +146,7 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
128
146
|
expect(facet.facetValue.nth(facetValueIndex)).toHaveText(
|
|
129
147
|
new RegExp(exampleCaption)
|
|
130
148
|
);
|
|
131
|
-
const {facetId, field, values} =
|
|
149
|
+
const {facetId, field, values} = initialFacetData;
|
|
132
150
|
const expectedFacetData = {
|
|
133
151
|
facetId,
|
|
134
152
|
facetField: field,
|
|
@@ -165,7 +183,7 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
165
183
|
baseFacet,
|
|
166
184
|
facet,
|
|
167
185
|
}) => {
|
|
168
|
-
const {field: expectedField} =
|
|
186
|
+
const {field: expectedField} = initialFacetData;
|
|
169
187
|
const exampleQuery = 'test';
|
|
170
188
|
const facetSearchResponsePromise =
|
|
171
189
|
baseFacet.waitForFacetSearchResponse();
|
|
@@ -182,10 +200,12 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
182
200
|
|
|
183
201
|
test.describe('with a selected value in the URL', () => {
|
|
184
202
|
const selectedIndex = 0;
|
|
185
|
-
const {field, values} =
|
|
203
|
+
const {field, values} = initialFacetData;
|
|
186
204
|
test.use({
|
|
187
205
|
urlHash: `cf-${field}=${values[selectedIndex].value}`,
|
|
188
|
-
|
|
206
|
+
facetResponses: {
|
|
207
|
+
responses: [],
|
|
208
|
+
},
|
|
189
209
|
});
|
|
190
210
|
|
|
191
211
|
test('should select the correct facet value', async ({facet}) => {
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
.citation:hover {
|
|
2
2
|
cursor: pointer;
|
|
3
|
-
color: var(--lwc-brandAccessible, #0176d3);
|
|
3
|
+
color: var(--slds-g-color-accent-container-1, var(--lwc-brandAccessible, #0176d3));
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.citation__link {
|
|
7
7
|
max-width: 10.625rem;
|
|
8
|
-
height: 2rem;
|
|
8
|
+
height: var(--slds-g-sizing-9, 2rem);
|
|
9
|
+
border-radius: var(--slds-g-radius-border-2, 0.25rem);
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
.citation__link:hover {
|
|
12
|
-
background-color: var(--lwc-brandLight, #f4f6fe);
|
|
13
|
+
background-color: var(--slds-g-color-accent-light-1, var(--lwc-brandLight, #f4f6fe));
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
.citation__link:focus {
|
|
16
|
-
border: 1px solid var(--lwc-brandAccessible, #0070d2);
|
|
17
|
-
box-shadow: 0 0 3px 0 var(--lwc-brandAccessible, #0070d2);
|
|
17
|
+
border: var(--slds-g-sizing-border-1, 1px) solid var(--slds-g-color-accent-container-1, var(--lwc-brandAccessible, #0070d2));
|
|
18
|
+
box-shadow: 0 0 3px 0 var(--slds-g-color-accent-container-1, var(--lwc-brandAccessible, #0070d2));
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
.citation__link:hover .citation__title {
|
|
21
|
-
color: var(--lwc-brandAccessible, #0176d3);
|
|
22
|
+
color: var(--slds-g-color-accent-container-1, var(--lwc-brandAccessible, #0176d3));
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
.citation__title {
|
|
25
26
|
font-weight: var(--lwc-fontWeightRegular, 400);
|
|
26
|
-
color: var(--lwc-colorTextPlaceholder, #747474);
|
|
27
|
+
color: var(--slds-g-color-on-surface-1, var(--lwc-colorTextPlaceholder, #747474));
|
|
27
28
|
font-size: var(--slds-g-font-size-base, 13px);
|
|
28
29
|
}
|
|
29
30
|
|
|
@@ -35,18 +36,18 @@
|
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
.citation__tooltip {
|
|
38
|
-
color: rgb(26, 27, 30);
|
|
39
|
+
color: var(--slds-g-color-on-surface-3, rgb(26, 27, 30));
|
|
39
40
|
cursor: default;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
.citation__link--active {
|
|
43
|
-
border-color: var(--lwc-brandAccessible, #0176d3);
|
|
44
|
+
border-color: var(--slds-g-color-accent-container-1, var(--lwc-brandAccessible, #0176d3));
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
.citation__title--active {
|
|
47
|
-
color: var(--lwc-brandAccessible, #0176d3);
|
|
48
|
+
color: var(--slds-g-color-accent-container-1, var(--lwc-brandAccessible, #0176d3));
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
.citation__icon--active {
|
|
51
|
-
--slds-c-icon-color-foreground-default: var(--lwc-brandAccessible, #0176d3);
|
|
52
|
+
--slds-c-icon-color-foreground-default: var(--slds-g-color-accent-container-1, var(--lwc-brandAccessible, #0176d3));
|
|
52
53
|
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const facetId = 'Date';
|
|
2
|
+
const field = 'Date';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Facet response before any value is selected.
|
|
6
|
+
*/
|
|
7
|
+
export const initialFacetData = {
|
|
8
|
+
facetId,
|
|
9
|
+
field,
|
|
4
10
|
moreValuesAvailable: true,
|
|
5
11
|
values: [
|
|
6
12
|
{
|
|
@@ -21,4 +27,18 @@ const facetData = {
|
|
|
21
27
|
indexScore: 0.40500903971252294,
|
|
22
28
|
};
|
|
23
29
|
|
|
24
|
-
|
|
30
|
+
const [firstRange, secondRange] = initialFacetData.values;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Facet response after the first value is selected.
|
|
34
|
+
*/
|
|
35
|
+
export const selectedFacetData = {
|
|
36
|
+
...initialFacetData,
|
|
37
|
+
values: [
|
|
38
|
+
{
|
|
39
|
+
...firstRange,
|
|
40
|
+
state: 'selected',
|
|
41
|
+
},
|
|
42
|
+
secondRange,
|
|
43
|
+
],
|
|
44
|
+
};
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from '../../../../../../playwright/utils/requests';
|
|
8
8
|
import {BaseFacetObject} from '../../../../../../playwright/page-object/baseFacetObject';
|
|
9
9
|
import {facetBase} from '../../../../../../playwright/fixtures/baseFacetFixture';
|
|
10
|
-
import
|
|
10
|
+
import {initialFacetData} from './data';
|
|
11
11
|
|
|
12
12
|
const pageUrl = 's/quantic-date-facet';
|
|
13
13
|
|
|
@@ -21,18 +21,20 @@ type QuanticFacetE2EFixtures = {
|
|
|
21
21
|
|
|
22
22
|
export const testSearch = facetBase.extend<QuanticFacetE2EFixtures>({
|
|
23
23
|
options: {},
|
|
24
|
-
|
|
24
|
+
facetResponses: {responses: [[initialFacetData]]},
|
|
25
25
|
baseFacet: async ({page}, use) => {
|
|
26
26
|
await use(new BaseFacetObject(page, searchRequestRegex));
|
|
27
27
|
},
|
|
28
28
|
facet: async (
|
|
29
|
-
{page, options, configuration, baseFacet, urlHash,
|
|
29
|
+
{page, options, configuration, baseFacet, urlHash, facetResponses},
|
|
30
30
|
use
|
|
31
31
|
) => {
|
|
32
|
+
// search use case: interface auto-triggers a search on load, hence the mockSearchWithBaseResponse call below
|
|
33
|
+
await baseFacet.mockSearchWithBaseResponse();
|
|
32
34
|
await page.goto(`${pageUrl}#${urlHash ? urlHash : ''}`);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
await baseFacet.mockSearchWithFacetResponseSequence(
|
|
36
|
+
facetResponses?.responses
|
|
37
|
+
);
|
|
36
38
|
configuration.configure(options);
|
|
37
39
|
await baseFacet.waitForSearchResponse();
|
|
38
40
|
|
|
@@ -42,7 +44,7 @@ export const testSearch = facetBase.extend<QuanticFacetE2EFixtures>({
|
|
|
42
44
|
|
|
43
45
|
export const testInsight = facetBase.extend<QuanticFacetE2EFixtures>({
|
|
44
46
|
options: {},
|
|
45
|
-
|
|
47
|
+
facetResponses: {responses: [[initialFacetData]]},
|
|
46
48
|
baseFacet: async ({page}, use) => {
|
|
47
49
|
await use(new BaseFacetObject(page, insightSearchRequestRegex));
|
|
48
50
|
},
|
|
@@ -50,17 +52,19 @@ export const testInsight = facetBase.extend<QuanticFacetE2EFixtures>({
|
|
|
50
52
|
await use(new InsightSetupObject(page));
|
|
51
53
|
},
|
|
52
54
|
facet: async (
|
|
53
|
-
{page, options, baseFacet, configuration, insightSetup,
|
|
55
|
+
{page, options, baseFacet, configuration, insightSetup, facetResponses},
|
|
54
56
|
use
|
|
55
57
|
) => {
|
|
56
58
|
await page.goto(pageUrl);
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
await baseFacet.mockSearchWithFacetResponseSequence(
|
|
60
|
+
facetResponses?.responses
|
|
61
|
+
);
|
|
60
62
|
configuration.configure({...options, useCase: useCaseEnum.insight});
|
|
61
63
|
await insightSetup?.waitForInsightInterfaceInitialization();
|
|
62
|
-
await
|
|
63
|
-
|
|
64
|
+
await Promise.all([
|
|
65
|
+
baseFacet.waitForSearchResponse(),
|
|
66
|
+
baseFacet.performSearch(),
|
|
67
|
+
]);
|
|
64
68
|
await use(new DateFacetObject(page));
|
|
65
69
|
},
|
|
66
70
|
});
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
useCaseEnum,
|
|
4
4
|
useCaseTestCases,
|
|
5
5
|
} from '../../../../../../playwright/utils/useCase';
|
|
6
|
-
import
|
|
6
|
+
import {initialFacetData, selectedFacetData} from './data';
|
|
7
7
|
const fixtures = {
|
|
8
8
|
search: testSearch,
|
|
9
9
|
insight: testInsight,
|
|
@@ -24,13 +24,23 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
24
24
|
let test = fixtures[useCase.value];
|
|
25
25
|
test.describe(`quantic date facet ${useCase.label}`, () => {
|
|
26
26
|
test.describe('when selecting and deselecting a facet value', () => {
|
|
27
|
+
test.use({
|
|
28
|
+
facetResponses: {
|
|
29
|
+
responses: [
|
|
30
|
+
[initialFacetData],
|
|
31
|
+
[selectedFacetData],
|
|
32
|
+
[initialFacetData],
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
|
|
27
37
|
test('should trigger a new search and log the corresponding UA analytics events', async ({
|
|
28
38
|
baseFacet,
|
|
29
39
|
facet,
|
|
30
40
|
page,
|
|
31
41
|
}) => {
|
|
32
42
|
const selectedIndex = 0;
|
|
33
|
-
const {facetId, field, values} =
|
|
43
|
+
const {facetId, field, values} = initialFacetData;
|
|
34
44
|
const expectedFacetData = {
|
|
35
45
|
facetId,
|
|
36
46
|
facetField: field,
|
|
@@ -81,12 +91,22 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
81
91
|
});
|
|
82
92
|
|
|
83
93
|
test.describe('when selecting a facet value and clicking the clear filter button', () => {
|
|
94
|
+
test.use({
|
|
95
|
+
facetResponses: {
|
|
96
|
+
responses: [
|
|
97
|
+
[initialFacetData],
|
|
98
|
+
[selectedFacetData],
|
|
99
|
+
[initialFacetData],
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
|
|
84
104
|
test('should trigger a new search and log the corresponding UA analytics events', async ({
|
|
85
105
|
baseFacet,
|
|
86
106
|
facet,
|
|
87
107
|
}) => {
|
|
88
108
|
const selectedIndex = 0;
|
|
89
|
-
const {facetId, field, values} =
|
|
109
|
+
const {facetId, field, values} = initialFacetData;
|
|
90
110
|
const expectedFacetData = {
|
|
91
111
|
facetId,
|
|
92
112
|
facetField: field,
|
|
@@ -131,7 +151,9 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
131
151
|
|
|
132
152
|
test.use({
|
|
133
153
|
urlHash: `df-${exampleField}=${yesterdayDate.replaceAll('-', '/')}@00:00:00..${todayDate.replaceAll('-', '/')}@23:59:59`,
|
|
134
|
-
|
|
154
|
+
facetResponses: {
|
|
155
|
+
responses: [],
|
|
156
|
+
},
|
|
135
157
|
});
|
|
136
158
|
|
|
137
159
|
test('should select the correct facet value', async ({facet}) => {
|
|
@@ -44,6 +44,7 @@ export const testSearch =
|
|
|
44
44
|
);
|
|
45
45
|
},
|
|
46
46
|
didYouMean: async ({page, options, configuration, search}, use) => {
|
|
47
|
+
await search.mockSearchWithBaseResponse();
|
|
47
48
|
await page.goto(pageUrl);
|
|
48
49
|
configuration.configure(options);
|
|
49
50
|
await search.waitForSearchResponse();
|
|
@@ -68,11 +69,14 @@ export const testInsight =
|
|
|
68
69
|
{page, options, search, configuration, insightSetup},
|
|
69
70
|
use
|
|
70
71
|
) => {
|
|
72
|
+
await search.mockSearchWithBaseResponse();
|
|
71
73
|
await page.goto(pageUrl);
|
|
72
74
|
configuration.configure({...options, useCase: useCaseEnum.insight});
|
|
73
75
|
await insightSetup.waitForInsightInterfaceInitialization();
|
|
74
|
-
await
|
|
75
|
-
|
|
76
|
+
await Promise.all([
|
|
77
|
+
search.waitForSearchResponse(),
|
|
78
|
+
search.performSearch(),
|
|
79
|
+
]);
|
|
76
80
|
await use(new DidYouMeanObject(page));
|
|
77
81
|
},
|
|
78
82
|
});
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.card-border {
|
|
10
|
-
border: 1px solid #dddbda;
|
|
10
|
+
border: var(--slds-g-sizing-border-1, 1px) solid var(--slds-g-color-border-1, #dddbda);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.no-suggestion-message {
|
|
14
|
-
background-color: #f6f7f9;
|
|
14
|
+
background-color: var(--slds-g-color-surface-2, #f6f7f9);
|
|
15
15
|
}
|
|
@@ -1,21 +1,62 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const facetId = 'objecttype';
|
|
2
|
+
const field = 'objecttype';
|
|
3
|
+
const label = 'Object type';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Facet response before any value is selected.
|
|
7
|
+
*/
|
|
8
|
+
export const initialFacetData = {
|
|
9
|
+
facetId,
|
|
10
|
+
field,
|
|
4
11
|
moreValuesAvailable: true,
|
|
5
12
|
values: [
|
|
6
13
|
{
|
|
7
|
-
value: '
|
|
14
|
+
value: 'People',
|
|
8
15
|
state: 'idle',
|
|
9
|
-
numberOfResults:
|
|
16
|
+
numberOfResults: 126959,
|
|
10
17
|
},
|
|
11
18
|
{
|
|
12
|
-
value: '
|
|
19
|
+
value: 'Contact',
|
|
13
20
|
state: 'idle',
|
|
14
|
-
numberOfResults:
|
|
21
|
+
numberOfResults: 179426,
|
|
15
22
|
},
|
|
16
23
|
],
|
|
17
24
|
indexScore: 0.40500903971252294,
|
|
18
|
-
label
|
|
25
|
+
label,
|
|
19
26
|
};
|
|
20
27
|
|
|
21
|
-
|
|
28
|
+
const [people, contact] = initialFacetData.values;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Facet response after clicking "Show more".
|
|
32
|
+
*/
|
|
33
|
+
export const expandedFacetData = {
|
|
34
|
+
...initialFacetData,
|
|
35
|
+
values: [
|
|
36
|
+
...initialFacetData.values,
|
|
37
|
+
{
|
|
38
|
+
value: 'Variant',
|
|
39
|
+
state: 'idle',
|
|
40
|
+
numberOfResults: 30827,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
value: 'Message',
|
|
44
|
+
state: 'idle',
|
|
45
|
+
numberOfResults: 26879,
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Facet response after the first value is selected.
|
|
52
|
+
*/
|
|
53
|
+
export const selectedFacetData = {
|
|
54
|
+
...initialFacetData,
|
|
55
|
+
values: [
|
|
56
|
+
{
|
|
57
|
+
...people,
|
|
58
|
+
state: 'selected',
|
|
59
|
+
},
|
|
60
|
+
contact,
|
|
61
|
+
],
|
|
62
|
+
};
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
insightSearchRequestRegex,
|
|
7
7
|
} from '../../../../../../playwright/utils/requests';
|
|
8
8
|
import {BaseFacetObject} from '../../../../../../playwright/page-object/baseFacetObject';
|
|
9
|
-
import
|
|
9
|
+
import {initialFacetData} from './data';
|
|
10
10
|
import {facetBase} from '../../../../../../playwright/fixtures/baseFacetFixture';
|
|
11
11
|
|
|
12
12
|
const pageUrl = 's/quantic-facet';
|
|
@@ -14,6 +14,7 @@ const pageUrl = 's/quantic-facet';
|
|
|
14
14
|
interface FacetOptions {
|
|
15
15
|
value?: string;
|
|
16
16
|
caption?: string;
|
|
17
|
+
numberOfValues?: number;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
type QuanticFacetE2EFixtures = {
|
|
@@ -24,20 +25,22 @@ type QuanticFacetE2EFixtures = {
|
|
|
24
25
|
|
|
25
26
|
export const testSearch = facetBase.extend<QuanticFacetE2EFixtures>({
|
|
26
27
|
options: {},
|
|
27
|
-
|
|
28
|
+
facetResponses: {responses: [[initialFacetData]]},
|
|
28
29
|
baseFacet: async ({page}, use) => {
|
|
29
30
|
await use(new BaseFacetObject(page, searchRequestRegex));
|
|
30
31
|
},
|
|
31
32
|
facet: async (
|
|
32
|
-
{page, options, configuration, baseFacet, urlHash,
|
|
33
|
+
{page, options, configuration, baseFacet, urlHash, facetResponses},
|
|
33
34
|
use
|
|
34
35
|
) => {
|
|
36
|
+
// search use case: interface auto-triggers a search on load, hence the mockSearchWithBaseResponse call below
|
|
37
|
+
await baseFacet.mockSearchWithBaseResponse();
|
|
35
38
|
await page.goto(
|
|
36
39
|
`${pageUrl}${options.caption ? '-with-captions' : ''}#${urlHash ? urlHash : ''}`
|
|
37
40
|
);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
await baseFacet.mockSearchWithFacetResponseSequence(
|
|
42
|
+
facetResponses?.responses
|
|
43
|
+
);
|
|
41
44
|
configuration.configure(options);
|
|
42
45
|
await baseFacet.waitForSearchResponse();
|
|
43
46
|
|
|
@@ -47,7 +50,7 @@ export const testSearch = facetBase.extend<QuanticFacetE2EFixtures>({
|
|
|
47
50
|
|
|
48
51
|
export const testInsight = facetBase.extend<QuanticFacetE2EFixtures>({
|
|
49
52
|
options: {},
|
|
50
|
-
|
|
53
|
+
facetResponses: {responses: [[initialFacetData]]},
|
|
51
54
|
baseFacet: async ({page}, use) => {
|
|
52
55
|
await use(new BaseFacetObject(page, insightSearchRequestRegex));
|
|
53
56
|
},
|
|
@@ -55,17 +58,19 @@ export const testInsight = facetBase.extend<QuanticFacetE2EFixtures>({
|
|
|
55
58
|
await use(new InsightSetupObject(page));
|
|
56
59
|
},
|
|
57
60
|
facet: async (
|
|
58
|
-
{page, options, baseFacet, configuration, insightSetup,
|
|
61
|
+
{page, options, baseFacet, configuration, insightSetup, facetResponses},
|
|
59
62
|
use
|
|
60
63
|
) => {
|
|
61
64
|
await page.goto(`${pageUrl}${options.caption ? '-with-captions' : ''}`);
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
await baseFacet.mockSearchWithFacetResponseSequence(
|
|
66
|
+
facetResponses?.responses
|
|
67
|
+
);
|
|
65
68
|
configuration.configure({...options, useCase: useCaseEnum.insight});
|
|
66
69
|
await insightSetup?.waitForInsightInterfaceInitialization();
|
|
67
|
-
await
|
|
68
|
-
|
|
70
|
+
await Promise.all([
|
|
71
|
+
baseFacet.waitForSearchResponse(),
|
|
72
|
+
baseFacet.performSearch(),
|
|
73
|
+
]);
|
|
69
74
|
await use(new FacetObject(page));
|
|
70
75
|
},
|
|
71
76
|
});
|