@coveo/quantic 3.43.3 → 3.43.5
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/classes/CaseAssistController.cls +18 -0
- package/force-app/main/default/classes/CaseAssistController.cls-meta.xml +5 -0
- package/force-app/main/default/classes/CaseAssistControllerTest.cls +15 -0
- package/force-app/main/default/classes/CaseAssistControllerTest.cls-meta.xml +5 -0
- package/force-app/main/default/classes/HeadlessControllerTest.cls +1 -1
- package/force-app/main/default/classes/InsightController.cls +4 -2
- package/force-app/main/default/classes/SampleCaseAssistTokenProvider.cls +19 -0
- package/force-app/main/default/classes/SampleCaseAssistTokenProvider.cls-meta.xml +5 -0
- package/force-app/main/default/classes/SampleCaseAssistTokenProviderTest.cls +15 -0
- package/force-app/main/default/classes/SampleCaseAssistTokenProviderTest.cls-meta.xml +5 -0
- package/force-app/main/default/classes/SampleInsightTokenProvider.cls +24 -0
- package/force-app/main/default/classes/SampleInsightTokenProvider.cls-meta.xml +5 -0
- package/force-app/main/default/classes/SampleInsightTokenProviderTest.cls +24 -0
- package/force-app/main/default/classes/SampleInsightTokenProviderTest.cls-meta.xml +5 -0
- package/force-app/main/default/classes/SampleTokenProvider.cls +2 -1
- package/force-app/main/default/classes/SampleTokenProviderTest.cls +1 -1
- 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/quanticCaseAssistInterface/quanticCaseAssistInterface.js +1 -1
- package/force-app/main/default/lwc/quanticCaseClassification/quanticCaseClassification.css +3 -3
- 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/quanticDidYouMean/e2e/fixture.ts +6 -2
- package/force-app/main/default/lwc/quanticDocumentSuggestion/quanticDocumentSuggestion.css +2 -2
- 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/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/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/pageObject.ts +6 -0
- 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/quanticThreadItem.css +6 -6
- package/force-app/main/default/lwc/quanticThreadItem/quanticThreadItem.js +0 -1
- 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/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/commerce/search/query-suggest/query-suggest-request.d.ts +6 -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-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/controllers/commerce/search-box/headless-search-box-options.d.ts +9 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/commerce/standalone-search-box/headless-standalone-search-box-options.d.ts +1 -0
- 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/field-suggestions/facet/headless-field-suggestions.d.ts +1 -0
- 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/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/query-suggest/commerce-query-suggest-slice.d.ts +3 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/commerce/query-suggest/query-suggest-actions.d.ts +16 -5
- 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/result/result-insight-analytics-actions.d.ts +1 -0
- 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/force-app/main/default/staticresources/dompurify/purify.min.js +2 -2
- package/package.json +8 -8
|
@@ -28,7 +28,7 @@ lightning-icon {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.slds-visual-picker input:checked ~ label .visual-picker__figure:after {
|
|
31
|
-
border-right-color: var(--lwc-colorBorderRowSelectedHover, rgb(27, 150, 255));
|
|
32
|
-
border-top-color: var(--lwc-colorBorderRowSelectedHover, rgb(27, 150, 255));
|
|
33
|
-
border-radius: 4px;
|
|
31
|
+
border-right-color: var(--slds-g-color-brand-base-50, var(--lwc-colorBorderRowSelectedHover, rgb(27, 150, 255)));
|
|
32
|
+
border-top-color: var(--slds-g-color-brand-base-50, var(--lwc-colorBorderRowSelectedHover, rgb(27, 150, 255)));
|
|
33
|
+
border-radius: var(--slds-g-radius-border-2, 4px);
|
|
34
34
|
}
|
|
@@ -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
|
}
|
|
@@ -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
|
}
|
|
@@ -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 {
|
|
@@ -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() {
|