Skip to content

Commit 63f400c

Browse files
author
Roman Liukshyn
committed
MTA-560: Re-factor Tests for Online Onepage Checkout
- CR Changes
1 parent a6501a0 commit 63f400c

File tree

3 files changed

+42
-42
lines changed

3 files changed

+42
-42
lines changed

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/Magento/Mtf/TestCase/etc/testcase.xsd">
9-
<scenario name="OnePageCheckoutTest" firstStep="setupConfiguration">
10-
<step name="setupConfiguration" module="Magento_Core" next="createProducts"/>
11-
<step name="createProducts" module="Magento_Catalog" next="createTaxRule"/>
12-
<step name="createTaxRule" module="Magento_Tax" next="createRewardExchangeRates"/>
13-
<step name="addProductsToTheCart" module="Magento_Checkout" next="estimateShippingAndTax"/>
14-
<step name="estimateShippingAndTax" module="Magento_Checkout" next="applyGiftCard"/>
15-
<step name="proceedToCheckout" module="Magento_Checkout" next="createCustomer"/>
16-
<step name="createCustomer" module="Magento_Customer" next="applyCustomerBalanceToCustomer"/>
17-
<step name="selectCheckoutMethod" module="Magento_Checkout" next="fillBillingInformation"/>
18-
<step name="fillBillingInformation" module="Magento_Checkout" next="fillShippingMethod"/>
19-
<step name="fillShippingMethod" module="Magento_Checkout" next="selectStoreCredit"/>
20-
<step name="selectPaymentMethod" module="Magento_Checkout" next="placeOrder"/>
21-
<step name="placeOrder" module="Magento_Checkout"/>
22-
</scenario>
9+
<scenario name="OnePageCheckoutTest" firstStep="setupConfiguration">
10+
<step name="setupConfiguration" module="Magento_Core" next="createProducts"/>
11+
<step name="createProducts" module="Magento_Catalog" next="createTaxRule"/>
12+
<step name="createTaxRule" module="Magento_Tax" next="addProductsToTheCart"/>
13+
<step name="addProductsToTheCart" module="Magento_Checkout" next="estimateShippingAndTax"/>
14+
<step name="estimateShippingAndTax" module="Magento_Checkout" next="proceedToCheckout"/>
15+
<step name="proceedToCheckout" module="Magento_Checkout" next="createCustomer"/>
16+
<step name="createCustomer" module="Magento_Customer" next="selectCheckoutMethod"/>
17+
<step name="selectCheckoutMethod" module="Magento_Checkout" next="fillBillingInformation"/>
18+
<step name="fillBillingInformation" module="Magento_Checkout" next="fillShippingMethod"/>
19+
<step name="fillShippingMethod" module="Magento_Checkout" next="selectPaymentMethod"/>
20+
<step name="selectPaymentMethod" module="Magento_Checkout" next="placeOrder"/>
21+
<step name="placeOrder" module="Magento_Checkout"/>
22+
</scenario>
2323
</config>

dev/tests/functional/tests/app/Magento/Core/Test/Handler/ConfigData/Curl.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,22 @@ protected function prepareData(FixtureInterface $fixture)
5959
$fields = $fixture->getData();
6060
if (isset($fields['section'])) {
6161
foreach ($fields['section'] as $itemSection) {
62-
parse_str($this->modifyConfigPath($itemSection), $configPath);
62+
parse_str($this->prepareConfigPath($itemSection), $configPath);
6363
$result = array_merge_recursive($result, $configPath);
6464
}
6565
}
6666
return $result;
6767
}
6868

6969
/**
70-
* Modify config path.
70+
* Prepare config path.
7171
*
7272
* From payment/cashondelivery/active to ['payment']['groups']['cashondelivery']['fields']['active']
7373
*
7474
* @param array $input
7575
* @return string
7676
*/
77-
protected function modifyConfigPath(array $input)
77+
protected function prepareConfigPath(array $input)
7878
{
7979
$resultArray = '';
8080
$path = explode('/', $input['path']);

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

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,29 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
9-
<type name="Magento\Sales\Test\Constraint\AssertOrderStatusInGrid">
10-
<arguments>
11-
<argument name="severity" xsi:type="string">high</argument>
12-
</arguments>
13-
</type>
14-
<type name="Magento\Sales\Test\Constraint\AssertOrderStatusDuplicateStatus">
15-
<arguments>
16-
<argument name="severity" xsi:type="string">high</argument>
17-
</arguments>
18-
</type>
19-
<type name="Magento\Sales\Test\Constraint\AssertOrderCancelSuccessMessage">
20-
<arguments>
21-
<argument name="severity" xsi:type="string">high</argument>
22-
</arguments>
23-
</type>
24-
<type name="Magento\Sales\Test\Constraint\AssertOrderMassOnHoldSuccessMessage">
25-
<arguments>
26-
<argument name="severity" xsi:type="string">high</argument>
27-
</arguments>
28-
</type>
29-
<type name="Magento\Sales\Test\Constraint\AssertOrderCommentsHistory">
30-
<arguments>
31-
<argument name="severity" xsi:type="string">high</argument>
32-
</arguments>
33-
</type>
9+
<type name="Magento\Sales\Test\Constraint\AssertOrderStatusInGrid">
10+
<arguments>
11+
<argument name="severity" xsi:type="string">high</argument>
12+
</arguments>
13+
</type>
14+
<type name="Magento\Sales\Test\Constraint\AssertOrderStatusDuplicateStatus">
15+
<arguments>
16+
<argument name="severity" xsi:type="string">high</argument>
17+
</arguments>
18+
</type>
19+
<type name="Magento\Sales\Test\Constraint\AssertOrderCancelSuccessMessage">
20+
<arguments>
21+
<argument name="severity" xsi:type="string">high</argument>
22+
</arguments>
23+
</type>
24+
<type name="Magento\Sales\Test\Constraint\AssertOrderMassOnHoldSuccessMessage">
25+
<arguments>
26+
<argument name="severity" xsi:type="string">high</argument>
27+
</arguments>
28+
</type>
29+
<type name="Magento\Sales\Test\Constraint\AssertOrderCommentsHistory">
30+
<arguments>
31+
<argument name="severity" xsi:type="string">high</argument>
32+
</arguments>
33+
</type>
3434
</config>

0 commit comments

Comments
 (0)