From 0a005e8383182c98b0e9cd5bb6edc9ccf7117216 Mon Sep 17 00:00:00 2001 From: serhii balko Date: Tue, 27 Mar 2018 16:35:29 +0300 Subject: [PATCH] MSI-690: Unskip and Fix Integration Test for Quantity Increment Message on Wishlist --- .../IsCorrectQtyCondition.php | 5 ++++- .../testsuite/Magento/Wishlist/Controller/IndexTest.php | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/InventorySales/Model/IsProductSalableForRequestedQtyCondition/IsCorrectQtyCondition.php b/app/code/Magento/InventorySales/Model/IsProductSalableForRequestedQtyCondition/IsCorrectQtyCondition.php index d022e8bfaf901..8e8a29e4d2e2f 100644 --- a/app/code/Magento/InventorySales/Model/IsProductSalableForRequestedQtyCondition/IsCorrectQtyCondition.php +++ b/app/code/Magento/InventorySales/Model/IsProductSalableForRequestedQtyCondition/IsCorrectQtyCondition.php @@ -108,7 +108,10 @@ public function execute(string $sku, int $stockId, float $requestedQty): Product if ($this->isQuantityIncrementCheckFailed($stockItemConfiguration, $requestedQty)) { return $this->createErrorResult( 'is_correct_qty-qty_increment', - __('The requested qty is not a valid increment') + __( + 'You can buy this product only in quantities of %1 at a time.', + $stockItemConfiguration->getQtyIncrements() + ) ); } diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Controller/IndexTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Controller/IndexTest.php index 977cf0f3b963b..957612f22b4fd 100644 --- a/dev/tests/integration/testsuite/Magento/Wishlist/Controller/IndexTest.php +++ b/dev/tests/integration/testsuite/Magento/Wishlist/Controller/IndexTest.php @@ -126,9 +126,6 @@ public function testAddActionProductNameXss() */ public function testAllcartAction() { - $this->markTestSkipped( - 'Fix Integration Test for Quantity Increment Message https://github.com/magento-engcom/msi/issues/690' - ); $formKey = $this->_objectManager->get(\Magento\Framework\Data\Form\FormKey::class)->getFormKey(); $this->getRequest()->setParam('form_key', $formKey); $this->dispatch('wishlist/index/allcart');