Skip to content

Fix Reorder Button functionality #1162

@nmalevanec

Description

@nmalevanec

Preconditions

  1. Magento with MSI 'Single Stock' mode

Steps to reproduce

  1. Run Magento\Sales\Test\TestCase\CreateOrderBackendTest::CreateOrderBackendTestVariation19

Expected result

  1. Test should pass successfully.

Actual result

  1. Test fails.
"Reorder" button for order with following data '000000002, ' is present in Orders block on frontend.
Failed asserting that true is false.

/var/www/html/dev/tests/functional/tests/app/Magento/Sales/Test/Constraint/AssertReorderButtonIsNotVisibleOnFrontend.php:62
/var/www/html/dev/tests/functional/vendor/magento/mtf/Magento/Mtf/ObjectManager/Factory.php:57
/var/www/html/dev/tests/functional/vendor/magento/mtf/Magento/Mtf/ObjectManager.php:81
/var/www/html/dev/tests/functional/vendor/magento/mtf/Magento/Mtf/Constraint/AbstractConstraint.php:155
/var/www/html/dev/tests/functional/vendor/magento/mtf/Magento/Mtf/Constraint/Composite.php:109
/var/www/html/dev/tests/functional/vendor/magento/mtf/Magento/Mtf/TestCase/Injectable.php:231
/var/www/html/dev/tests/functional/vendor/magento/mtf/Magento/Mtf/TestCase/Functional.php:300
/var/www/html/dev/tests/functional/vendor/magento/mtf/Magento/Mtf/TestCase/Functional.php:217
/var/www/html/dev/tests/functional/vendor/magento/mtf/Magento/Mtf/TestCase/Injectable.php:210
/var/www/html/dev/tests/functional/vendor/magento/mtf/Magento/Mtf/TestCase/Scenario.php:81
/var/www/html/dev/tests/functional/vendor/magento/mtf/Magento/Mtf/TestCase/Injectable.php:166

Test steps

  1. Navigate to admin area.
  2. Create simple product with qty = 1
  3. Navigate to storefront.
  4. Register and login with customer.
  5. Add product to cart and proceed to checkout.
  6. Place order.
  7. Navigate to customer account dashboard.
  8. Navigate to "My Orders" tab.
  9. Test expects "Reorder" button hides from page.

Additional Info

Standard magento behaviour - "Reorder" button hides immediately after place order, but. On MSI "Reorder" button hides only after shipment created #680.
Additional steps with shipment placement should be added into test before assertions.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions