Skip to content

Commit 899226a

Browse files
MAGETWO-59321: CreateOnlineInvoiceEntityTest and CreateVaultOrderBackendTest fail on Bamboo
1 parent 3a43a25 commit 899226a

File tree

7 files changed

+38
-18
lines changed

7 files changed

+38
-18
lines changed

dev/tests/functional/tests/app/Magento/Customer/Test/etc/testcase.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
<step name="createProducts" module="Magento_Catalog" next="addProducts"/>
1414
<step name="addProducts" module="Magento_Sales" next="updateProductsData"/>
1515
<step name="updateProductsData" module="Magento_Sales" next="fillBillingAddress"/>
16-
<step name="fillBillingAddress" module="Magento_Sales" next="selectPaymentMethodForOrder"/>
16+
<step name="fillBillingAddress" module="Magento_Sales" next="fillShippingAddress"/>
17+
<step name="fillShippingAddress" module="Magento_Sales" next="selectPaymentMethodForOrder"/>
1718
<step name="selectPaymentMethodForOrder" module="Magento_Sales" next="selectShippingMethodForOrder"/>
1819
<step name="selectShippingMethodForOrder" module="Magento_Sales" next="submitOrder"/>
1920
<step name="submitOrder" module="Magento_Sales"/>

dev/tests/functional/tests/app/Magento/Paypal/Test/etc/testcase.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@
7979
<step name="selectStore" module="Magento_Sales" next="addProducts" />
8080
<step name="addProducts" module="Magento_Sales" next="fillAccountInformation" />
8181
<step name="fillAccountInformation" module="Magento_Sales" next="fillBillingAddress" />
82-
<step name="fillBillingAddress" module="Magento_Sales" next="selectShippingMethodForOrder" />
82+
<step name="fillBillingAddress" module="Magento_Sales" next="fillShippingAddress" />
83+
<step name="fillShippingAddress" module="Magento_Sales" next="selectShippingMethodForOrder" />
8384
<step name="selectShippingMethodForOrder" module="Magento_Sales" next="saveCreditCardOnBackend" />
8485
<step name="saveCreditCardOnBackend" module="Magento_Vault" next="submitOrderNegative" />
8586
<step name="submitOrderNegative" module="Magento_Sales" />

dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -291,29 +291,28 @@ public function fillBillingAddress(
291291
$saveAddress = 'No',
292292
$setShippingAddress = true
293293
) {
294-
if ($setShippingAddress) {
294+
if ($setShippingAddress !== false) {
295295
$this->getShippingAddressBlock()->uncheckSameAsBillingShippingAddress();
296296
}
297297
$this->getBillingAddressBlock()->fill($billingAddress);
298298
$this->getBillingAddressBlock()->saveInAddressBookBillingAddress($saveAddress);
299299
$this->getTemplateBlock()->waitLoader();
300+
if ($setShippingAddress) {
301+
$this->getShippingAddressBlock()->setSameAsBillingShippingAddress();
302+
$this->getTemplateBlock()->waitLoader();
303+
}
300304
}
301305

302306
/**
303307
* Fill Shipping Address.
304308
*
305-
* @param FixtureInterface $shippingAddress [optional]
309+
* @param FixtureInterface $shippingAddress
306310
* @return void
307311
*/
308-
public function fillShippingAddress(FixtureInterface $shippingAddress = null)
312+
public function fillShippingAddress(FixtureInterface $shippingAddress)
309313
{
310-
if (!$shippingAddress) {
311-
$this->getShippingAddressBlock()->setSameAsBillingShippingAddress();
312-
$this->getTemplateBlock()->waitLoader();
313-
} else {
314-
$this->getShippingAddressBlock()->fill($shippingAddress);
315-
$this->getTemplateBlock()->waitLoader();
316-
}
314+
$this->getShippingAddressBlock()->fill($shippingAddress);
315+
$this->getTemplateBlock()->waitLoader();
317316
}
318317

319318
/**

dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/FillBillingAddressStep.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ class FillBillingAddressStep implements TestStepInterface
2929
*/
3030
protected $billingAddress;
3131

32+
/**
33+
* Shipping Address fixture.
34+
*
35+
* @var Address
36+
*/
37+
protected $shippingAddress;
38+
3239
/**
3340
* Save Address.
3441
*
@@ -46,17 +53,20 @@ class FillBillingAddressStep implements TestStepInterface
4653
/**
4754
* @param OrderCreateIndex $orderCreateIndex
4855
* @param Address $billingAddress
49-
* @param string $saveAddress
56+
* @param Address $shippingAddress [optional]
57+
* @param string $saveAddress [optional]
5058
* @param bool $setShippingAddress [optional]
5159
*/
5260
public function __construct(
5361
OrderCreateIndex $orderCreateIndex,
5462
Address $billingAddress,
63+
Address $shippingAddress = null,
5564
$saveAddress = 'No',
5665
$setShippingAddress = true
5766
) {
5867
$this->orderCreateIndex = $orderCreateIndex;
5968
$this->billingAddress = $billingAddress;
69+
$this->shippingAddress = $shippingAddress;
6070
$this->saveAddress = $saveAddress;
6171
$this->setShippingAddress = $setShippingAddress;
6272
}
@@ -68,6 +78,9 @@ public function __construct(
6878
*/
6979
public function run()
7080
{
81+
if ($this->shippingAddress !== null) {
82+
$this->setShippingAddress = null;
83+
}
7184
$this->orderCreateIndex->getCreateBlock()
7285
->fillBillingAddress($this->billingAddress, $this->saveAddress, $this->setShippingAddress);
7386

dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/FillShippingAddressStep.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ public function __construct(
4848
*/
4949
public function run()
5050
{
51-
$this->orderCreateIndex->getCreateBlock()->fillShippingAddress($this->shippingAddress);
51+
if ($this->shippingAddress !== null) {
52+
$this->orderCreateIndex->getCreateBlock()->fillShippingAddress($this->shippingAddress);
53+
}
5254
}
5355
}

dev/tests/functional/tests/app/Magento/Sales/Test/etc/testcase.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
<step name="createOrder" module="Magento_Sales" next="openOrder" />
1212
<step name="openOrder" module="Magento_Sales" next="reorder" />
1313
<step name="reorder" module="Magento_Sales" next="fillBillingAddress" />
14-
<step name="fillBillingAddress" module="Magento_Sales" next="selectPaymentMethodForOrder" />
14+
<step name="fillBillingAddress" module="Magento_Sales" next="fillShippingAddress" />
15+
<step name="fillShippingAddress" module="Magento_Sales" next="selectPaymentMethodForOrder" />
1516
<step name="selectPaymentMethodForOrder" module="Magento_Sales" next="selectShippingMethodForOrder" />
1617
<step name="selectShippingMethodForOrder" module="Magento_Sales" next="submitOrder" />
1718
<step name="submitOrder" module="Magento_Sales" />
@@ -42,7 +43,8 @@
4243
<step name="selectCustomerOrder" module="Magento_Sales" next="selectStore" />
4344
<step name="selectStore" module="Magento_Sales" next="addProducts" />
4445
<step name="addProducts" module="Magento_Sales" next="fillBillingAddress" />
45-
<step name="fillBillingAddress" module="Magento_Sales" next="selectPaymentMethodForOrder" />
46+
<step name="fillBillingAddress" module="Magento_Sales" next="fillShippingAddress" />
47+
<step name="fillShippingAddress" module="Magento_Sales" next="selectPaymentMethodForOrder" />
4648
<step name="selectPaymentMethodForOrder" module="Magento_Sales" next="selectShippingMethodForOrder" />
4749
<step name="selectShippingMethodForOrder" module="Magento_Sales" next="submitOrder" />
4850
<step name="submitOrder" module="Magento_Sales" next="openSalesOrderOnFrontendForGuest" />
@@ -61,7 +63,8 @@
6163
<step name="addProducts" module="Magento_Sales" next="updateProductsData" />
6264
<step name="updateProductsData" module="Magento_Sales" next="fillAccountInformation" />
6365
<step name="fillAccountInformation" module="Magento_Sales" next="fillBillingAddress" />
64-
<step name="fillBillingAddress" module="Magento_Sales" next="selectShippingMethodForOrder" />
66+
<step name="fillBillingAddress" module="Magento_Sales" next="fillShippingAddress" />
67+
<step name="fillShippingAddress" module="Magento_Sales" next="selectShippingMethodForOrder" />
6568
<step name="selectShippingMethodForOrder" module="Magento_Sales" next="selectPaymentMethodForOrder" />
6669
<step name="selectPaymentMethodForOrder" module="Magento_Sales" next="submitOrder" />
6770
<step name="submitOrder" module="Magento_Sales" next="createInvoice" />

dev/tests/functional/tests/app/Magento/Vault/Test/etc/testcase.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
<step name="selectStore" module="Magento_Sales" next="addProducts" />
3838
<step name="addProducts" module="Magento_Sales" next="fillAccountInformation" />
3939
<step name="fillAccountInformation" module="Magento_Sales" next="fillBillingAddress" />
40-
<step name="fillBillingAddress" module="Magento_Sales" next="selectShippingMethodForOrder" />
40+
<step name="fillBillingAddress" module="Magento_Sales" next="fillShippingAddress" />
41+
<step name="fillShippingAddress" module="Magento_Sales" next="selectShippingMethodForOrder" />
4142
<step name="selectShippingMethodForOrder" module="Magento_Sales" next="saveCreditCardOnBackend" />
4243
<step name="saveCreditCardOnBackend" module="Magento_Vault" next="submitOrder" />
4344
<step name="submitOrder" module="Magento_Sales" next="reorder" />

0 commit comments

Comments
 (0)