Skip to content

Commit 33c2552

Browse files
committed
Merge remote-tracking branch 'github-magento/MAGETWO-91617' into EPAM-PR-16
2 parents 99b1094 + 6310621 commit 33c2552

17 files changed

+240
-2
lines changed

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductActionGroup.xml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,5 +275,20 @@
275275
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="acceptStoreSwitchingMessage"/>
276276
<waitForPageLoad stepKey="waitForPageLoad"/>
277277
</actionGroup>
278-
278+
<actionGroup name="CreatedProductConnectToWebsite">
279+
<arguments>
280+
<argument name="website"/>
281+
<argument name="product"/>
282+
</arguments>
283+
<amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="navigateToProductPage"/>
284+
<waitForPageLoad stepKey="waitForProductsList"/>
285+
<click stepKey="openProduct" selector="{{AdminProductGridActionSection.productName(product.name)}}"/>
286+
<waitForPageLoad stepKey="waitForProductPage"/>
287+
<scrollTo selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="ScrollToWebsites"/>
288+
<click selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="openWebsitesList"/>
289+
<waitForPageLoad stepKey="waitForWebsitesList"/>
290+
<click selector="{{ProductInWebsitesSection.website(website.name)}}" stepKey="SelectWebsite"/>
291+
<click selector="{{AdminProductFormAdvancedPricingSection.save}}" stepKey="clickSaveProduct"/>
292+
<waitForPageLoad stepKey="waitForSave"/>
293+
</actionGroup>
279294
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminCreateCustomerWithWebsiteAndStoreViewActionGroup">
11+
<arguments>
12+
<argument name="customerData"/>
13+
<argument name="address"/>
14+
<argument name="website" type="string"/>
15+
<argument name="storeView" type="string"/>
16+
</arguments>
17+
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="goToCustomersPage"/>
18+
<click stepKey="addNewCustomer" selector="{{AdminCustomerGridMainActionsSection.addNewCustomer}}"/>
19+
<selectOption stepKey="selectWebSite" selector="{{AdminCustomerAccountInformationSection.associateToWebsite}}" userInput="{{website}}"/>
20+
<fillField stepKey="FillFirstName" selector="{{AdminCustomerAccountInformationSection.firstName}}" userInput="{{customerData.firstname}}"/>
21+
<fillField stepKey="FillLastName" selector="{{AdminCustomerAccountInformationSection.lastName}}" userInput="{{customerData.lastname}}"/>
22+
<fillField stepKey="FillEmail" selector="{{AdminCustomerAccountInformationSection.email}}" userInput="{{customerData.email}}"/>
23+
<selectOption stepKey="selectStoreView" selector="{{AdminCustomerAccountInformationSection.storeView}}" userInput="{{storeView}}"/>
24+
<scrollToTopOfPage stepKey="scrollToTopOfThePage"/>
25+
<click stepKey="goToAddresses" selector="{{AdminCustomerAccountInformationSection.addressesButton}}"/>
26+
<waitForPageLoad stepKey="waitForAddresses"/>
27+
<click stepKey="clickOnAddNewAddress" selector="{{AdminCustomerAddressesSection.addNewAddress}}"/>
28+
<waitForPageLoad stepKey="waitForAddressFields"/>
29+
<click stepKey="thickBillingAddress" selector="{{AdminCustomerAddressesSection.defaultBillingAddress}}"/>
30+
<click stepKey="thickShippingAddress" selector="{{AdminCustomerAddressesSection.defaultShippingAddress}}"/>
31+
<fillField stepKey="fillFirstNameForAddress" selector="{{AdminCustomerAddressesSection.firstNameForAddress}}" userInput="{{address.firstname}}"/>
32+
<fillField stepKey="fillLastNameForAddress" selector="{{AdminCustomerAddressesSection.lastNameForAddress}}" userInput="{{address.lastname}}"/>
33+
<fillField stepKey="fillStreetAddress" selector="{{AdminCustomerAddressesSection.streetAddress}}" userInput="{{address.street[0]}}"/>
34+
<fillField stepKey="fillCity" selector="{{AdminCustomerAddressesSection.city}}" userInput="{{address.city}}"/>
35+
<selectOption stepKey="selectCountry" selector="{{AdminCustomerAddressesSection.country}}" userInput="{{address.country}}"/>
36+
<selectOption stepKey="selectState" selector="{{AdminCustomerAddressesSection.state}}" userInput="{{address.state}}"/>
37+
<fillField stepKey="fillZip" selector="{{AdminCustomerAddressesSection.zip}}" userInput="{{address.postcode}}"/>
38+
<fillField stepKey="fillPhoneNumber" selector="{{AdminCustomerAddressesSection.phoneNumber}}" userInput="{{address.telephone}}"/>
39+
<click stepKey="save" selector="{{AdminCustomerAccountInformationSection.saveCustomer}}"/>
40+
<waitForPageLoad stepKey="waitForCustomersPage"/>
41+
<see stepKey="seeSuccessMessage" userInput="You saved the customer."/>
42+
</actionGroup>
43+
</actionGroups>
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminDeleteCustomerActionGroup">
11+
<arguments>
12+
<argument name="customerEmail"/>
13+
</arguments>
14+
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="navigateToCustomersPage"/>
15+
<click stepKey="chooseCustomer" selector="{{AdminCustomerGridMainActionsSection.customerCheckbox(customerEmail)}}"/>
16+
<click stepKey="openActions" selector="{{AdminCustomerGridMainActionsSection.actions}}"/>
17+
<waitForPageLoad stepKey="waitActions"/>
18+
<click stepKey="delete" selector="{{AdminCustomerGridMainActionsSection.delete}}"/>
19+
<waitForPageLoad stepKey="waitForConfirmationAlert"/>
20+
<click stepKey="accept" selector="{{AdminCustomerGridMainActionsSection.ok}}"/>
21+
<see stepKey="seeSuccessMessage" userInput="were deleted."/>
22+
</actionGroup>
23+
</actionGroups>

app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
<data key="default_billing">Yes</data>
6666
<data key="default_shipping">Yes</data>
6767
<requiredEntity type="region">RegionNY</requiredEntity>
68+
<data key="country">United States</data>
6869
</entity>
6970
<entity name="US_Address_CA" type="address">
7071
<data key="firstname">John</data>

app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerAccountInformationSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<element name="statusInactive" type="button" selector=".admin__actions-switch-label"/>
1313
<element name="accountInformationTitle" type="text" selector=".admin__page-nav-title"/>
1414
<element name="accountInformationButton" type="text" selector="//a/span[text()='Account Information']"/>
15+
<element name="addressesButton" type="select" selector="//a//span[contains(text(), 'Addresses')]"/>
1516
<element name="firstName" type="input" selector="input[name='customer[firstname]']"/>
1617
<element name="lastName" type="input" selector="input[name='customer[lastname]']"/>
1718
<element name="email" type="input" selector="input[name='customer[email]']"/>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminCustomerAddressesSection">
12+
<element name="addNewAddress" type="button" selector="//span[text()='Add New Addresses']"/>
13+
<element name="defaultBillingAddress" type="button" selector="//label[text()='Default Billing Address']"/>
14+
<element name="defaultShippingAddress" type="button" selector="//label[text()='Default Shipping Address']"/>
15+
<element name="firstNameForAddress" type="button" selector="//input[contains(@name, 'address')][contains(@name, 'firstname')]"/>
16+
<element name="lastNameForAddress" type="button" selector="//input[contains(@name, 'address')][contains(@name, 'lastname')]"/>
17+
<element name="streetAddress" type="button" selector="//input[contains(@name, 'street')]"/>
18+
<element name="city" type="input" selector="//input[contains(@name, 'city')]"/>
19+
<element name="country" type="select" selector="//select[contains(@name, 'country_id')]"/>
20+
<element name="state" type="select" selector="//select[contains(@name, 'address[new_0][region_id]')]"/>
21+
<element name="zip" type="input" selector="//input[contains(@name, 'postcode')]"/>
22+
<element name="phoneNumber" type="input" selector="//input[contains(@name, 'telephone')]"/>
23+
</section>
24+
</sections>

app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerGridMainActionsSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@
1313
<element name="multicheck" type="checkbox" selector="#container>div>div.admin__data-grid-wrap>table>thead>tr>th.data-grid-multicheck-cell>div>label"/>
1414
<element name="delete" type="button" selector="//*[contains(@class, 'admin__data-grid-header')]//span[contains(@class,'action-menu-item') and text()='Delete']"/>
1515
<element name="actions" type="text" selector=".action-select"/>
16+
<element name="customerCheckbox" type="button" selector="//*[contains(text(),'{{arg}}')]/parent::td/preceding-sibling::td/label[@class='data-grid-checkbox-cell-inner']//input" parameterized="true"/>
17+
<element name="ok" type="button" selector="//button[@data-role='action']//span[text()='OK']"/>
1618
</section>
1719
</sections>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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="AdminReviewOrderActionGroup">
12+
<arguments>
13+
<argument name="productName" type="string"/>
14+
</arguments>
15+
<click stepKey="openReports" selector="{{OrderedProductsSection.reports}}"/>
16+
<waitForPageLoad stepKey="waitForReports" time="5"/>
17+
<click stepKey="openOrdered" selector="{{OrderedProductsSection.ordered}}"/>
18+
<waitForPageLoad stepKey="waitForOrdersPage" time="5"/>
19+
<click stepKey="refresh" selector="{{OrderedProductsSection.refresh}}"/>
20+
<waitForPageLoad stepKey="waitForOrderList" time="5"/>
21+
<scrollTo stepKey="scrollTo" selector="{{OrderedProductsSection.total}}"/>
22+
<see stepKey="seeOrder" userInput="{{productName}}"/>
23+
</actionGroup>
24+
</actionGroups>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="OrderedProductsSection">
12+
<element name="reports" type="button" selector="//li[@data-ui-id='menu-magento-reports-report']"/>
13+
<element name="ordered" type="button" selector="//li[@data-ui-id='menu-magento-reports-report-products-sold']"/>
14+
<element name="refresh" type="button" selector="//button[@title='Refresh']" timeout="30"/>
15+
<element name="total" type="text" selector="//tfoot//th[contains(text(), 'Total')]"/>
16+
</section>
17+
</sections>

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,30 @@
287287
<see selector="{{AdminOrderItemsOrderedSection.productSkuColumn}}" userInput="{{product.sku}}" stepKey="seeSkuInItemsOrdered"/>
288288
</actionGroup>
289289

290+
<actionGroup name="CreateOrderInStoreActionGroup">
291+
<arguments>
292+
<argument name="product"/>
293+
<argument name="customer"/>
294+
<argument name="storeView"/>
295+
</arguments>
296+
<amOnPage stepKey="navigateToNewOrderPage" url="{{AdminOrderCreatePage.url}}"/>
297+
<click stepKey="chooseCustomer" selector="{{AdminOrdersGridSection.customerInOrdersSection(customer.firstname)}}"/>
298+
<waitForPageLoad stepKey="waitForStoresPageOpened"/>
299+
<click stepKey="chooseStore" selector="{{AdminOrderStoreScopeTreeSection.storeForOrder(storeView.name)}}"/>
300+
<scrollToTopOfPage stepKey="scrollToTop"/>
301+
<click selector="{{OrdersGridSection.addProducts}}" stepKey="clickOnAddProducts"/>
302+
<waitForPageLoad stepKey="waitForProductsListForOrder"/>
303+
<click selector="{{AdminOrdersGridSection.productForOrder(product.sku)}}" stepKey="chooseTheProduct"/>
304+
<click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="addSelectedProductToOrder"/>
305+
<waitForPageLoad stepKey="waitForProductAddedInOrder"/>
306+
<click selector="{{AdminInvoicePaymentShippingSection.getShippingMethodAndRates}}" stepKey="openShippingMethod"/>
307+
<waitForPageLoad stepKey="waitForShippingMethods"/>
308+
<click selector="{{AdminInvoicePaymentShippingSection.shippingMethod}}" stepKey="chooseShippingMethod"/>
309+
<waitForPageLoad stepKey="waitForShippingMethodsThickened"/>
310+
<click selector="{{OrdersGridSection.submitOrder}}" stepKey="submitOrder"/>
311+
<see stepKey="seeSuccessMessageForOrder" userInput="You created the order."/>
312+
</actionGroup>
313+
290314
<!--Cancel order that is in pending status-->
291315
<actionGroup name="cancelPendingOrder">
292316
<click selector="{{AdminOrderDetailsMainActionsSection.cancel}}" stepKey="clickCancelOrder"/>

0 commit comments

Comments
 (0)