Skip to content

Commit 1548d5a

Browse files
author
Alexander Akimov
authored
Merge pull request #3693 from magento-tsg/2.2-develop-mftf-pr14
[TSG] MFTF for 2.2 (pr14) (2.2-develop)
2 parents a72e4d1 + bb6c56c commit 1548d5a

File tree

38 files changed

+560
-68
lines changed

38 files changed

+560
-68
lines changed

app/code/Magento/Backend/Test/Mftf/Section/AdminMainActionsSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminMainActionsSection">
1212
<element name="save" type="button" selector="#save" timeout="30"/>
13+
<element name="saveAndContinue" type="button" selector="button[id*=save_and_]" timeout="30"/>
1314
<element name="delete" type="button" selector="#delete"/>
1415
<element name="add" type="button" selector="#add" timeout="30"/>
1516
<element name="back" type="button" selector="#back" timeout="30"/>

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,4 +226,35 @@
226226
<click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="openSeoSectionAssert"/>
227227
<seeInField userInput="{{simpleProduct.urlKey}}" selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="assertFieldUrlKey"/>
228228
</actionGroup>
229+
230+
<!--Create a Simple Product-->
231+
<actionGroup name="CreateSimpleProductAndAddToWebsite">
232+
<arguments>
233+
<argument name="product"/>
234+
<argument name="website" type="string"/>
235+
</arguments>
236+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToCatalogProductGrid"/>
237+
<click selector="{{AdminProductGridActionSection.addProductToggle}}" stepKey="clickAddProductDropdown"/>
238+
<click selector="{{AdminProductGridActionSection.addSimpleProduct}}" stepKey="clickAddSimpleProduct"/>
239+
<fillField userInput="{{product.name}}" selector="{{AdminProductFormSection.productName}}" stepKey="fillProductName"/>
240+
<fillField userInput="{{product.sku}}" selector="{{AdminProductFormSection.productSku}}" stepKey="fillProductSKU"/>
241+
<fillField userInput="{{product.price}}" selector="{{AdminProductFormSection.productPrice}}" stepKey="fillProductPrice"/>
242+
<fillField userInput="{{product.quantity}}" selector="{{AdminProductFormSection.productQuantity}}" stepKey="fillProductQuantity"/>
243+
<click selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="openProductInWebsites"/>
244+
<click selector="{{ProductInWebsitesSection.website(website)}}" stepKey="selectWebsite"/>
245+
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSave"/>
246+
<waitForPageLoad stepKey="waitForProductPageSave"/>
247+
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the product." stepKey="seeSaveConfirmation"/>
248+
</actionGroup>
249+
250+
<actionGroup name="AdminAssignProductToCategory">
251+
<arguments>
252+
<argument name="productId" type="string"/>
253+
<argument name="categoryName" type="string"/>
254+
</arguments>
255+
<amOnPage url="{{AdminProductEditPage.url(productId)}}" stepKey="amOnPage"/>
256+
<searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[{{categoryName}}]" stepKey="selectCategory"/>
257+
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickOnSaveButton"/>
258+
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the product." stepKey="seeSaveProductMessage"/>
259+
</actionGroup>
229260
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,19 @@
260260
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
261261
<requiredEntity type="custom_attribute">CustomAttributeProductAttribute</requiredEntity>
262262
</entity>
263+
<entity name="ApiSimpleTwoHidden" type="product2">
264+
<data key="sku" unique="suffix">api-simple-product-two</data>
265+
<data key="type_id">simple</data>
266+
<data key="attribute_set_id">4</data>
267+
<data key="visibility">1</data>
268+
<data key="name" unique="suffix">Api Simple Product Two</data>
269+
<data key="price">234.00</data>
270+
<data key="urlKey" unique="suffix">api-simple-product-two</data>
271+
<data key="status">1</data>
272+
<data key="quantity">100</data>
273+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
274+
<requiredEntity type="custom_attribute">CustomAttributeProductAttribute</requiredEntity>
275+
</entity>
263276
<entity name="ProductWithOptions2" type="product">
264277
<var key="sku" entityType="product" entityKey="sku" />
265278
<requiredEntity type="product_option">ProductOptionDropDownWithLongValuesTitle</requiredEntity>

app/code/Magento/Catalog/Test/Mftf/Test/AdminFilteringCategoryProductsUsingScopeSelectorTest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@
105105
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteSecondWebsite">
106106
<argument name="websiteName" value="{{SecondWebsite.name}}"/>
107107
</actionGroup>
108-
<actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearWebsitesFilters"/>
109108
<!--Clear products filter-->
110109
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
111110
<actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearProductsFilters"/>

app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
<!-- Logged in user checkout filling shipping section -->
4747
<actionGroup name="LoggedInUserCheckoutFillingShippingSectionActionGroup">
4848
<arguments>
49-
<argument name="customerVar"/>
50-
<argument name="customerAddressVar"/>
49+
<argument name="customerVar" defaultValue="CustomerEntityOne"/>
50+
<argument name="customerAddressVar" defaultValue="CustomerAddressSimple"/>
5151
</arguments>
5252
<waitForElementVisible selector="{{CheckoutShippingSection.firstName}}" stepKey="waitForFirstNameFieldAppears" time="30"/>
5353
<fillField selector="{{CheckoutShippingSection.firstName}}" userInput="{{customerVar.firstname}}" stepKey="enterFirstName"/>

app/code/Magento/Checkout/Test/Mftf/Section/StorefrontCheckoutCartSummarySection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
<element name="blockSummary" type="button" selector="#block-summary"/>
2323
<element name="discountAmount" type="text" selector="td[data-th='Discount']"/>
2424
<element name="totalsElementByPosition" type="text" selector=".data.table.totals > tbody tr:nth-of-type({{value}}) > th" parameterized="true"/>
25+
<element name="tableTotals" type="text" selector="#cart-totals .data.table.totals"/>
2526
</section>
2627
</sections>

app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMinicartSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@
2525
<element name="itemQuantity" type="input" selector="//a[text()='{{productName}}']/../..//input[contains(@class,'cart-item-qty')]" parameterized="true"/>
2626
<element name="itemQuantityUpdate" type="button" selector="//a[text()='{{productName}}']/../..//span[text()='Update']" parameterized="true"/>
2727
<element name="emptyCart" type="text" selector=".counter.qty.empty"/>
28+
<element name="minicartContent" type="block" selector="#minicart-content-wrapper"/>
2829
</section>
2930
</sections>

app/code/Magento/Cms/Test/Mftf/Page/AdminCmsBlockEditPage.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
1111
<page name="AdminCmsBlockEditPage" url="/cms/block/edit/id/{{var1}}" area="admin" module="Magento_Cms" parameterized="true">
1212
<section name="AdminCmsBlockContentSection" />
13+
<section name="AdminMediaGallerySection" />
1314
</page>
1415
</pages>

app/code/Magento/Cms/Test/Mftf/Page/StorefrontHomePage.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
-->
88

99
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
1111
<page name="StorefrontHomePage" url="/" module="Magento_Cms" area="storefront">
1212
<section name="StorefrontHeaderSection"/>
1313
<section name="StorefrontQuickSearchSection"/>
1414
<section name="StorefrontHeaderCurrencySwitcherSection"/>
15+
<section name="StorefrontCmsPageSection"/>
1516
</page>
1617
</pages>
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="AdminMediaGallerySection">
12+
<element name="imageSelected" type="text" selector="//small[text()='{{imageName}}']/parent::*[@class='filecnt selected']" parameterized="true"/>
13+
<element name="uploadImage" type="file" selector="input.fileupload" />
14+
<element name="insertFile" type="text" selector="#insert_files"/>
15+
<element name="imageBlockByName" type="block" selector="//div[@data-row='file'][contains(., '{{imageName}}')]" parameterized="true"/>
16+
</section>
17+
</sections>

0 commit comments

Comments
 (0)