diff --git a/CHANGELOG.md b/CHANGELOG.md index d6e95de818..178cc55714 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## Draft +- Added narrow down pricing during option selections [#1924](https://github.com/bigcommerce/cornerstone/pull/1924) - Cornerstone - Image Zoom Does Not Work on Internet Explorer. [#1923](https://github.com/bigcommerce/cornerstone/pull/1923) - Fixed input placeholder color contrast according to AA standard. [#1933](https://github.com/bigcommerce/cornerstone/pull/1933) diff --git a/assets/js/test-unit/theme/common/payment-method.spec.js b/assets/js/test-unit/theme/common/payment-method.spec.js index 97d9351441..9114ac70e9 100644 --- a/assets/js/test-unit/theme/common/payment-method.spec.js +++ b/assets/js/test-unit/theme/common/payment-method.spec.js @@ -127,7 +127,7 @@ describe('PaymentMethod', () => { it('should have valid input expiration date', () => { const callback = jasmine.createSpy(); - const validator = { add: ({ validate }) => validate(callback, '12/20') }; + const validator = { add: ({ validate }) => validate(callback, '12/25') }; Validators.setExpirationValidation(validator, 'selector'); expect(callback).toHaveBeenCalledWith(true); diff --git a/assets/js/theme/common/product-details-base.js b/assets/js/theme/common/product-details-base.js index 9cbc5e2d96..82659d2046 100644 --- a/assets/js/theme/common/product-details-base.js +++ b/assets/js/theme/common/product-details-base.js @@ -274,13 +274,19 @@ export default class ProductDetailsBase { this.clearPricingNotFound(viewModel); if (price.with_tax) { + const updatedPrice = price.price_range ? + `${price.price_range.min.with_tax.formatted} - ${price.price_range.max.with_tax.formatted}` + : price.with_tax.formatted; viewModel.priceLabel.$span.show(); - viewModel.$priceWithTax.html(price.with_tax.formatted); + viewModel.$priceWithTax.html(updatedPrice); } if (price.without_tax) { + const updatedPrice = price.price_range ? + `${price.price_range.min.without_tax.formatted} - ${price.price_range.max.without_tax.formatted}` + : price.without_tax.formatted; viewModel.priceLabel.$span.show(); - viewModel.$priceWithoutTax.html(price.without_tax.formatted); + viewModel.$priceWithoutTax.html(updatedPrice); } if (price.rrp_with_tax) {