From 399594c5654948bfa4a1777a12139c899e0ab8f0 Mon Sep 17 00:00:00 2001 From: Gabriel Monteagudo Date: Sat, 18 Apr 2020 17:15:00 -0300 Subject: [PATCH] Fix CSS class for a product's disabled button --- src/components/product.js | 2 +- test/unit/product/product-component.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/product.js b/src/components/product.js index 8d4345af..57c43e29 100644 --- a/src/components/product.js +++ b/src/components/product.js @@ -274,7 +274,7 @@ export default class Product extends Component { } get buttonClass() { - const disabledClass = this.buttonEnabled ? '' : this.classes.disabled; + const disabledClass = this.buttonEnabled ? '' : this.classes.product.disabled; const quantityClass = this.options.contents.buttonWithQuantity ? this.classes.product.buttonBesideQty : ''; return `${disabledClass} ${quantityClass}`; } diff --git a/test/unit/product/product-component.js b/test/unit/product/product-component.js index d5dbb760..3785b7ad 100644 --- a/test/unit/product/product-component.js +++ b/test/unit/product/product-component.js @@ -1680,12 +1680,12 @@ describe('Product Component class', () => { it('contains disabled class if button is not enabled', () => { product.buttonEnabled = false; - assert.include(product.buttonClass, product.classes.disabled); + assert.include(product.buttonClass, product.classes.product.disabled); }); it('does not contain disabled class if button is enabled', () => { product.buttonEnabled = true; - assert.notInclude(product.buttonClass, product.classes.disabled); + assert.notInclude(product.buttonClass, product.classes.product.disabled); }); it('contains buttonBesideQty class if button has quantity', () => {