Skip to content

Commit ad23daf

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

File tree

3 files changed

+31
-16
lines changed

3 files changed

+31
-16
lines changed

app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminEditCustomerInformationFromActionGroup.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,4 @@
3030
<waitForPageLoad stepKey="wait"/>
3131
<scrollToTopOfPage stepKey="scrollToTop"/>
3232
</actionGroup>
33-
<actionGroup name="AdminAssociateCustomerToCustomWebsiteActionGroup">
34-
<arguments>
35-
<argument name="websiteName" type="string" defaultValue="secondWebsite"/>
36-
</arguments>
37-
<conditionalClick selector="{{AdminCustomerAccountInformationSection.accountInformationTab}}" dependentSelector="{{AdminCustomerAccountInformationSection.associateToWebsite}}" visible="false" stepKey="goToAccountInformation"/>
38-
<selectOption selector="{{AdminCustomerAccountInformationSection.associateToWebsite}}" userInput="{{websiteName}}" stepKey="selectWebSite"/>
39-
</actionGroup>
4033
</actionGroups>

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

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
<before>
2323
<!--Create product and customer-->
2424
<createData entity="SimpleProduct2" stepKey="createProduct"/>
25-
<createData entity="Simple_Customer_Without_Address" stepKey="createCustomer"/>
2625
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
2726
<!--Create website, store group and store view-->
2827
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createWebsite">
@@ -38,6 +37,14 @@
3837
<argument name="StoreGroup" value="customStoreGroup"/>
3938
<argument name="customStore" value="customStore"/>
4039
</actionGroup>
40+
<!--Create customer associated to website-->
41+
<actionGroup ref="AdminGoCreatedWebsitePageActionGroup" stepKey="DeleteWebsite">
42+
<argument name="websiteName" value="{{customWebsite.name}}"/>
43+
</actionGroup>
44+
<grabFromCurrentUrl regex="~/website_id/(\d+)/~" stepKey="grabWebsiteIdFromURL"/>
45+
<createData entity="Simple_Customer_Without_Address" stepKey="createCustomer">
46+
<field key="website_id">$grabWebsiteIdFromURL</field>
47+
</createData>
4148
<!--Enable Table Rate method and import csv file-->
4249
<actionGroup ref="AdminOpenShippingMethodsConfigPageActionGroup" stepKey="openShippingMethodConfigPage"/>
4350
<actionGroup ref="AdminSwitchWebsiteActionGroup" stepKey="switchDefaultWebsite">
@@ -81,14 +88,6 @@
8188
<argument name="website" value="{{customWebsite.name}}"/>
8289
</actionGroup>
8390
<actionGroup ref="saveProductForm" stepKey="saveProduct"/>
84-
<!--Assign customer to custom website-->
85-
<actionGroup ref="AdminOpenCustomerEditPageActionGroup" stepKey="openCustomerEditPage">
86-
<argument name="customerId" value="$$createCustomer.id$$"/>
87-
</actionGroup>
88-
<actionGroup ref="AdminAssociateCustomerToCustomWebsiteActionGroup" stepKey="associateCustomerToWebsite">
89-
<argument name="websiteName" value="{{customWebsite.name}}"/>
90-
</actionGroup>
91-
<actionGroup ref="AdminSaveCustomerAndAssertSuccessMessage" stepKey="saveAndCheckSuccessMessage"/>
9291
<!--Create order-->
9392
<actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="navigateToNewOrderWithExistingCustomer">
9493
<argument name="customer" value="$$createCustomer$$"/>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminGoCreatedWebsitePageActionGroup">
12+
<arguments>
13+
<argument name="websiteName" type="string" defaultValue="SecondWebsite"/>
14+
</arguments>
15+
<amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnAdminSystemStorePage"/>
16+
<click selector="{{AdminStoresGridSection.resetButton}}" stepKey="resetSearchFilter"/>
17+
<fillField userInput="{{websiteName}}" selector="{{AdminStoresGridSection.websiteFilterTextField}}" stepKey="fillSearchWebsiteField"/>
18+
<click selector="{{AdminStoresGridSection.searchButton}}" stepKey="clickSearchButton"/>
19+
<see userInput="{{websiteName}}" selector="{{AdminStoresGridSection.websiteNameInFirstRow}}" stepKey="verifyThatCorrectWebsiteFound"/>
20+
<click selector="{{AdminStoresGridSection.websiteNameInFirstRow}}" stepKey="clickEditExistingStoreRow"/>
21+
<waitForPageLoad stepKey="waitForStoreToLoad"/>
22+
</actionGroup>
23+
</actionGroups>

0 commit comments

Comments
 (0)