From 592d25a5e23bf3b65a35bfba3239b592b4ea3004 Mon Sep 17 00:00:00 2001 From: Frederic Beaudoin Date: Tue, 27 Aug 2024 11:02:34 -0400 Subject: [PATCH 1/8] Remove TestUtils export https://coveord.atlassian.net/browse/KIT-2425 --- packages/headless/src/index.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/packages/headless/src/index.ts b/packages/headless/src/index.ts index 8e0f83620b9..e76a46d94ef 100644 --- a/packages/headless/src/index.ts +++ b/packages/headless/src/index.ts @@ -1,17 +1,6 @@ import {polyfillCryptoNode} from './api/analytics/analytics-crypto-polyfill'; -import {buildMockSearchEngine} from './test/mock-engine-v2'; -import {buildMockRaw} from './test/mock-raw'; -import {buildMockResult} from './test/mock-result'; -import {createMockState} from './test/mock-state'; import * as HighlightUtils from './utils/highlight'; -const TestUtils = { - buildMockRaw, - buildMockSearchEngine, - buildMockResult, - createMockState, -}; - polyfillCryptoNode(); // 3rd Party Libraries @@ -563,7 +552,7 @@ export * from './features/actions-history/ipx-actions-history-actions-loader'; // Types & Helpers export {API_DATE_FORMAT} from './api/search/date/date-format'; -export {TestUtils, HighlightUtils}; +export {HighlightUtils}; export type {Result} from './api/search/search/result'; export type {FieldDescription} from './api/search/fields/fields-response'; export type {Raw} from './api/search/search/raw'; From fc6e1aef827d008e7db8fa4aa8c8abd378d44c3b Mon Sep 17 00:00:00 2001 From: Frederic Beaudoin Date: Wed, 28 Aug 2024 14:18:17 -0400 Subject: [PATCH 2/8] Fix stencil build https://coveord.atlassian.net/browse/KIT-2425 --- package-lock.json | 9 +------ packages/atomic-angular/package.json | 1 - .../result-template-decorators.spec.tsx | 10 +++----- .../src/utils/initialization-utils.spec.ts | 6 ++--- .../atomic/src/utils/result-utils.spec.ts | 25 +++++++++---------- packages/samples/angular/package.json | 5 ++-- 6 files changed, 22 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index 639a98e9efa..aa9f44bd2fd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21610,17 +21610,12 @@ "@types/istanbul-lib-report": "*" } }, - "node_modules/@types/jasmine": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-5.1.4.tgz", - "integrity": "sha512-px7OMFO/ncXxixDe1zR13V1iycqWae0MxTaw62RpFlksUi5QuNWgQJFkTQjIOvrmutJbI7Fp2Y2N1F6D2R4G6w==", - "dev": true - }, "node_modules/@types/jest": { "version": "29.5.12", "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", "dev": true, + "license": "MIT", "dependencies": { "expect": "^29.0.0", "pretty-format": "^29.0.0" @@ -55930,7 +55925,6 @@ "@angular/cli": "17.3.8", "@angular/compiler-cli": "17.3.12", "@coveo/headless": "2.80.0", - "@types/jasmine": "5.1.4", "@types/node": "20.14.12", "jasmine-core": "5.2.0", "karma": "6.4.3", @@ -61537,7 +61531,6 @@ "@angular-devkit/build-angular": "17.3.8", "@angular/cli": "17.3.8", "@angular/compiler-cli": "17.3.12", - "@types/jasmine": "5.1.4", "@types/node": "20.14.12", "@typescript-eslint/eslint-plugin": "^7.0.0", "cypress": "13.13.1", diff --git a/packages/atomic-angular/package.json b/packages/atomic-angular/package.json index bb5a9f5a691..eee9659092c 100644 --- a/packages/atomic-angular/package.json +++ b/packages/atomic-angular/package.json @@ -31,7 +31,6 @@ "@angular/cli": "17.3.8", "@angular/compiler-cli": "17.3.12", "@coveo/headless": "2.80.0", - "@types/jasmine": "5.1.4", "@types/node": "20.14.12", "jasmine-core": "5.2.0", "karma": "6.4.3", diff --git a/packages/atomic/src/components/search/result-template-components/result-template-decorators.spec.tsx b/packages/atomic/src/components/search/result-template-components/result-template-decorators.spec.tsx index c9856778a6e..114c63d84e5 100644 --- a/packages/atomic/src/components/search/result-template-components/result-template-decorators.spec.tsx +++ b/packages/atomic/src/components/search/result-template-components/result-template-decorators.spec.tsx @@ -1,4 +1,4 @@ -import {buildInteractiveResult, TestUtils} from '@coveo/headless'; +import {buildInteractiveResult, Result, SearchEngine} from '@coveo/headless'; import {h} from '@stencil/core'; import {newSpecPage, SpecPage} from '@stencil/core/testing'; import {MissingParentError} from '../../common/item-list/item-decorators'; @@ -54,17 +54,15 @@ describe('resultContext method', () => { }); it("revolves the bindings when it's a child of an atomic-result element", async () => { - const mockEngine = TestUtils.buildMockSearchEngine( - TestUtils.createMockState() - ); - const mockResult = TestUtils.buildMockResult(); + const mockEngine = jest.mocked({} as SearchEngine); + const mockResult = jest.mocked({} as Result); const page = await newSpecPage({ components: [AtomicResult], template: () => ( { it(`when "engine" is defined should render the content `, () => { component['bindings'] = { - engine: TestUtils.buildMockSearchEngine(TestUtils.createMockState()), + engine: jest.mocked({} as SearchEngine), i18n: i18next, store: createAtomicStore(), interfaceElement: document.createElement('atomic-search-interface'), @@ -127,7 +127,7 @@ describe('BindStateToController decorator', () => { console.error = jest.fn(); component = { bindings: { - engine: TestUtils.buildMockSearchEngine(TestUtils.createMockState()), + engine: jest.mocked({} as SearchEngine), i18n: i18next, store: createAtomicStore(), interfaceElement: document.createElement('atomic-search-interface'), diff --git a/packages/atomic/src/utils/result-utils.spec.ts b/packages/atomic/src/utils/result-utils.spec.ts index 630cf07c6fa..eb3676bf98e 100644 --- a/packages/atomic/src/utils/result-utils.spec.ts +++ b/packages/atomic/src/utils/result-utils.spec.ts @@ -1,24 +1,23 @@ import { buildSearchEngine, getSampleSearchEngineConfiguration, + Raw, + Result, } from '@coveo/headless'; -import {TestUtils} from '@coveo/headless'; import {Bindings} from '../components/search/atomic-search-interface/atomic-search-interface'; import {buildStringTemplateFromResult} from './result-utils'; describe('buildStringTemplateFromResult', () => { + const mockRaw = jest.mocked({source: 'the source'} as Raw); + const mockResult = jest.mocked({ + title: 'foo', + uri: 'http://uri.foo.com', + raw: mockRaw, + } as Result); const engine = buildSearchEngine({ configuration: getSampleSearchEngineConfiguration(), }); const bindings = {engine} as Bindings; - const result = TestUtils.buildMockResult({ - title: 'foo', - uri: 'http://uri.foo.com', - raw: { - ...TestUtils.buildMockResult().raw, - source: 'the source', - }, - }); it('should create string templates', () => { const templates = [ @@ -30,9 +29,9 @@ describe('buildStringTemplateFromResult', () => { ]; templates.forEach((template) => - expect(buildStringTemplateFromResult(template.in, result, bindings)).toBe( - template.out - ) + expect( + buildStringTemplateFromResult(template.in, mockResult, bindings) + ).toBe(template.out) ); }); @@ -41,7 +40,7 @@ describe('buildStringTemplateFromResult', () => { expect( buildStringTemplateFromResult( '${title}/${raw.notafield}', - result, + mockResult, bindings ) ).toBe('foo/'); diff --git a/packages/samples/angular/package.json b/packages/samples/angular/package.json index 23200009935..896dd5370fc 100644 --- a/packages/samples/angular/package.json +++ b/packages/samples/angular/package.json @@ -28,14 +28,13 @@ "@angular-devkit/build-angular": "17.3.8", "@angular/cli": "17.3.8", "@angular/compiler-cli": "17.3.12", - "@types/jasmine": "5.1.4", "@types/node": "20.14.12", "@typescript-eslint/eslint-plugin": "^7.0.0", "cypress": "13.13.1", "cypress-repeat": "2.3.5", "gts": "5.3.1", + "jest": "29.7.0", "ncp": "2.0.0", - "typescript": "5.4.5", - "jest": "29.7.0" + "typescript": "5.4.5" } } From 16cb55db17d5ebf6e24247b5761a3c08c6a0ee49 Mon Sep 17 00:00:00 2001 From: Frederic Beaudoin Date: Tue, 27 Aug 2024 11:02:34 -0400 Subject: [PATCH 3/8] Remove TestUtils export https://coveord.atlassian.net/browse/KIT-2425 --- packages/headless/src/index.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/packages/headless/src/index.ts b/packages/headless/src/index.ts index 4263d71ad97..36152befda5 100644 --- a/packages/headless/src/index.ts +++ b/packages/headless/src/index.ts @@ -1,17 +1,6 @@ import {polyfillCryptoNode} from './api/analytics/analytics-crypto-polyfill'; -import {buildMockSearchEngine} from './test/mock-engine-v2'; -import {buildMockRaw} from './test/mock-raw'; -import {buildMockResult} from './test/mock-result'; -import {createMockState} from './test/mock-state'; import * as HighlightUtils from './utils/highlight'; -const TestUtils = { - buildMockRaw, - buildMockSearchEngine, - buildMockResult, - createMockState, -}; - polyfillCryptoNode(); // 3rd Party Libraries @@ -562,7 +551,7 @@ export * from './features/actions-history/ipx-actions-history-actions-loader'; // Types & Helpers export {API_DATE_FORMAT} from './api/search/date/date-format'; -export {TestUtils, HighlightUtils}; +export {HighlightUtils}; export type {Result} from './api/search/search/result'; export type {FieldDescription} from './api/search/fields/fields-response'; export type {Raw} from './api/search/search/raw'; From 2a7282efe4695c1c39e5ebf62c5a7d95e04fb255 Mon Sep 17 00:00:00 2001 From: Frederic Beaudoin Date: Wed, 28 Aug 2024 14:18:17 -0400 Subject: [PATCH 4/8] Fix stencil build https://coveord.atlassian.net/browse/KIT-2425 --- package-lock.json | 9 +------ packages/atomic-angular/package.json | 1 - .../result-template-decorators.spec.tsx | 10 +++----- .../src/utils/initialization-utils.spec.ts | 6 ++--- .../atomic/src/utils/result-utils.spec.ts | 25 +++++++++---------- packages/samples/angular/package.json | 5 ++-- 6 files changed, 22 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index c28f680b347..1e98fc5e71e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20468,17 +20468,12 @@ "@types/istanbul-lib-report": "*" } }, - "node_modules/@types/jasmine": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-5.1.4.tgz", - "integrity": "sha512-px7OMFO/ncXxixDe1zR13V1iycqWae0MxTaw62RpFlksUi5QuNWgQJFkTQjIOvrmutJbI7Fp2Y2N1F6D2R4G6w==", - "dev": true - }, "node_modules/@types/jest": { "version": "29.5.12", "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", "dev": true, + "license": "MIT", "dependencies": { "expect": "^29.0.0", "pretty-format": "^29.0.0" @@ -51966,7 +51961,6 @@ "@angular/cli": "17.3.9", "@angular/compiler-cli": "17.3.12", "@coveo/headless": "2.80.0", - "@types/jasmine": "5.1.4", "@types/node": "20.14.12", "jasmine-core": "5.2.0", "karma": "6.4.3", @@ -57588,7 +57582,6 @@ "@angular-devkit/build-angular": "17.3.9", "@angular/cli": "17.3.9", "@angular/compiler-cli": "17.3.12", - "@types/jasmine": "5.1.4", "@types/node": "20.14.12", "@typescript-eslint/eslint-plugin": "^7.0.0", "cypress": "13.13.1", diff --git a/packages/atomic-angular/package.json b/packages/atomic-angular/package.json index aff53dc7b4b..a10a83396ac 100644 --- a/packages/atomic-angular/package.json +++ b/packages/atomic-angular/package.json @@ -31,7 +31,6 @@ "@angular/cli": "17.3.9", "@angular/compiler-cli": "17.3.12", "@coveo/headless": "2.80.0", - "@types/jasmine": "5.1.4", "@types/node": "20.14.12", "jasmine-core": "5.2.0", "karma": "6.4.3", diff --git a/packages/atomic/src/components/search/result-template-components/result-template-decorators.spec.tsx b/packages/atomic/src/components/search/result-template-components/result-template-decorators.spec.tsx index c9856778a6e..114c63d84e5 100644 --- a/packages/atomic/src/components/search/result-template-components/result-template-decorators.spec.tsx +++ b/packages/atomic/src/components/search/result-template-components/result-template-decorators.spec.tsx @@ -1,4 +1,4 @@ -import {buildInteractiveResult, TestUtils} from '@coveo/headless'; +import {buildInteractiveResult, Result, SearchEngine} from '@coveo/headless'; import {h} from '@stencil/core'; import {newSpecPage, SpecPage} from '@stencil/core/testing'; import {MissingParentError} from '../../common/item-list/item-decorators'; @@ -54,17 +54,15 @@ describe('resultContext method', () => { }); it("revolves the bindings when it's a child of an atomic-result element", async () => { - const mockEngine = TestUtils.buildMockSearchEngine( - TestUtils.createMockState() - ); - const mockResult = TestUtils.buildMockResult(); + const mockEngine = jest.mocked({} as SearchEngine); + const mockResult = jest.mocked({} as Result); const page = await newSpecPage({ components: [AtomicResult], template: () => ( { it(`when "engine" is defined should render the content `, () => { component['bindings'] = { - engine: TestUtils.buildMockSearchEngine(TestUtils.createMockState()), + engine: jest.mocked({} as SearchEngine), i18n: i18next, store: createAtomicStore(), interfaceElement: document.createElement('atomic-search-interface'), @@ -127,7 +127,7 @@ describe('BindStateToController decorator', () => { console.error = jest.fn(); component = { bindings: { - engine: TestUtils.buildMockSearchEngine(TestUtils.createMockState()), + engine: jest.mocked({} as SearchEngine), i18n: i18next, store: createAtomicStore(), interfaceElement: document.createElement('atomic-search-interface'), diff --git a/packages/atomic/src/utils/result-utils.spec.ts b/packages/atomic/src/utils/result-utils.spec.ts index 630cf07c6fa..eb3676bf98e 100644 --- a/packages/atomic/src/utils/result-utils.spec.ts +++ b/packages/atomic/src/utils/result-utils.spec.ts @@ -1,24 +1,23 @@ import { buildSearchEngine, getSampleSearchEngineConfiguration, + Raw, + Result, } from '@coveo/headless'; -import {TestUtils} from '@coveo/headless'; import {Bindings} from '../components/search/atomic-search-interface/atomic-search-interface'; import {buildStringTemplateFromResult} from './result-utils'; describe('buildStringTemplateFromResult', () => { + const mockRaw = jest.mocked({source: 'the source'} as Raw); + const mockResult = jest.mocked({ + title: 'foo', + uri: 'http://uri.foo.com', + raw: mockRaw, + } as Result); const engine = buildSearchEngine({ configuration: getSampleSearchEngineConfiguration(), }); const bindings = {engine} as Bindings; - const result = TestUtils.buildMockResult({ - title: 'foo', - uri: 'http://uri.foo.com', - raw: { - ...TestUtils.buildMockResult().raw, - source: 'the source', - }, - }); it('should create string templates', () => { const templates = [ @@ -30,9 +29,9 @@ describe('buildStringTemplateFromResult', () => { ]; templates.forEach((template) => - expect(buildStringTemplateFromResult(template.in, result, bindings)).toBe( - template.out - ) + expect( + buildStringTemplateFromResult(template.in, mockResult, bindings) + ).toBe(template.out) ); }); @@ -41,7 +40,7 @@ describe('buildStringTemplateFromResult', () => { expect( buildStringTemplateFromResult( '${title}/${raw.notafield}', - result, + mockResult, bindings ) ).toBe('foo/'); diff --git a/packages/samples/angular/package.json b/packages/samples/angular/package.json index 6cb2194fbc6..8562c219ce0 100644 --- a/packages/samples/angular/package.json +++ b/packages/samples/angular/package.json @@ -28,14 +28,13 @@ "@angular-devkit/build-angular": "17.3.9", "@angular/cli": "17.3.9", "@angular/compiler-cli": "17.3.12", - "@types/jasmine": "5.1.4", "@types/node": "20.14.12", "@typescript-eslint/eslint-plugin": "^7.0.0", "cypress": "13.13.1", "cypress-repeat": "2.3.5", "gts": "5.3.1", + "jest": "29.7.0", "ncp": "2.0.0", - "typescript": "5.4.5", - "jest": "29.7.0" + "typescript": "5.4.5" } } From 0c783833f0e0168a3426cb336cb2ce804fd04455 Mon Sep 17 00:00:00 2001 From: Frederic Beaudoin Date: Thu, 5 Sep 2024 07:53:21 -0400 Subject: [PATCH 5/8] Fix tests https://coveord.atlassian.net/browse/KIT-2425 --- packages/atomic/src/components.d.ts | 30 ++++++++----------- .../result-template-decorators.spec.tsx | 13 ++++++-- .../src/utils/initialization-utils.spec.ts | 16 ++++++++-- 3 files changed, 36 insertions(+), 23 deletions(-) diff --git a/packages/atomic/src/components.d.ts b/packages/atomic/src/components.d.ts index f7f6c621008..23d7aa8ea1f 100644 --- a/packages/atomic/src/components.d.ts +++ b/packages/atomic/src/components.d.ts @@ -5,8 +5,6 @@ * It contains typing information for all components that exist in this project. */ import { HTMLStencilElement, JSXBase } from "@stencil/core/internal"; -import { AutomaticFacet, CategoryFacetSortCriterion, DateFilterRange, DateRangeRequest, FacetResultsMustMatch, FacetSortCriterion, FoldedResult, GeneratedAnswer, GeneratedAnswerCitation, GeneratedAnswerStyle, InlineLink, InteractiveCitation, InteractiveResult, LogLevel as LogLevel1, PlatformEnvironment as PlatformEnvironment2, RangeFacetRangeAlgorithm, RangeFacetSortCriterion, Result, ResultTemplate, ResultTemplateCondition, SearchEngine, SearchStatus } from "@coveo/headless"; -import { CategoryFacet, CommerceEngine, DateFacet, InteractiveProduct, LogLevel, NumericFacet, PlatformEnvironment, Product, ProductListing, ProductListingSummaryState, ProductTemplate, ProductTemplateCondition, RegularFacet, Search, SearchSummaryState, Summary } from "@coveo/headless/commerce"; import { CommerceBindings as Bindings } from "./components/commerce/atomic-commerce-interface/atomic-commerce-interface"; import { Range } from "./components/commerce/facets/facet-number-input/atomic-commerce-facet-number-input"; import { i18n } from "i18next"; @@ -20,8 +18,8 @@ import { AtomicInterface } from "./utils/initialization-utils"; import { unknown as AnyBindings, i18nCompatibilityVersion as i18nCompatibilityVersion1, ItemDisplayBasicLayout as ItemDisplayBasicLayout1, ItemDisplayDensity as ItemDisplayDensity1, ItemDisplayImageSize as ItemDisplayImageSize1, ItemRenderingFunction as ItemRenderingFunction1, ItemTarget as ItemTarget1 } from "./components"; import { AnyBindings as AnyBindings1 } from "./components/common/interface/bindings"; import { NumberInputType } from "./components/common/facets/facet-number-input/number-input-type"; -import { NumericFilter, NumericFilterState, RelativeDateUnit } from "./components/common/types"; -import { InsightEngine, FacetSortCriterion as InsightFacetSortCriterion, FoldedResult as InsightFoldedResult, GeneratedAnswerStyle as InsightGeneratedAnswerStyle, InteractiveResult as InsightInteractiveResult, LogLevel as InsightLogLevel, RangeFacetRangeAlgorithm as InsightRangeFacetRangeAlgorithm, RangeFacetSortCriterion as InsightRangeFacetSortCriterion, Result as InsightResult, ResultTemplate as InsightResultTemplate, ResultTemplateCondition as InsightResultTemplateCondition, UserAction as IUserAction, PlatformEnvironment as PlatformEnvironmentInsight } from "./components/insight"; +import { unknown as NumericFilter, unknown as NumericFilterState, unknown as RelativeDateUnit } from "./components/common/types"; +import { unknown as InsightEngine, unknown as InsightFacetSortCriterion, unknown as InsightFoldedResult, unknown as InsightGeneratedAnswerStyle, unknown as InsightInteractiveResult, unknown as InsightLogLevel, unknown as InsightRangeFacetRangeAlgorithm, unknown as InsightRangeFacetSortCriterion, unknown as InsightResult, unknown as InsightResultTemplate, unknown as InsightResultTemplateCondition, unknown as IUserAction, unknown as PlatformEnvironmentInsight } from "./components/insight"; import { i18nCompatibilityVersion } from "./components/common/interface/i18n"; import { InsightInitializationOptions } from "./components/insight/atomic-insight-interface/atomic-insight-interface"; import { AtomicInsightStore } from "./components/insight/atomic-insight-interface/store"; @@ -29,15 +27,12 @@ import { InsightResultActionClickedEvent } from "./components/insight/atomic-ins import { Section } from "./components/common/atomic-layout-section/sections"; import { AtomicCommonStore, AtomicCommonStoreData } from "./components/common/interface/store"; import { SelectChildProductEventArgs } from "./components/commerce/product-template-components/atomic-product-children/atomic-product-children"; -import { PlatformEnvironment as PlatformEnvironment1, RecommendationEngine } from "@coveo/headless/recommendation"; -import { InteractiveResult as RecsInteractiveResult, LogLevel as RecsLogLevel, Result as RecsResult, ResultTemplate as RecsResultTemplate, ResultTemplateCondition as RecsResultTemplateCondition } from "./components/recommendations"; +import { unknown as RecsInteractiveResult, unknown as RecsLogLevel, unknown as RecsResult, unknown as RecsResultTemplate, unknown as RecsResultTemplateCondition } from "./components/recommendations"; import { RecsInitializationOptions } from "./components/recommendations/atomic-recs-interface/atomic-recs-interface"; import { AtomicRecsStore } from "./components/recommendations/atomic-recs-interface/store"; import { Bindings as Bindings1 } from "./components/search/atomic-search-interface/atomic-search-interface"; import { AriaLabelGenerator as AriaLabelGenerator1 } from "./components/search/search-box-suggestions/atomic-search-box-instant-results/atomic-search-box-instant-results"; import { InitializationOptions } from "./components/search/atomic-search-interface/atomic-search-interface"; -export { AutomaticFacet, CategoryFacetSortCriterion, DateFilterRange, DateRangeRequest, FacetResultsMustMatch, FacetSortCriterion, FoldedResult, GeneratedAnswer, GeneratedAnswerCitation, GeneratedAnswerStyle, InlineLink, InteractiveCitation, InteractiveResult, LogLevel as LogLevel1, PlatformEnvironment as PlatformEnvironment2, RangeFacetRangeAlgorithm, RangeFacetSortCriterion, Result, ResultTemplate, ResultTemplateCondition, SearchEngine, SearchStatus } from "@coveo/headless"; -export { CategoryFacet, CommerceEngine, DateFacet, InteractiveProduct, LogLevel, NumericFacet, PlatformEnvironment, Product, ProductListing, ProductListingSummaryState, ProductTemplate, ProductTemplateCondition, RegularFacet, Search, SearchSummaryState, Summary } from "@coveo/headless/commerce"; export { CommerceBindings as Bindings } from "./components/commerce/atomic-commerce-interface/atomic-commerce-interface"; export { Range } from "./components/commerce/facets/facet-number-input/atomic-commerce-facet-number-input"; export { i18n } from "i18next"; @@ -51,8 +46,8 @@ export { AtomicInterface } from "./utils/initialization-utils"; export { unknown as AnyBindings, i18nCompatibilityVersion as i18nCompatibilityVersion1, ItemDisplayBasicLayout as ItemDisplayBasicLayout1, ItemDisplayDensity as ItemDisplayDensity1, ItemDisplayImageSize as ItemDisplayImageSize1, ItemRenderingFunction as ItemRenderingFunction1, ItemTarget as ItemTarget1 } from "./components"; export { AnyBindings as AnyBindings1 } from "./components/common/interface/bindings"; export { NumberInputType } from "./components/common/facets/facet-number-input/number-input-type"; -export { NumericFilter, NumericFilterState, RelativeDateUnit } from "./components/common/types"; -export { InsightEngine, FacetSortCriterion as InsightFacetSortCriterion, FoldedResult as InsightFoldedResult, GeneratedAnswerStyle as InsightGeneratedAnswerStyle, InteractiveResult as InsightInteractiveResult, LogLevel as InsightLogLevel, RangeFacetRangeAlgorithm as InsightRangeFacetRangeAlgorithm, RangeFacetSortCriterion as InsightRangeFacetSortCriterion, Result as InsightResult, ResultTemplate as InsightResultTemplate, ResultTemplateCondition as InsightResultTemplateCondition, UserAction as IUserAction, PlatformEnvironment as PlatformEnvironmentInsight } from "./components/insight"; +export { unknown as NumericFilter, unknown as NumericFilterState, unknown as RelativeDateUnit } from "./components/common/types"; +export { unknown as InsightEngine, unknown as InsightFacetSortCriterion, unknown as InsightFoldedResult, unknown as InsightGeneratedAnswerStyle, unknown as InsightInteractiveResult, unknown as InsightLogLevel, unknown as InsightRangeFacetRangeAlgorithm, unknown as InsightRangeFacetSortCriterion, unknown as InsightResult, unknown as InsightResultTemplate, unknown as InsightResultTemplateCondition, unknown as IUserAction, unknown as PlatformEnvironmentInsight } from "./components/insight"; export { i18nCompatibilityVersion } from "./components/common/interface/i18n"; export { InsightInitializationOptions } from "./components/insight/atomic-insight-interface/atomic-insight-interface"; export { AtomicInsightStore } from "./components/insight/atomic-insight-interface/store"; @@ -60,8 +55,7 @@ export { InsightResultActionClickedEvent } from "./components/insight/atomic-ins export { Section } from "./components/common/atomic-layout-section/sections"; export { AtomicCommonStore, AtomicCommonStoreData } from "./components/common/interface/store"; export { SelectChildProductEventArgs } from "./components/commerce/product-template-components/atomic-product-children/atomic-product-children"; -export { PlatformEnvironment as PlatformEnvironment1, RecommendationEngine } from "@coveo/headless/recommendation"; -export { InteractiveResult as RecsInteractiveResult, LogLevel as RecsLogLevel, Result as RecsResult, ResultTemplate as RecsResultTemplate, ResultTemplateCondition as RecsResultTemplateCondition } from "./components/recommendations"; +export { unknown as RecsInteractiveResult, unknown as RecsLogLevel, unknown as RecsResult, unknown as RecsResultTemplate, unknown as RecsResultTemplateCondition } from "./components/recommendations"; export { RecsInitializationOptions } from "./components/recommendations/atomic-recs-interface/atomic-recs-interface"; export { AtomicRecsStore } from "./components/recommendations/atomic-recs-interface/store"; export { Bindings as Bindings1 } from "./components/search/atomic-search-interface/atomic-search-interface"; @@ -556,7 +550,7 @@ export namespace Components { * @param organizationId * @param env */ - "getOrganizationEndpoints": (organizationId: string, env?: PlatformEnvironment) => Promise<{ platform: string; analytics: string; search: string; admin: string; }>; + "getOrganizationEndpoints": (organizationId: string, env?: PlatformEnvironment) => Promise; /** * The commerce interface i18next instance. */ @@ -1264,7 +1258,7 @@ export namespace Components { * @param organizationId * @param env */ - "getOrganizationEndpoints": (organizationId: string, env?: PlatformEnvironmentInsight) => Promise<{ platform: string; analytics: string; search: string; admin: string; }>; + "getOrganizationEndpoints": (organizationId: string, env?: PlatformEnvironmentInsight) => Promise; /** * The service insight interface i18next instance. */ @@ -2332,7 +2326,7 @@ export namespace Components { * A list of non-default fields to include in the query results. Specify the property as an array using a JSON string representation: ```html ``` */ "fieldsToInclude": string[] | string; - "getOrganizationEndpoints": (organizationId: string, env?: PlatformEnvironment1) => Promise<{ platform: string; analytics: string; search: string; admin: string; }>; + "getOrganizationEndpoints": (organizationId: string, env?: PlatformEnvironment) => Promise; /** * Fetches new recommendations. */ @@ -3160,7 +3154,7 @@ export namespace Components { * @param organizationId * @param env */ - "getOrganizationEndpoints": (organizationId: string, env?: PlatformEnvironment2) => Promise<{ platform: string; analytics: string; search: string; admin: string; }>; + "getOrganizationEndpoints": (organizationId: string, env?: PlatformEnvironment) => Promise; /** * The search interface i18next instance. */ @@ -3192,7 +3186,7 @@ export namespace Components { /** * The severity level of the messages to log in the console. */ - "logLevel"?: LogLevel1; + "logLevel"?: LogLevel; /** * The search interface [query pipeline](https://docs.coveo.com/en/180/). If the search interface is initialized using [`initializeWithSearchEngine`](https://docs.coveo.com/en/atomic/latest/reference/components/atomic-search-interface/#initializewithsearchengine), the query pipeline should instead be configured in the target engine. */ @@ -8777,7 +8771,7 @@ declare namespace LocalJSX { /** * The severity level of the messages to log in the console. */ - "logLevel"?: LogLevel1; + "logLevel"?: LogLevel; /** * The search interface [query pipeline](https://docs.coveo.com/en/180/). If the search interface is initialized using [`initializeWithSearchEngine`](https://docs.coveo.com/en/atomic/latest/reference/components/atomic-search-interface/#initializewithsearchengine), the query pipeline should instead be configured in the target engine. */ diff --git a/packages/atomic/src/components/search/result-template-components/result-template-decorators.spec.tsx b/packages/atomic/src/components/search/result-template-components/result-template-decorators.spec.tsx index 114c63d84e5..f36a4f970dd 100644 --- a/packages/atomic/src/components/search/result-template-components/result-template-decorators.spec.tsx +++ b/packages/atomic/src/components/search/result-template-components/result-template-decorators.spec.tsx @@ -1,4 +1,8 @@ -import {buildInteractiveResult, Result, SearchEngine} from '@coveo/headless'; +import { + buildInteractiveResult, + buildSearchEngine, + Result, +} from '@coveo/headless'; import {h} from '@stencil/core'; import {newSpecPage, SpecPage} from '@stencil/core/testing'; import {MissingParentError} from '../../common/item-list/item-decorators'; @@ -54,7 +58,12 @@ describe('resultContext method', () => { }); it("revolves the bindings when it's a child of an atomic-result element", async () => { - const mockEngine = jest.mocked({} as SearchEngine); + const mockEngine = buildSearchEngine({ + configuration: { + accessToken: 'access_token', + organizationId: 'organization_id', + }, + }); const mockResult = jest.mocked({} as Result); const page = await newSpecPage({ diff --git a/packages/atomic/src/utils/initialization-utils.spec.ts b/packages/atomic/src/utils/initialization-utils.spec.ts index d0c4d9fe2d8..b7c1a1e98de 100644 --- a/packages/atomic/src/utils/initialization-utils.spec.ts +++ b/packages/atomic/src/utils/initialization-utils.spec.ts @@ -1,4 +1,4 @@ -import {buildSearchBox, Controller, SearchEngine} from '@coveo/headless'; +import {buildSearchBox, buildSearchEngine, Controller} from '@coveo/headless'; import {newSpecPage, SpecPage} from '@stencil/core/testing'; import i18next from 'i18next'; import {AtomicSearchBox} from '../components/search/atomic-search-box/atomic-search-box'; @@ -105,7 +105,12 @@ describe('InitializeBindings decorator', () => { it(`when "engine" is defined should render the content `, () => { component['bindings'] = { - engine: jest.mocked({} as SearchEngine), + engine: buildSearchEngine({ + configuration: { + accessToken: 'access_token', + organizationId: 'organization_id', + }, + }), i18n: i18next, store: createAtomicStore(), interfaceElement: document.createElement('atomic-search-interface'), @@ -127,7 +132,12 @@ describe('BindStateToController decorator', () => { console.error = jest.fn(); component = { bindings: { - engine: jest.mocked({} as SearchEngine), + engine: buildSearchEngine({ + configuration: { + accessToken: 'access_token', + organizationId: 'organization_id', + }, + }), i18n: i18next, store: createAtomicStore(), interfaceElement: document.createElement('atomic-search-interface'), From 0934e991ba09d87835674fd811fdd2bcaa3c0982 Mon Sep 17 00:00:00 2001 From: Frederic Beaudoin Date: Thu, 5 Sep 2024 07:53:58 -0400 Subject: [PATCH 6/8] Rename variable https://coveord.atlassian.net/browse/KIT-2425 --- .../result-template-decorators.spec.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/atomic/src/components/search/result-template-components/result-template-decorators.spec.tsx b/packages/atomic/src/components/search/result-template-components/result-template-decorators.spec.tsx index f36a4f970dd..0c7b026b717 100644 --- a/packages/atomic/src/components/search/result-template-components/result-template-decorators.spec.tsx +++ b/packages/atomic/src/components/search/result-template-components/result-template-decorators.spec.tsx @@ -58,7 +58,7 @@ describe('resultContext method', () => { }); it("revolves the bindings when it's a child of an atomic-result element", async () => { - const mockEngine = buildSearchEngine({ + const engine = buildSearchEngine({ configuration: { accessToken: 'access_token', organizationId: 'organization_id', @@ -72,7 +72,7 @@ describe('resultContext method', () => { Date: Thu, 5 Sep 2024 12:05:48 +0000 Subject: [PATCH 7/8] Add generated files --- packages/atomic/src/components.d.ts | 30 +++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/packages/atomic/src/components.d.ts b/packages/atomic/src/components.d.ts index 23d7aa8ea1f..f7f6c621008 100644 --- a/packages/atomic/src/components.d.ts +++ b/packages/atomic/src/components.d.ts @@ -5,6 +5,8 @@ * It contains typing information for all components that exist in this project. */ import { HTMLStencilElement, JSXBase } from "@stencil/core/internal"; +import { AutomaticFacet, CategoryFacetSortCriterion, DateFilterRange, DateRangeRequest, FacetResultsMustMatch, FacetSortCriterion, FoldedResult, GeneratedAnswer, GeneratedAnswerCitation, GeneratedAnswerStyle, InlineLink, InteractiveCitation, InteractiveResult, LogLevel as LogLevel1, PlatformEnvironment as PlatformEnvironment2, RangeFacetRangeAlgorithm, RangeFacetSortCriterion, Result, ResultTemplate, ResultTemplateCondition, SearchEngine, SearchStatus } from "@coveo/headless"; +import { CategoryFacet, CommerceEngine, DateFacet, InteractiveProduct, LogLevel, NumericFacet, PlatformEnvironment, Product, ProductListing, ProductListingSummaryState, ProductTemplate, ProductTemplateCondition, RegularFacet, Search, SearchSummaryState, Summary } from "@coveo/headless/commerce"; import { CommerceBindings as Bindings } from "./components/commerce/atomic-commerce-interface/atomic-commerce-interface"; import { Range } from "./components/commerce/facets/facet-number-input/atomic-commerce-facet-number-input"; import { i18n } from "i18next"; @@ -18,8 +20,8 @@ import { AtomicInterface } from "./utils/initialization-utils"; import { unknown as AnyBindings, i18nCompatibilityVersion as i18nCompatibilityVersion1, ItemDisplayBasicLayout as ItemDisplayBasicLayout1, ItemDisplayDensity as ItemDisplayDensity1, ItemDisplayImageSize as ItemDisplayImageSize1, ItemRenderingFunction as ItemRenderingFunction1, ItemTarget as ItemTarget1 } from "./components"; import { AnyBindings as AnyBindings1 } from "./components/common/interface/bindings"; import { NumberInputType } from "./components/common/facets/facet-number-input/number-input-type"; -import { unknown as NumericFilter, unknown as NumericFilterState, unknown as RelativeDateUnit } from "./components/common/types"; -import { unknown as InsightEngine, unknown as InsightFacetSortCriterion, unknown as InsightFoldedResult, unknown as InsightGeneratedAnswerStyle, unknown as InsightInteractiveResult, unknown as InsightLogLevel, unknown as InsightRangeFacetRangeAlgorithm, unknown as InsightRangeFacetSortCriterion, unknown as InsightResult, unknown as InsightResultTemplate, unknown as InsightResultTemplateCondition, unknown as IUserAction, unknown as PlatformEnvironmentInsight } from "./components/insight"; +import { NumericFilter, NumericFilterState, RelativeDateUnit } from "./components/common/types"; +import { InsightEngine, FacetSortCriterion as InsightFacetSortCriterion, FoldedResult as InsightFoldedResult, GeneratedAnswerStyle as InsightGeneratedAnswerStyle, InteractiveResult as InsightInteractiveResult, LogLevel as InsightLogLevel, RangeFacetRangeAlgorithm as InsightRangeFacetRangeAlgorithm, RangeFacetSortCriterion as InsightRangeFacetSortCriterion, Result as InsightResult, ResultTemplate as InsightResultTemplate, ResultTemplateCondition as InsightResultTemplateCondition, UserAction as IUserAction, PlatformEnvironment as PlatformEnvironmentInsight } from "./components/insight"; import { i18nCompatibilityVersion } from "./components/common/interface/i18n"; import { InsightInitializationOptions } from "./components/insight/atomic-insight-interface/atomic-insight-interface"; import { AtomicInsightStore } from "./components/insight/atomic-insight-interface/store"; @@ -27,12 +29,15 @@ import { InsightResultActionClickedEvent } from "./components/insight/atomic-ins import { Section } from "./components/common/atomic-layout-section/sections"; import { AtomicCommonStore, AtomicCommonStoreData } from "./components/common/interface/store"; import { SelectChildProductEventArgs } from "./components/commerce/product-template-components/atomic-product-children/atomic-product-children"; -import { unknown as RecsInteractiveResult, unknown as RecsLogLevel, unknown as RecsResult, unknown as RecsResultTemplate, unknown as RecsResultTemplateCondition } from "./components/recommendations"; +import { PlatformEnvironment as PlatformEnvironment1, RecommendationEngine } from "@coveo/headless/recommendation"; +import { InteractiveResult as RecsInteractiveResult, LogLevel as RecsLogLevel, Result as RecsResult, ResultTemplate as RecsResultTemplate, ResultTemplateCondition as RecsResultTemplateCondition } from "./components/recommendations"; import { RecsInitializationOptions } from "./components/recommendations/atomic-recs-interface/atomic-recs-interface"; import { AtomicRecsStore } from "./components/recommendations/atomic-recs-interface/store"; import { Bindings as Bindings1 } from "./components/search/atomic-search-interface/atomic-search-interface"; import { AriaLabelGenerator as AriaLabelGenerator1 } from "./components/search/search-box-suggestions/atomic-search-box-instant-results/atomic-search-box-instant-results"; import { InitializationOptions } from "./components/search/atomic-search-interface/atomic-search-interface"; +export { AutomaticFacet, CategoryFacetSortCriterion, DateFilterRange, DateRangeRequest, FacetResultsMustMatch, FacetSortCriterion, FoldedResult, GeneratedAnswer, GeneratedAnswerCitation, GeneratedAnswerStyle, InlineLink, InteractiveCitation, InteractiveResult, LogLevel as LogLevel1, PlatformEnvironment as PlatformEnvironment2, RangeFacetRangeAlgorithm, RangeFacetSortCriterion, Result, ResultTemplate, ResultTemplateCondition, SearchEngine, SearchStatus } from "@coveo/headless"; +export { CategoryFacet, CommerceEngine, DateFacet, InteractiveProduct, LogLevel, NumericFacet, PlatformEnvironment, Product, ProductListing, ProductListingSummaryState, ProductTemplate, ProductTemplateCondition, RegularFacet, Search, SearchSummaryState, Summary } from "@coveo/headless/commerce"; export { CommerceBindings as Bindings } from "./components/commerce/atomic-commerce-interface/atomic-commerce-interface"; export { Range } from "./components/commerce/facets/facet-number-input/atomic-commerce-facet-number-input"; export { i18n } from "i18next"; @@ -46,8 +51,8 @@ export { AtomicInterface } from "./utils/initialization-utils"; export { unknown as AnyBindings, i18nCompatibilityVersion as i18nCompatibilityVersion1, ItemDisplayBasicLayout as ItemDisplayBasicLayout1, ItemDisplayDensity as ItemDisplayDensity1, ItemDisplayImageSize as ItemDisplayImageSize1, ItemRenderingFunction as ItemRenderingFunction1, ItemTarget as ItemTarget1 } from "./components"; export { AnyBindings as AnyBindings1 } from "./components/common/interface/bindings"; export { NumberInputType } from "./components/common/facets/facet-number-input/number-input-type"; -export { unknown as NumericFilter, unknown as NumericFilterState, unknown as RelativeDateUnit } from "./components/common/types"; -export { unknown as InsightEngine, unknown as InsightFacetSortCriterion, unknown as InsightFoldedResult, unknown as InsightGeneratedAnswerStyle, unknown as InsightInteractiveResult, unknown as InsightLogLevel, unknown as InsightRangeFacetRangeAlgorithm, unknown as InsightRangeFacetSortCriterion, unknown as InsightResult, unknown as InsightResultTemplate, unknown as InsightResultTemplateCondition, unknown as IUserAction, unknown as PlatformEnvironmentInsight } from "./components/insight"; +export { NumericFilter, NumericFilterState, RelativeDateUnit } from "./components/common/types"; +export { InsightEngine, FacetSortCriterion as InsightFacetSortCriterion, FoldedResult as InsightFoldedResult, GeneratedAnswerStyle as InsightGeneratedAnswerStyle, InteractiveResult as InsightInteractiveResult, LogLevel as InsightLogLevel, RangeFacetRangeAlgorithm as InsightRangeFacetRangeAlgorithm, RangeFacetSortCriterion as InsightRangeFacetSortCriterion, Result as InsightResult, ResultTemplate as InsightResultTemplate, ResultTemplateCondition as InsightResultTemplateCondition, UserAction as IUserAction, PlatformEnvironment as PlatformEnvironmentInsight } from "./components/insight"; export { i18nCompatibilityVersion } from "./components/common/interface/i18n"; export { InsightInitializationOptions } from "./components/insight/atomic-insight-interface/atomic-insight-interface"; export { AtomicInsightStore } from "./components/insight/atomic-insight-interface/store"; @@ -55,7 +60,8 @@ export { InsightResultActionClickedEvent } from "./components/insight/atomic-ins export { Section } from "./components/common/atomic-layout-section/sections"; export { AtomicCommonStore, AtomicCommonStoreData } from "./components/common/interface/store"; export { SelectChildProductEventArgs } from "./components/commerce/product-template-components/atomic-product-children/atomic-product-children"; -export { unknown as RecsInteractiveResult, unknown as RecsLogLevel, unknown as RecsResult, unknown as RecsResultTemplate, unknown as RecsResultTemplateCondition } from "./components/recommendations"; +export { PlatformEnvironment as PlatformEnvironment1, RecommendationEngine } from "@coveo/headless/recommendation"; +export { InteractiveResult as RecsInteractiveResult, LogLevel as RecsLogLevel, Result as RecsResult, ResultTemplate as RecsResultTemplate, ResultTemplateCondition as RecsResultTemplateCondition } from "./components/recommendations"; export { RecsInitializationOptions } from "./components/recommendations/atomic-recs-interface/atomic-recs-interface"; export { AtomicRecsStore } from "./components/recommendations/atomic-recs-interface/store"; export { Bindings as Bindings1 } from "./components/search/atomic-search-interface/atomic-search-interface"; @@ -550,7 +556,7 @@ export namespace Components { * @param organizationId * @param env */ - "getOrganizationEndpoints": (organizationId: string, env?: PlatformEnvironment) => Promise; + "getOrganizationEndpoints": (organizationId: string, env?: PlatformEnvironment) => Promise<{ platform: string; analytics: string; search: string; admin: string; }>; /** * The commerce interface i18next instance. */ @@ -1258,7 +1264,7 @@ export namespace Components { * @param organizationId * @param env */ - "getOrganizationEndpoints": (organizationId: string, env?: PlatformEnvironmentInsight) => Promise; + "getOrganizationEndpoints": (organizationId: string, env?: PlatformEnvironmentInsight) => Promise<{ platform: string; analytics: string; search: string; admin: string; }>; /** * The service insight interface i18next instance. */ @@ -2326,7 +2332,7 @@ export namespace Components { * A list of non-default fields to include in the query results. Specify the property as an array using a JSON string representation: ```html ``` */ "fieldsToInclude": string[] | string; - "getOrganizationEndpoints": (organizationId: string, env?: PlatformEnvironment) => Promise; + "getOrganizationEndpoints": (organizationId: string, env?: PlatformEnvironment1) => Promise<{ platform: string; analytics: string; search: string; admin: string; }>; /** * Fetches new recommendations. */ @@ -3154,7 +3160,7 @@ export namespace Components { * @param organizationId * @param env */ - "getOrganizationEndpoints": (organizationId: string, env?: PlatformEnvironment) => Promise; + "getOrganizationEndpoints": (organizationId: string, env?: PlatformEnvironment2) => Promise<{ platform: string; analytics: string; search: string; admin: string; }>; /** * The search interface i18next instance. */ @@ -3186,7 +3192,7 @@ export namespace Components { /** * The severity level of the messages to log in the console. */ - "logLevel"?: LogLevel; + "logLevel"?: LogLevel1; /** * The search interface [query pipeline](https://docs.coveo.com/en/180/). If the search interface is initialized using [`initializeWithSearchEngine`](https://docs.coveo.com/en/atomic/latest/reference/components/atomic-search-interface/#initializewithsearchengine), the query pipeline should instead be configured in the target engine. */ @@ -8771,7 +8777,7 @@ declare namespace LocalJSX { /** * The severity level of the messages to log in the console. */ - "logLevel"?: LogLevel; + "logLevel"?: LogLevel1; /** * The search interface [query pipeline](https://docs.coveo.com/en/180/). If the search interface is initialized using [`initializeWithSearchEngine`](https://docs.coveo.com/en/atomic/latest/reference/components/atomic-search-interface/#initializewithsearchengine), the query pipeline should instead be configured in the target engine. */ From 16a8b741d12592eb40547b3e027a0a613919c2c1 Mon Sep 17 00:00:00 2001 From: Frederic Beaudoin Date: Thu, 5 Sep 2024 09:24:51 -0400 Subject: [PATCH 8/8] Change config values https://coveord.atlassian.net/browse/KIT-2425 --- .../result-template-decorators.spec.tsx | 4 ++-- packages/atomic/src/utils/initialization-utils.spec.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/atomic/src/components/search/result-template-components/result-template-decorators.spec.tsx b/packages/atomic/src/components/search/result-template-components/result-template-decorators.spec.tsx index 0c7b026b717..6f779cbd307 100644 --- a/packages/atomic/src/components/search/result-template-components/result-template-decorators.spec.tsx +++ b/packages/atomic/src/components/search/result-template-components/result-template-decorators.spec.tsx @@ -60,8 +60,8 @@ describe('resultContext method', () => { it("revolves the bindings when it's a child of an atomic-result element", async () => { const engine = buildSearchEngine({ configuration: { - accessToken: 'access_token', - organizationId: 'organization_id', + accessToken: 'accessToken', + organizationId: 'organizationId', }, }); const mockResult = jest.mocked({} as Result); diff --git a/packages/atomic/src/utils/initialization-utils.spec.ts b/packages/atomic/src/utils/initialization-utils.spec.ts index b7c1a1e98de..583c16516d3 100644 --- a/packages/atomic/src/utils/initialization-utils.spec.ts +++ b/packages/atomic/src/utils/initialization-utils.spec.ts @@ -107,8 +107,8 @@ describe('InitializeBindings decorator', () => { component['bindings'] = { engine: buildSearchEngine({ configuration: { - accessToken: 'access_token', - organizationId: 'organization_id', + accessToken: 'accessToken', + organizationId: 'organizationId', }, }), i18n: i18next, @@ -134,8 +134,8 @@ describe('BindStateToController decorator', () => { bindings: { engine: buildSearchEngine({ configuration: { - accessToken: 'access_token', - organizationId: 'organization_id', + accessToken: 'accessToken', + organizationId: 'organizationId', }, }), i18n: i18next,