Skip to content

Commit 9cd6e22

Browse files
committed
MC-18826: Increase test coverage for Cart & Checkout and Order Processing functional areas
- Automation test for MC-6411
1 parent 9377d04 commit 9cd6e22

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderSelectShippingMethodActionGroup.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="AdminOrderSelectShippingMethodActionGroup">
1212
<arguments>
13-
<argument name="methodTitle" type="string" defaultValue="Flat Rate"/>
14-
<argument name="methodName" type="string" defaultValue="Fixed"/>
13+
<argument name="methodTitle" type="string" defaultValue="flatrate"/>
14+
<argument name="methodName" type="string" defaultValue="fixed"/>
1515
</arguments>
1616
<waitForElementVisible selector="{{AdminInvoicePaymentShippingSection.getShippingMethod}}" stepKey="waitForShippingMethodsOpen"/>
1717
<click selector="{{AdminInvoicePaymentShippingSection.getShippingMethod}}" stepKey="openShippingMethod"/>
1818
<conditionalClick selector="{{AdminInvoicePaymentShippingSection.getShippingMethod}}" dependentSelector="{{AdminInvoicePaymentShippingSection.fixedPriceShippingMethod(methodTitle, methodName)}}" visible="false" stepKey="openShippingMethodSecondTime"/>
19-
<waitForElementVisible selector="{{AdminInvoicePaymentShippingSection.fixedPriceShippingMethod(methodTitle, methodName)}}" stepKey="waitForShippingMethod"/>
20-
<click selector="{{AdminInvoicePaymentShippingSection.fixedPriceShippingMethod(methodTitle, methodName)}}" stepKey="chooseShippingMethod"/>
19+
<waitForElementVisible selector="{{AdminInvoicePaymentShippingSection.fixedPriceShippingMethod(methodName, methodTitle)}}" stepKey="waitForShippingMethod"/>
20+
<click selector="{{AdminInvoicePaymentShippingSection.fixedPriceShippingMethod(methodName, methodTitle)}}" stepKey="chooseShippingMethod"/>
2121
<waitForPageLoad stepKey="waitForPageToLoad"/>
2222
</actionGroup>
2323
</actionGroups>

app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicePaymentShippingSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<element name="CreateShipment" type="checkbox" selector=".order-shipping-address input[name='invoice[do_shipment]']"/>
1818
<element name="getShippingMethodAndRates" type="button" selector="//span[text()='Get shipping methods and rates']" timeout="60"/>
1919
<element name="shippingMethod" type="button" selector="//label[contains(text(), 'Fixed')]" timeout="60"/>
20-
<element name="fixedPriceShippingMethod" type="button" selector="//*[contains(text(), '{{methodTitle}}')]/parent::dl//label[contains(text(), '{{methodName}}')]" parameterized="true"/>
20+
<element name="fixedPriceShippingMethod" type="button" selector="#s_method_{{methodName}}_{{methodTitle}}" parameterized="true"/>
2121
<element name="getShippingMethod" type="button" selector="#order-shipping-method-summary a"/>
2222
</section>
2323
</sections>

app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateOrderCustomStoreShippingMethodTableRatesTest.xml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@
2121
</annotations>
2222
<before>
2323
<!--Create product and customer-->
24-
<comment userInput="Create product and customer" stepKey="commentCreateProductAndCustomer"/>
2524
<createData entity="SimpleProduct2" stepKey="createProduct"/>
2625
<createData entity="Simple_Customer_Without_Address" stepKey="createCustomer"/>
2726
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
2827
<!--Create website, store group and store view-->
29-
<comment userInput="Create website, store group and store view" stepKey="commentCreateWebsiteStoreAndView"/>
3028
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createWebsite">
3129
<argument name="newWebsiteName" value="{{customWebsite.name}}"/>
3230
<argument name="websiteCode" value="{{customWebsite.code}}"/>
@@ -41,7 +39,6 @@
4139
<argument name="customStore" value="customStore"/>
4240
</actionGroup>
4341
<!--Enable Table Rate method and import csv file-->
44-
<comment userInput="Enable Table Rate method and import csv file" stepKey="commentEnableTableRates"/>
4542
<actionGroup ref="AdminOpenShippingMethodsConfigPageActionGroup" stepKey="openShippingMethodConfigPage"/>
4643
<actionGroup ref="AdminSwitchWebsiteActionGroup" stepKey="switchDefaultWebsite">
4744
<argument name="website" value="_defaultWebsite"/>
@@ -64,7 +61,6 @@
6461
</before>
6562
<after>
6663
<!--Delete created data-->
67-
<comment userInput="Delete created data" stepKey="commetnDeleteCreatedData"/>
6864
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
6965
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
7066
<actionGroup ref="AdminDeleteCustomerActionGroup" stepKey="deleteSecondCreatedCustomer">
@@ -76,7 +72,6 @@
7672
<actionGroup ref="logout" stepKey="logout"/>
7773
</after>
7874
<!--Assign product to custom website-->
79-
<comment userInput="Assign product to custom website" stepKey="commentAssignProductToWebsite"/>
8075
<amOnPage url="{{AdminProductEditPage.url($$createProduct.id$$)}}" stepKey="goToProductEditPage"/>
8176
<waitForPageLoad stepKey="waitForProductPageLoad"/>
8277
<actionGroup ref="unassignWebsiteFromProductActionGroup" stepKey="unassignWebsiteInProduct">
@@ -87,7 +82,6 @@
8782
</actionGroup>
8883
<actionGroup ref="saveProductForm" stepKey="saveProduct"/>
8984
<!--Assign customer to custom website-->
90-
<comment userInput="Assign customer to custom website" stepKey="commentAssignCustomerToWebsite"/>
9185
<actionGroup ref="AdminOpenCustomerEditPageActionGroup" stepKey="openCustomerEditPage">
9286
<argument name="customerId" value="$$createCustomer.id$$"/>
9387
</actionGroup>
@@ -96,7 +90,6 @@
9690
</actionGroup>
9791
<actionGroup ref="AdminSaveCustomerAndAssertSuccessMessage" stepKey="saveAndCheckSuccessMessage"/>
9892
<!--Create order-->
99-
<comment userInput="Create order" stepKey="commentCreateOrder"/>
10093
<actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="navigateToNewOrderWithExistingCustomer">
10194
<argument name="customer" value="$$createCustomer$$"/>
10295
<argument name="storeView" value="customStore"/>
@@ -109,10 +102,9 @@
109102
<argument name="address" value="US_Address_TX"/>
110103
</actionGroup>
111104
<!--Choose Best Way shipping Method-->
112-
<comment userInput="Choose Best Way shipping Method" stepKey="commentChooseShippingMethod"/>
113105
<actionGroup ref="AdminOrderSelectShippingMethodActionGroup" stepKey="chooseBestWayMethod">
114-
<argument name="methodTitle" value="Best Way"/>
115-
<argument name="methodName" value="Table Rate"/>
106+
<argument name="methodTitle" value="bestway"/>
107+
<argument name="methodName" value="tablerate"/>
116108
</actionGroup>
117109
<actionGroup ref="AdminSubmitOrderActionGroup" stepKey="submitOrder"/>
118110
</test>

0 commit comments

Comments
 (0)