diff --git a/src/app/core/facades/product-context.facade.spec.ts b/src/app/core/facades/product-context.facade.spec.ts index 222b2c5ec5..4449b0590b 100644 --- a/src/app/core/facades/product-context.facade.spec.ts +++ b/src/app/core/facades/product-context.facade.spec.ts @@ -9,6 +9,7 @@ import { AttributeGroup } from 'ish-core/models/attribute-group/attribute-group. import { AttributeGroupTypes } from 'ish-core/models/attribute-group/attribute-group.types'; import { CategoryView } from 'ish-core/models/category-view/category-view.model'; import { Category } from 'ish-core/models/category/category.model'; +import { PriceHelper } from 'ish-core/models/price/price.helper'; import { ProductView } from 'ish-core/models/product-view/product-view.model'; import { ProductCompletenessLevel } from 'ish-core/models/product/product.model'; @@ -326,6 +327,7 @@ describe('Product Context Facade', () => { describe('display properties', () => { it('should set correct display properties for product', () => { + context.set('prices', () => ({ salePrice: PriceHelper.empty() })); expect(context.get('displayProperties')).toMatchInlineSnapshot(` { "addToBasket": true, @@ -351,6 +353,7 @@ describe('Product Context Facade', () => { }); it('should include external displayProperty overrides when calculating', () => { + context.set('prices', () => ({ salePrice: PriceHelper.empty() })); context.config = { readOnly: true, name: false, @@ -576,6 +579,7 @@ describe('Product Context Facade', () => { { sku: 'p2', quantity: 2 }, ]) ); + context.set('prices', () => ({ salePrice: PriceHelper.empty() })); context.set('sku', () => '123'); }); @@ -639,6 +643,7 @@ describe('Product Context Facade', () => { } as ProductView; when(shoppingFacade.product$(anything(), anything())).thenReturn(of(product)); + context.set('prices', () => ({ salePrice: PriceHelper.empty() })); context.set('sku', () => '123'); }); @@ -802,6 +807,7 @@ describe('Product Context Facade', () => { }); it('should set correct display properties respecting overrides from providers for product 123', () => { + context.set('prices', () => ({ salePrice: PriceHelper.empty() })); context.set('sku', () => '123'); expect(context.get('displayProperties')).toMatchInlineSnapshot(`