@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 {initialFacetData, expandedFacetData, selectedFacetData} from './data';
|
|
7
7
|
|
|
8
8
|
const fixtures = {
|
|
9
9
|
search: testSearch,
|
|
@@ -14,12 +14,22 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
14
14
|
let test = fixtures[useCase.value];
|
|
15
15
|
test.describe(`quantic facet ${useCase.label}`, () => {
|
|
16
16
|
test.describe('when selecting and deselecting a facet value', () => {
|
|
17
|
+
test.use({
|
|
18
|
+
facetResponses: {
|
|
19
|
+
responses: [
|
|
20
|
+
[initialFacetData],
|
|
21
|
+
[selectedFacetData],
|
|
22
|
+
[initialFacetData],
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
|
|
17
27
|
test('should trigger a new search and log the corresponding UA analytics events', async ({
|
|
18
28
|
baseFacet,
|
|
19
29
|
facet,
|
|
20
30
|
}) => {
|
|
21
31
|
const selectedIndex = 0;
|
|
22
|
-
const {facetId, field, values} =
|
|
32
|
+
const {facetId, field, values} = initialFacetData;
|
|
23
33
|
const facetSelectUaRequest = baseFacet.waitForFacetSelectUaAnalytics({
|
|
24
34
|
facetId,
|
|
25
35
|
facetField: field,
|
|
@@ -54,12 +64,22 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
54
64
|
});
|
|
55
65
|
|
|
56
66
|
test.describe('when selecting a facet value and clicking the clear filter button', () => {
|
|
67
|
+
test.use({
|
|
68
|
+
facetResponses: {
|
|
69
|
+
responses: [
|
|
70
|
+
[initialFacetData],
|
|
71
|
+
[selectedFacetData],
|
|
72
|
+
[initialFacetData],
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
|
|
57
77
|
test('should trigger a new search and log the corresponding UA analytics events', async ({
|
|
58
78
|
baseFacet,
|
|
59
79
|
facet,
|
|
60
80
|
}) => {
|
|
61
81
|
const selectedIndex = 0;
|
|
62
|
-
const {facetId, field, values} =
|
|
82
|
+
const {facetId, field, values} = initialFacetData;
|
|
63
83
|
const facetSelectUaRequest = baseFacet.waitForFacetSelectUaAnalytics({
|
|
64
84
|
facetId,
|
|
65
85
|
facetField: field,
|
|
@@ -92,11 +112,20 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
92
112
|
});
|
|
93
113
|
|
|
94
114
|
test.describe('when expanding and collapsing facet values using Show More/Less buttons', () => {
|
|
115
|
+
test.use({
|
|
116
|
+
facetResponses: {
|
|
117
|
+
responses: [[initialFacetData], [expandedFacetData], [initialFacetData]],
|
|
118
|
+
},
|
|
119
|
+
options: {
|
|
120
|
+
numberOfValues: 2,
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
|
|
95
124
|
test('should fetch additional facet values and send correct UA analytics', async ({
|
|
96
125
|
baseFacet,
|
|
97
126
|
facet,
|
|
98
127
|
}) => {
|
|
99
|
-
const {facetId, field} =
|
|
128
|
+
const {facetId, field} = initialFacetData;
|
|
100
129
|
const uaRequest = baseFacet.waitForShowMoreFacetResultsUaAnalytics({
|
|
101
130
|
facetId,
|
|
102
131
|
facetField: field,
|
|
@@ -137,9 +166,12 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
137
166
|
const facetValueIndex = 0;
|
|
138
167
|
|
|
139
168
|
test.use({
|
|
169
|
+
facetResponses: {
|
|
170
|
+
responses: [[initialFacetData], [selectedFacetData]],
|
|
171
|
+
},
|
|
140
172
|
options: {
|
|
141
173
|
caption: exampleCaption,
|
|
142
|
-
value:
|
|
174
|
+
value: initialFacetData.values[facetValueIndex].value,
|
|
143
175
|
},
|
|
144
176
|
});
|
|
145
177
|
test('should display the custom caption instead of the raw facet value', async ({
|
|
@@ -149,7 +181,7 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
149
181
|
expect(facet.facetValue.nth(facetValueIndex)).toHaveText(
|
|
150
182
|
new RegExp(exampleCaption)
|
|
151
183
|
);
|
|
152
|
-
const {facetId, field, values} =
|
|
184
|
+
const {facetId, field, values} = initialFacetData;
|
|
153
185
|
const uaRequest = baseFacet.waitForFacetSelectUaAnalytics({
|
|
154
186
|
facetId,
|
|
155
187
|
facetField: field,
|
|
@@ -173,7 +205,7 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
173
205
|
baseFacet,
|
|
174
206
|
facet,
|
|
175
207
|
}) => {
|
|
176
|
-
const {field: expectedField} =
|
|
208
|
+
const {field: expectedField} = initialFacetData;
|
|
177
209
|
const exampleQuery = 'test';
|
|
178
210
|
const facetSearchResponsePromise =
|
|
179
211
|
baseFacet.waitForFacetSearchResponse();
|
|
@@ -190,10 +222,12 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
190
222
|
|
|
191
223
|
test.describe('with a selected value in the URL', () => {
|
|
192
224
|
const selectedIndex = 0;
|
|
193
|
-
const {field, values} =
|
|
225
|
+
const {field, values} = initialFacetData;
|
|
194
226
|
test.use({
|
|
195
227
|
urlHash: `f-${field}=${values[selectedIndex].value}`,
|
|
196
|
-
|
|
228
|
+
facetResponses: {
|
|
229
|
+
responses: [],
|
|
230
|
+
},
|
|
197
231
|
});
|
|
198
232
|
|
|
199
233
|
test('should select the correct facet value', async ({facet}) => {
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Facet response builder for the facet manager example page
|
|
3
|
+
* (`exampleQuanticFacetManager.html`), which registers three facets:
|
|
4
|
+
* a `language` facet, a `date` timeframe facet, and an `objecttype` facet.
|
|
5
|
+
*/
|
|
6
|
+
const facetManagerData = [
|
|
7
|
+
{
|
|
8
|
+
facetId: 'language',
|
|
9
|
+
field: 'language',
|
|
10
|
+
moreValuesAvailable: false,
|
|
11
|
+
values: [{value: 'English', state: 'idle', numberOfResults: 100}],
|
|
12
|
+
indexScore: 0.3,
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
facetId: 'date',
|
|
16
|
+
field: 'date',
|
|
17
|
+
moreValuesAvailable: false,
|
|
18
|
+
values: [
|
|
19
|
+
{
|
|
20
|
+
start: 'past-1-week',
|
|
21
|
+
end: 'now',
|
|
22
|
+
endInclusive: false,
|
|
23
|
+
state: 'idle',
|
|
24
|
+
numberOfResults: 10,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
start: 'past-1-month',
|
|
28
|
+
end: 'now',
|
|
29
|
+
endInclusive: false,
|
|
30
|
+
state: 'idle',
|
|
31
|
+
numberOfResults: 20,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
start: 'past-6-month',
|
|
35
|
+
end: 'now',
|
|
36
|
+
endInclusive: false,
|
|
37
|
+
state: 'idle',
|
|
38
|
+
numberOfResults: 30,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
start: 'past-1-year',
|
|
42
|
+
end: 'now',
|
|
43
|
+
endInclusive: false,
|
|
44
|
+
state: 'idle',
|
|
45
|
+
numberOfResults: 40,
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
indexScore: 0.2,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
facetId: 'objecttype',
|
|
52
|
+
field: 'objecttype',
|
|
53
|
+
moreValuesAvailable: false,
|
|
54
|
+
values: [{value: 'People', state: 'idle', numberOfResults: 50}],
|
|
55
|
+
indexScore: 0.1,
|
|
56
|
+
},
|
|
57
|
+
];
|
|
58
|
+
|
|
59
|
+
export default facetManagerData;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import {FacetManagerObject} from './pageObject';
|
|
2
|
-
import {
|
|
2
|
+
import {facetBase} from '../../../../../../playwright/fixtures/baseFacetFixture';
|
|
3
3
|
import {
|
|
4
4
|
searchRequestRegex,
|
|
5
5
|
insightSearchRequestRegex,
|
|
6
6
|
} from '../../../../../../playwright/utils/requests';
|
|
7
7
|
import {InsightSetupObject} from '../../../../../../playwright/page-object/insightSetupObject';
|
|
8
8
|
import {useCaseEnum} from '../../../../../../playwright/utils/useCase';
|
|
9
|
-
import {
|
|
9
|
+
import {BaseFacetObject} from '../../../../../../playwright/page-object/baseFacetObject';
|
|
10
|
+
import facetManagerData from './data';
|
|
10
11
|
|
|
11
12
|
const pageUrl = 's/quantic-facet-manager';
|
|
12
13
|
|
|
@@ -14,7 +15,6 @@ interface FacetManagerOptions {}
|
|
|
14
15
|
|
|
15
16
|
type QuanticFacetManagerE2ESearchFixtures = {
|
|
16
17
|
facetManager: FacetManagerObject;
|
|
17
|
-
search: SearchObject;
|
|
18
18
|
options: Partial<FacetManagerOptions>;
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -24,41 +24,52 @@ type QuanticFacetManagerE2EInsightFixtures =
|
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
export const testSearch =
|
|
27
|
-
|
|
27
|
+
facetBase.extend<QuanticFacetManagerE2ESearchFixtures>({
|
|
28
28
|
options: {},
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
facetResponses: {responses: [facetManagerData]},
|
|
30
|
+
baseFacet: async ({page}, use) => {
|
|
31
|
+
await use(new BaseFacetObject(page, searchRequestRegex));
|
|
31
32
|
},
|
|
32
|
-
facetManager: async (
|
|
33
|
+
facetManager: async (
|
|
34
|
+
{page, options, configuration, baseFacet, facetResponses},
|
|
35
|
+
use
|
|
36
|
+
) => {
|
|
37
|
+
await baseFacet.mockSearchWithFacetResponseSequence(
|
|
38
|
+
facetResponses?.responses
|
|
39
|
+
);
|
|
33
40
|
await page.goto(pageUrl);
|
|
34
41
|
configuration.configure(options);
|
|
35
|
-
await
|
|
42
|
+
await baseFacet.waitForSearchResponse();
|
|
36
43
|
|
|
37
44
|
await use(new FacetManagerObject(page));
|
|
38
45
|
},
|
|
39
46
|
});
|
|
40
47
|
|
|
41
48
|
export const testInsight =
|
|
42
|
-
|
|
49
|
+
facetBase.extend<QuanticFacetManagerE2EInsightFixtures>({
|
|
43
50
|
options: {},
|
|
44
|
-
|
|
45
|
-
|
|
51
|
+
facetResponses: {responses: [facetManagerData]},
|
|
52
|
+
baseFacet: async ({page}, use) => {
|
|
53
|
+
await use(new BaseFacetObject(page, insightSearchRequestRegex));
|
|
46
54
|
},
|
|
47
55
|
insightSetup: async ({page}, use) => {
|
|
48
56
|
await use(new InsightSetupObject(page));
|
|
49
57
|
},
|
|
50
58
|
facetManager: async (
|
|
51
|
-
{page, options,
|
|
59
|
+
{page, options, baseFacet, configuration, insightSetup, facetResponses},
|
|
52
60
|
use
|
|
53
61
|
) => {
|
|
62
|
+
await baseFacet.mockSearchWithFacetResponseSequence(
|
|
63
|
+
facetResponses?.responses
|
|
64
|
+
);
|
|
54
65
|
await page.goto(pageUrl);
|
|
55
66
|
configuration.configure({...options, useCase: useCaseEnum.insight});
|
|
56
67
|
await insightSetup.waitForInsightInterfaceInitialization();
|
|
57
|
-
const searchResponsePromise =
|
|
58
|
-
await
|
|
68
|
+
const searchResponsePromise = baseFacet.waitForSearchResponse();
|
|
69
|
+
await baseFacet.performSearch();
|
|
59
70
|
await searchResponsePromise;
|
|
60
71
|
await use(new FacetManagerObject(page));
|
|
61
72
|
},
|
|
62
73
|
});
|
|
63
74
|
|
|
64
|
-
export {expect} from '@playwright/test';
|
|
75
|
+
export {expect} from '@playwright/test';
|
|
@@ -23,10 +23,10 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
23
23
|
test.describe(`quantic facet manager ${useCase.label}`, () => {
|
|
24
24
|
test('should load facets in the same order as in the initial search response', async ({
|
|
25
25
|
facetManager,
|
|
26
|
-
|
|
26
|
+
baseFacet,
|
|
27
27
|
}) => {
|
|
28
|
-
const searchResponsePromise =
|
|
29
|
-
await
|
|
28
|
+
const searchResponsePromise = baseFacet.waitForSearchResponse();
|
|
29
|
+
await baseFacet.performSearch();
|
|
30
30
|
|
|
31
31
|
const searchResponse = await searchResponsePromise;
|
|
32
32
|
const {facets} = await searchResponse.json();
|
|
@@ -45,11 +45,11 @@ useCaseTestCases.forEach((useCase) => {
|
|
|
45
45
|
test.describe('when the facets are reordered', () => {
|
|
46
46
|
test('should load facets in the reordered order', async ({
|
|
47
47
|
facetManager,
|
|
48
|
-
|
|
48
|
+
baseFacet,
|
|
49
49
|
}) => {
|
|
50
|
-
await
|
|
51
|
-
const searchResponsePromise =
|
|
52
|
-
await
|
|
50
|
+
await baseFacet.mockSearchFacetOrder(exampleFacetsOrder);
|
|
51
|
+
const searchResponsePromise = baseFacet.waitForSearchResponse();
|
|
52
|
+
await baseFacet.performSearch();
|
|
53
53
|
|
|
54
54
|
const searchResponse = await searchResponsePromise;
|
|
55
55
|
const {facets} = await searchResponse.json();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
.facet__search-results_no-match {
|
|
2
|
-
color: var(--lwc-colorTextLabel, #696969);
|
|
2
|
+
color: var(--slds-g-color-on-surface-1, var(--lwc-colorTextLabel, #696969));
|
|
3
3
|
background-color: var(--slds-g-color-surface-2, #F6F7F9);
|
|
4
4
|
font-size: var(--slds-g-font-scale-neg-1, 12px);
|
|
5
|
-
border-radius: 4px;
|
|
5
|
+
border-radius: var(--slds-g-radius-border-2, 4px);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
fieldset {
|
|
@@ -11,16 +11,16 @@ fieldset {
|
|
|
11
11
|
|
|
12
12
|
.facet__show-less {
|
|
13
13
|
font-size: var(--slds-g-font-scale-neg-1, 12px);
|
|
14
|
-
background-color: white;
|
|
15
|
-
color: var(--lwc-colorTextPlaceholder, var(--lwc-colorTextIconDefault, #747474));
|
|
14
|
+
background-color: var(--slds-g-color-surface-1, white);
|
|
15
|
+
color: var(--slds-g-color-on-surface-1, var(--lwc-colorTextPlaceholder, var(--lwc-colorTextIconDefault, #747474)));
|
|
16
16
|
border: none;
|
|
17
17
|
margin-bottom: 5px;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.facet__show-more {
|
|
21
21
|
font-size: var(--slds-g-font-scale-neg-1, 12px);
|
|
22
|
-
background-color: white;
|
|
23
|
-
color: var(--lwc-brandTextLink, dodgerblue);
|
|
22
|
+
background-color: var(--slds-g-color-surface-1, white);
|
|
23
|
+
color: var(--slds-s-link-color, var(--lwc-brandTextLink, dodgerblue));
|
|
24
24
|
border: none;
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -39,12 +39,12 @@ fieldset {
|
|
|
39
39
|
display: flex;
|
|
40
40
|
flex-direction: row;
|
|
41
41
|
cursor: pointer;
|
|
42
|
-
border-radius: .25rem;
|
|
42
|
+
border-radius: var(--slds-g-radius-border-2, .25rem);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.facet__value-option:hover {
|
|
46
|
-
color: var(--lwc-brandTextLink, dodgerblue);
|
|
47
|
-
background-color: #f6f7f9;
|
|
46
|
+
color: var(--slds-s-link-color, var(--lwc-brandTextLink, dodgerblue));
|
|
47
|
+
background-color: var(--slds-g-color-surface-2, #f6f7f9);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.facet__clear-filter {
|
|
@@ -52,5 +52,5 @@ fieldset {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
.facet__number-of-results {
|
|
55
|
-
color: var(--lwc-colorTextPlaceholder, var(--lwc-colorTextIconDefault, #747474));
|
|
55
|
+
color: var(--slds-g-color-on-surface-1, var(--lwc-colorTextPlaceholder, var(--lwc-colorTextIconDefault, #747474)));
|
|
56
56
|
}
|
|
@@ -36,6 +36,7 @@ export const testSearch =
|
|
|
36
36
|
await use(new SearchObject(page, searchRequestRegex));
|
|
37
37
|
},
|
|
38
38
|
resultList: async ({page, options, configuration, search}, use) => {
|
|
39
|
+
await search.mockSearchWithBaseResponse();
|
|
39
40
|
await page.goto(pageUrl);
|
|
40
41
|
configuration.configure(options);
|
|
41
42
|
await search.waitForSearchResponse();
|
|
@@ -57,11 +58,14 @@ export const testInsight =
|
|
|
57
58
|
{page, options, search, configuration, insightSetup},
|
|
58
59
|
use
|
|
59
60
|
) => {
|
|
61
|
+
await search.mockSearchWithBaseResponse();
|
|
60
62
|
await page.goto(pageUrl);
|
|
61
63
|
configuration.configure({...options, useCase: useCaseEnum.insight});
|
|
62
64
|
await insightSetup.waitForInsightInterfaceInitialization();
|
|
63
|
-
await
|
|
64
|
-
|
|
65
|
+
await Promise.all([
|
|
66
|
+
search.waitForSearchResponse(),
|
|
67
|
+
search.performSearch(),
|
|
68
|
+
]);
|
|
65
69
|
await search.waitForSearchResultsVisible();
|
|
66
70
|
await use(new FoldedResultListObject(page));
|
|
67
71
|
},
|
|
@@ -66,6 +66,13 @@ type AgentCitationType = {
|
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
+
type AgentRunErrorType = {
|
|
70
|
+
type: 'RUN_ERROR';
|
|
71
|
+
timestamp: number;
|
|
72
|
+
message: string;
|
|
73
|
+
code: string;
|
|
74
|
+
};
|
|
75
|
+
|
|
69
76
|
const STREAM_ID = 'conv_1';
|
|
70
77
|
const ANSWER_ID_1 = 'conv_1_0001';
|
|
71
78
|
const ANSWER_ID_2 = 'conv_1_0002';
|
|
@@ -168,6 +175,16 @@ const runFinishedStream = (answerId: string): AgentRunType => ({
|
|
|
168
175
|
},
|
|
169
176
|
});
|
|
170
177
|
|
|
178
|
+
const runErrorStream = (
|
|
179
|
+
message: string,
|
|
180
|
+
code: string
|
|
181
|
+
): AgentRunErrorType => ({
|
|
182
|
+
type: 'RUN_ERROR',
|
|
183
|
+
timestamp: new Date().valueOf(),
|
|
184
|
+
message,
|
|
185
|
+
code,
|
|
186
|
+
});
|
|
187
|
+
|
|
171
188
|
export type AgentMessage =
|
|
172
189
|
| AgentRunType
|
|
173
190
|
| AgentCustomType
|
|
@@ -175,7 +192,21 @@ export type AgentMessage =
|
|
|
175
192
|
| AgentToolCallType
|
|
176
193
|
| AgentToolCallArgsType
|
|
177
194
|
| AgentTextMessageType
|
|
178
|
-
| AgentCitationType
|
|
195
|
+
| AgentCitationType
|
|
196
|
+
| AgentRunErrorType;
|
|
197
|
+
|
|
198
|
+
export const turnLimitErrorStream: Array<AgentMessage> = [
|
|
199
|
+
runStartStream(ANSWER_ID_2),
|
|
200
|
+
runErrorStream(
|
|
201
|
+
'The conversation turn limit has been reached.',
|
|
202
|
+
'KNOWLEDGE:SSE_TURN_LIMIT_REACHED'
|
|
203
|
+
),
|
|
204
|
+
];
|
|
205
|
+
|
|
206
|
+
export const genericErrorStream: Array<AgentMessage> = [
|
|
207
|
+
runStartStream(ANSWER_ID_2),
|
|
208
|
+
runErrorStream('An unexpected error occurred.', 'KNOWLEDGE:SSE_INTERNAL_ERROR'),
|
|
209
|
+
];
|
|
179
210
|
|
|
180
211
|
export type AgentData = {
|
|
181
212
|
answerStreams: Array<AgentMessage>;
|
|
@@ -549,6 +549,12 @@ export class GeneratedAnswerObject {
|
|
|
549
549
|
});
|
|
550
550
|
}
|
|
551
551
|
|
|
552
|
+
async mockAgentFollowUpNetworkError() {
|
|
553
|
+
await this.page.route('**/agents/*/follow-up', (route) => {
|
|
554
|
+
route.abort('connectionrefused');
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
|
|
552
558
|
get followUpInput(): Locator {
|
|
553
559
|
return this.page.locator(
|
|
554
560
|
'c-quantic-generated-answer-follow-up-input textarea'
|
package/force-app/main/default/lwc/quanticGeneratedAnswer/e2e/quanticGeneratedAnswerAgent.e2e.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {testAgent, expect} from './fixture-agent';
|
|
2
|
-
import agentData from './agentData';
|
|
2
|
+
import agentData, {turnLimitErrorStream, genericErrorStream} from './agentData';
|
|
3
3
|
import {
|
|
4
4
|
analyticsModeTest,
|
|
5
5
|
AnalyticsModeEnum,
|
|
@@ -231,3 +231,68 @@ analyticsModeTest.forEach((analytics) => {
|
|
|
231
231
|
);
|
|
232
232
|
});
|
|
233
233
|
});
|
|
234
|
+
|
|
235
|
+
testAgent.describe('quantic generated answer - agent follow-up error handling', () => {
|
|
236
|
+
testAgent.use({
|
|
237
|
+
options: {agentId: exampleAgentId},
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
testAgent(
|
|
241
|
+
'should display a generic error message when the follow-up request fails due to a network error',
|
|
242
|
+
async ({generatedAnswer}) => {
|
|
243
|
+
await generatedAnswer.streamEndAnalyticRequestPromise;
|
|
244
|
+
await generatedAnswer.mockAgentFollowUpNetworkError();
|
|
245
|
+
|
|
246
|
+
await generatedAnswer.typeFollowUpQuestion('follow-up question');
|
|
247
|
+
await generatedAnswer.submitFollowUp();
|
|
248
|
+
|
|
249
|
+
await expect(generatedAnswer.threadItems).toHaveCount(2);
|
|
250
|
+
|
|
251
|
+
const errorMessage = generatedAnswer.threadItems
|
|
252
|
+
.last()
|
|
253
|
+
.getByTestId('generated-answer-body__error');
|
|
254
|
+
await expect(errorMessage).toBeVisible();
|
|
255
|
+
await expect(errorMessage).toContainText('Something went wrong.');
|
|
256
|
+
}
|
|
257
|
+
);
|
|
258
|
+
|
|
259
|
+
testAgent(
|
|
260
|
+
'should display a distinct turn-limit message when the follow-up SSE stream reports a turn-limit error',
|
|
261
|
+
async ({generatedAnswer}) => {
|
|
262
|
+
await generatedAnswer.streamEndAnalyticRequestPromise;
|
|
263
|
+
await generatedAnswer.mockAgentFollowUpResponse([turnLimitErrorStream]);
|
|
264
|
+
|
|
265
|
+
await generatedAnswer.typeFollowUpQuestion('follow-up question');
|
|
266
|
+
await generatedAnswer.submitFollowUp();
|
|
267
|
+
|
|
268
|
+
await expect(generatedAnswer.threadItems).toHaveCount(2);
|
|
269
|
+
|
|
270
|
+
const errorMessage = generatedAnswer.threadItems
|
|
271
|
+
.last()
|
|
272
|
+
.getByTestId('generated-answer-body__error');
|
|
273
|
+
await expect(errorMessage).toBeVisible();
|
|
274
|
+
await expect(errorMessage).toContainText(
|
|
275
|
+
'Conversation turn limit reached. Please start a new conversation.'
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
);
|
|
279
|
+
|
|
280
|
+
testAgent(
|
|
281
|
+
'should display a generic error message when the follow-up SSE stream reports a generic error',
|
|
282
|
+
async ({generatedAnswer}) => {
|
|
283
|
+
await generatedAnswer.streamEndAnalyticRequestPromise;
|
|
284
|
+
await generatedAnswer.mockAgentFollowUpResponse([genericErrorStream]);
|
|
285
|
+
|
|
286
|
+
await generatedAnswer.typeFollowUpQuestion('follow-up question');
|
|
287
|
+
await generatedAnswer.submitFollowUp();
|
|
288
|
+
|
|
289
|
+
await expect(generatedAnswer.threadItems).toHaveCount(2);
|
|
290
|
+
|
|
291
|
+
const errorMessage = generatedAnswer.threadItems
|
|
292
|
+
.last()
|
|
293
|
+
.getByTestId('generated-answer-body__error');
|
|
294
|
+
await expect(errorMessage).toBeVisible();
|
|
295
|
+
await expect(errorMessage).toContainText('Something went wrong.');
|
|
296
|
+
}
|
|
297
|
+
);
|
|
298
|
+
});
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.generated-answer__footer {
|
|
13
|
-
gap: 1rem;
|
|
13
|
+
gap: var(--slds-g-spacing-4, 1rem);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.generated-answer__answer--collapsed {
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
|
|
20
20
|
.generated-answer__answer--expanded {
|
|
21
21
|
max-height: 100%;
|
|
22
|
-
margin-bottom: 1rem;
|
|
22
|
+
margin-bottom: var(--slds-g-spacing-4, 1rem);
|
|
23
23
|
overflow: visible;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.generated-answer__collapse-generating-message {
|
|
27
|
-
color: var(--lwc-brandPrimary, #1b96ff);
|
|
27
|
+
color: var(--slds-g-color-accent-1, var(--lwc-brandPrimary, #1b96ff));
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.generated-answer__answer::after {
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
</template>
|
|
88
88
|
<template lwc:if={cannotAnswer}>
|
|
89
89
|
<template lwc:if={isManualAnswerGeneration}>
|
|
90
|
-
<div data-testid="generated-answer__no-answer-card" class="slds-box">
|
|
91
|
-
<div class="generated-answer__card-header slds-grid slds-grid_vertical-align-center slds-border_bottom slds-p-
|
|
90
|
+
<div data-testid="generated-answer__no-answer-card" class="slds-box slds-p-around_none">
|
|
91
|
+
<div class="generated-answer__card-header slds-grid slds-grid_vertical-align-center slds-border_bottom slds-p-around_small">
|
|
92
92
|
<div class="generated-answer__header-title slds-grid slds-grid_vertical-align-center">
|
|
93
93
|
<lightning-icon
|
|
94
94
|
icon-name="utility:sparkles"
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
</div>
|
|
102
102
|
<div
|
|
103
103
|
data-testid="generated-answer__no-answer-message"
|
|
104
|
-
class="generated-answer__content slds-
|
|
104
|
+
class="generated-answer__content slds-p-around_small"
|
|
105
105
|
>
|
|
106
106
|
<div class={generatedAnswerClass}>
|
|
107
107
|
<slot name="no-answer-message">{labels.noGeneratedAnswer}</slot>
|
|
@@ -269,6 +269,45 @@ describe('c-quantic-generated-answer-body', () => {
|
|
|
269
269
|
expect(error).not.toBeNull();
|
|
270
270
|
expect(content).toBeNull();
|
|
271
271
|
});
|
|
272
|
+
|
|
273
|
+
it('should render the generic error message when the error has no code (e.g., a network/transport failure)', async () => {
|
|
274
|
+
const element = createTestComponent({
|
|
275
|
+
...defaultOptions,
|
|
276
|
+
generatedAnswer: {
|
|
277
|
+
...defaultOptions.generatedAnswer,
|
|
278
|
+
answer: '',
|
|
279
|
+
// @ts-ignore
|
|
280
|
+
error: {
|
|
281
|
+
message:
|
|
282
|
+
'An error occurred while starting the follow-up answer generation.',
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
});
|
|
286
|
+
await flushPromises();
|
|
287
|
+
|
|
288
|
+
const error = element.shadowRoot.querySelector(selectors.error);
|
|
289
|
+
|
|
290
|
+
expect(error).not.toBeNull();
|
|
291
|
+
expect(error.textContent).toContain(
|
|
292
|
+
'Something went wrong while generating the answer. Please try again later.'
|
|
293
|
+
);
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
it('should not render the error message when the error object is present but empty', async () => {
|
|
297
|
+
const element = createTestComponent({
|
|
298
|
+
...defaultOptions,
|
|
299
|
+
generatedAnswer: {
|
|
300
|
+
...defaultOptions.generatedAnswer,
|
|
301
|
+
// @ts-ignore
|
|
302
|
+
error: {},
|
|
303
|
+
},
|
|
304
|
+
});
|
|
305
|
+
await flushPromises();
|
|
306
|
+
|
|
307
|
+
const error = element.shadowRoot.querySelector(selectors.error);
|
|
308
|
+
|
|
309
|
+
expect(error).toBeNull();
|
|
310
|
+
});
|
|
272
311
|
});
|
|
273
312
|
|
|
274
313
|
describe('rendering of actions', () => {
|
|
@@ -78,7 +78,10 @@ export default class QuanticGeneratedAnswerBody extends LightningElement {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
get hasError() {
|
|
81
|
-
return
|
|
81
|
+
return (
|
|
82
|
+
!!this.generatedAnswer?.error?.code ||
|
|
83
|
+
!!this.generatedAnswer?.error?.message
|
|
84
|
+
);
|
|
82
85
|
}
|
|
83
86
|
|
|
84
87
|
get cannotAnswer() {
|