diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertMinicartEmpty.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertMinicartEmpty.php
index 65a2b7879af8a..bb1f68c2d1278 100644
--- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertMinicartEmpty.php
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertMinicartEmpty.php
@@ -27,6 +27,7 @@ class AssertMinicartEmpty extends AbstractConstraint
public function processAssert(
CmsIndex $cmsIndex
) {
+ $cmsIndex->open();
\PHPUnit\Framework\Assert::assertEquals(
self::TEXT_EMPTY_MINICART,
$cmsIndex->getCartSidebarBlock()->getEmptyMessage(),
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/OnePageCheckoutOfflinePaymentMethodsTest.xml b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/OnePageCheckoutOfflinePaymentMethodsTest.xml
index 5e08ad3097ed3..b999900042c37 100644
--- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/OnePageCheckoutOfflinePaymentMethodsTest.xml
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/OnePageCheckoutOfflinePaymentMethodsTest.xml
@@ -19,7 +19,7 @@
Fixed
checkmo
checkmo, disable_guest_checkout, disable_customer_redirect_after_logging
-
+
MAGETWO-59816: Redirect works improperly in a browser incognito mode
@@ -35,7 +35,7 @@
US_address_1_without_email
checkmo
checkmo, disable_guest_checkout, disable_customer_redirect_after_logging, enable_https_frontend_only
-
+
severity:S0
@@ -51,7 +51,6 @@
Pending
Back, Send Email, Cancel, Hold, Invoice, Edit
checkmo_specificcountry_gb
-
@@ -70,10 +69,10 @@
- 285.00
banktransfer
- Pending
- Back, Send Email, Cancel, Hold, Ship, Invoice, Edit
+ Processing
+ Back, Send Email, Cancel, Hold, Invoice, Edit
banktransfer
-
+
@@ -93,10 +92,10 @@
- 375.00
banktransfer
- Pending
- Back, Send Email, Cancel, Hold, Ship, Invoice, Edit
+ Precessing
+ Back, Send Email, Cancel, Hold, Invoice, Edit
banktransfer_specificcountry_gb, can_subtract_and_can_back_in_stock
-
+
@@ -123,7 +122,7 @@
Yes
checkmo
checkmo
-
+
@@ -149,7 +148,7 @@
true
checkmo
checkmo, freeshipping_minimum_order_amount_100
-
+
@@ -168,7 +167,6 @@
Pending
Back, Cancel, Send Email, Hold, Invoice, Edit
zero_subtotal_checkout
-
@@ -185,9 +183,9 @@
- 375
checkmo
- Pending
+ Processing
Back, Send Email, Cancel, Hold, Invoice, Edit
-
+
@@ -208,7 +206,7 @@
- 565.00
checkmo
-
+
@@ -225,7 +223,7 @@
banktransfer
banktransfer_specificcountry_gb
-
+
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/PlaceOrderStep.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/PlaceOrderStep.php
index 13b8b9a1405fa..964f8f366f223 100644
--- a/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/PlaceOrderStep.php
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/PlaceOrderStep.php
@@ -7,9 +7,11 @@
namespace Magento\Checkout\Test\TestStep;
use Magento\Checkout\Test\Constraint\AssertGrandTotalOrderReview;
+use Magento\Checkout\Test\Constraint\AssertOrderSuccessPlacedMessage;
use Magento\Checkout\Test\Page\CheckoutOnepage;
use Magento\Checkout\Test\Page\CheckoutOnepageSuccess;
use Magento\Mtf\Fixture\FixtureFactory;
+use Magento\Mtf\ObjectManager;
use Magento\Mtf\TestStep\TestStepInterface;
use Magento\Sales\Test\Fixture\OrderInjectable;
@@ -32,6 +34,13 @@ class PlaceOrderStep implements TestStepInterface
*/
private $assertGrandTotalOrderReview;
+ /**
+ * Assert that order success message is correct.
+ *
+ * @var AssertOrderSuccessPlacedMessage
+ */
+ private $assertOrderSuccessPlacedMessage;
+
/**
* One page checkout success page.
*
@@ -75,6 +84,7 @@ class PlaceOrderStep implements TestStepInterface
* @param array $products
* @param array $prices
* @param OrderInjectable|null $order
+ * @param AssertOrderSuccessPlacedMessage $assertOrderSuccessPlacedMessage
*/
public function __construct(
CheckoutOnepage $checkoutOnepage,
@@ -83,7 +93,8 @@ public function __construct(
FixtureFactory $fixtureFactory,
array $products = [],
array $prices = [],
- OrderInjectable $order = null
+ OrderInjectable $order = null,
+ AssertOrderSuccessPlacedMessage $assertOrderSuccessPlacedMessage = null
) {
$this->checkoutOnepage = $checkoutOnepage;
$this->assertGrandTotalOrderReview = $assertGrandTotalOrderReview;
@@ -92,6 +103,8 @@ public function __construct(
$this->products = $products;
$this->prices = $prices;
$this->order = $order;
+ $this->assertOrderSuccessPlacedMessage = $assertOrderSuccessPlacedMessage
+ ?: ObjectManager::getInstance()->create(AssertOrderSuccessPlacedMessage::class);
}
/**
@@ -106,6 +119,7 @@ public function run()
}
$this->checkoutOnepage->getPaymentBlock()->getSelectedPaymentMethodBlock()->clickPlaceOrder();
$orderId = $this->checkoutOnepageSuccess->getSuccessBlock()->getGuestOrderId();
+ $this->assertOrderSuccessPlacedMessage->processAssert($this->checkoutOnepageSuccess);
$data = [
'id' => $orderId,
'entity_id' => ['products' => $this->products]
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/etc/testcase.xml b/dev/tests/functional/tests/app/Magento/Checkout/Test/etc/testcase.xml
index 0c8fbd5f03f9e..f0b0194039a34 100644
--- a/dev/tests/functional/tests/app/Magento/Checkout/Test/etc/testcase.xml
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/etc/testcase.xml
@@ -38,7 +38,8 @@
-
+
+
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Actions.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Actions.php
index 573f28f09b78c..7a6903ef47aac 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Actions.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Actions.php
@@ -137,6 +137,16 @@ class Actions extends Block
*/
protected $confirmModal = '.confirm._show[data-role=modal]';
+ /**
+ * Is shipment can be created.
+ *
+ * @return bool
+ */
+ public function canShip()
+ {
+ return $this->_rootElement->find($this->ship)->isVisible();
+ }
+
/**
* Ship order.
*
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/CreateShipmentStep.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/CreateShipmentStep.php
index 79abd438a1f2e..dcee66b44646e 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/CreateShipmentStep.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/CreateShipmentStep.php
@@ -99,13 +99,21 @@ public function run()
{
$this->orderIndex->open();
$this->orderIndex->getSalesOrderGrid()->searchAndOpen(['id' => $this->order->getId()]);
- $this->salesOrderView->getPageActions()->ship();
- if (!empty($this->data)) {
- $this->orderShipmentNew->getFormBlock()->fillData($this->data, $this->order->getEntityId()['products']);
+ $shipmentIds = [];
+ /**
+ * As this step is used in general scenarios and not all test cases has shippable items(ex: virtual product)
+ * we need to check, if it possible to create shipment for given order.
+ */
+ if ($this->salesOrderView->getPageActions()->canShip()) {
+ $this->salesOrderView->getPageActions()->ship();
+ if (!empty($this->data)) {
+ $this->orderShipmentNew->getFormBlock()->fillData($this->data, $this->order->getEntityId()['products']);
+ }
+ $this->orderShipmentNew->getFormBlock()->submit();
+ $shipmentIds = $this->getShipmentIds();
}
- $this->orderShipmentNew->getFormBlock()->submit();
- return ['shipmentIds' => $this->getShipmentIds()];
+ return ['shipmentIds' => $shipmentIds];
}
/**