Skip to content

Commit b4ddee9

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-90374' into 2.2-develop-mftf-pr2
# Conflicts: # app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartSummarySection.xml
2 parents 980de2a + ed3daf2 commit b4ddee9

16 files changed

+414
-1
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
11+
<!--Reset the product grid to the default view-->
12+
<actionGroup name="AdminResetProductGridToDefaultViewActionGroup">
13+
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/>
14+
<click selector="{{AdminProductGridFilterSection.viewDropdown}}" stepKey="openViewBookmarksTab"/>
15+
<waitForElementVisible selector="{{AdminProductGridFilterSection.viewBookmark('Default View')}}" time="10" stepKey="waitForViewBookmarkElementVisible"/>
16+
<click selector="{{AdminProductGridFilterSection.viewBookmark('Default View')}}" stepKey="resetToDefaultGridView"/>
17+
<see selector="{{AdminProductGridFilterSection.viewDropdown}}" userInput="Default View" stepKey="seeDefaultViewSelected"/>
18+
</actionGroup>
19+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Page/AdminProductCreatePage.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
<section name="AdminProductMessagesSection"/>
1717
<section name="AdminMessagesSection"/>
1818
<section name="AdminProductCustomizableOptionsSection" />
19+
<section name="AdminProductFormAdvancedPricingSection"/>
1920
</page>
2021
</pages>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11+
<section name="AdminProductFormAdvancedPricingSection">
12+
<element name="customerGroupPriceAddButton" type="button" selector="[data-action='add_new_row']" timeout="30"/>
13+
<element name="customerGroupPriceDeleteButton" type="button" selector="[data-action='remove_row']" timeout="30"/>
14+
<element name="advancedPricingCloseButton" type="button" selector=".product_form_product_form_advanced_pricing_modal button.action-close" timeout="30"/>
15+
<element name="productTierPriceWebsiteSelect" type="select" selector="[name='product[tier_price][{{var1}}][website_id]']" parameterized="true"/>
16+
<element name="productTierPriceCustGroupSelect" type="select" selector="[name='product[tier_price][{{var1}}][cust_group]']" parameterized="true"/>
17+
<element name="productTierPriceQtyInput" type="input" selector="[name='product[tier_price][{{var1}}][price_qty]']" parameterized="true"/>
18+
<element name="productTierPriceValueTypeSelect" type="select" selector="[name='product[tier_price][{{var1}}][value_type]']" parameterized="true"/>
19+
<element name="productTierPriceFixedPriceInput" type="input" selector="[name='product[tier_price][{{var1}}][price]']" parameterized="true"/>
20+
<element name="productTierPricePercentageValuePriceInput" type="input" selector="[name='product[tier_price][{{var1}}][percentage_value]']" parameterized="true"/>
21+
<element name="specialPrice" type="input" selector="input[name='product[special_price]']"/>
22+
<element name="doneButton" type="button" selector=".product_form_product_form_advanced_pricing_modal button.action-primary" timeout="5"/>
23+
<element name="save" type="button" selector="#save-button"/>
24+
</section>
25+
</sections>

app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<element name="productSku" type="input" selector=".admin__field[data-index=sku] input"/>
1717
<element name="productStatus" type="checkbox" selector="input[name='product[status]']"/>
1818
<element name="productPrice" type="input" selector=".admin__field[data-index=price] input"/>
19+
<element name="advancedPricingLink" type="button" selector="button[data-index='advanced_pricing_button']"/>
1920
<element name="categoriesDropdown" type="multiselect" selector="div[data-index='category_ids']"/>
2021
<element name="productQuantity" type="input" selector=".admin__field[data-index=qty] input"/>
2122
<element name="productStockStatus" type="select" selector="select[name='product[quantity_and_stock_status][is_in_stock]']"/>

app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridFilterSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@
1717
<element name="applyFilters" type="button" selector="button[data-action='grid-filter-apply']" timeout="30"/>
1818
<element name="newFromDateFilter" type="input" selector="input.admin__control-text[name='news_from_date[from]']"/>
1919
<element name="skuFilter" type="input" selector="input.admin__control-text[name='sku']"/>
20+
<element name="viewBookmark" type="button" selector="//div[contains(@class, 'admin__data-grid-action-bookmarks')]/ul/li/div/a[text() = '{{label}}']" parameterized="true" timeout="30"/>
21+
<element name="viewDropdown" type="button" selector=".admin__data-grid-action-bookmarks button.admin__action-dropdown"/>
2022
</section>
2123
</sections>

app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryProductSection.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,9 @@
2020
<element name="ProductInfoByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//div[@class='product-item-info']" parameterized="true"/>
2121
<element name="ProductAddToCompareByName" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//a[contains(@class, 'tocompare')]" parameterized="true"/>
2222
<element name="ProductImageByNameAndSrc" type="text" selector="//main//li[.//a[contains(text(), '{{var1}}')]]//img[contains(@src, '{{src}}')]" parameterized="true"/>
23+
<element name="productPriceFinal" type="text" selector="//span[@data-price-type='finalPrice']//span[@class='price'][contains(.,'{{var1}}')]" parameterized="true"/>
24+
<element name="productPriceOld" type="text" selector="//span[@data-price-type='oldPrice']//span[@class='price'][contains(., '{{var1}}')]" parameterized="true"/>
25+
<element name="productPriceLabel" type="text" selector="//span[@class='price-label'][contains(text(),'{{var1}}')]" parameterized="true"/>
26+
<element name="productPriceLinkAfterLabel" type="text" selector="//span[@class='price-label'][contains(text(),'{{var1}}')]/following::span[contains(text(), '{{var2}}')]" parameterized="true"/>
2327
</section>
2428
</sections>

app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductInfoMainSection.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<element name="productName" type="text" selector=".base"/>
1414
<element name="productSku" type="text" selector=".product.attribute.sku>.value"/>
1515
<element name="productPrice" type="text" selector=".price"/>
16+
<element name="qty" type="input" selector="#qty"/>
1617
<element name="productStockStatus" type="text" selector=".stock[title=Availability]>span"/>
1718
<element name="productDescription" type="text" selector="#description .value"/>
1819
<element name="productImageSrc" type="text" selector="//*[@id='maincontent']//div[@class='gallery-placeholder']//img[contains(@src, '{{src}}')]" parameterized="true"/>
@@ -49,5 +50,10 @@
4950
<element name="productAddToCompare" type="button" selector="a.action.tocompare"/>
5051
<element name="productOptionDropDownTitle" type="text" selector="//label[contains(.,'{{var1}}')]" parameterized="true"/>
5152
<element name="productOptionDropDownOptionTitle" type="text" selector="//label[contains(.,'{{var1}}')]/../div[@class='control']//select//option[contains(.,'{{var2}}')]" parameterized="true"/>
53+
54+
<!-- Tier price selectors -->
55+
<element name="productTierPriceByForTextLabel" type="text" selector="//ul[contains(@class, 'prices-tier')]//li[{{var1}}][contains(text(),'Buy {{var2}} for')]" parameterized="true"/>
56+
<element name="productTierPriceAmount" type="text" selector="//ul[contains(@class, 'prices-tier')]//li[{{var1}}]//span[contains(text(), '{{var2}}')]" parameterized="true"/>
57+
<element name="productTierPriceSavePercentageAmount" type="text" selector="//ul[contains(@class, 'prices-tier')]//li[{{var1}}]//span[contains(@class, 'percent')][contains(text(), '{{var2}}')]" parameterized="true"/>
5258
</section>
5359
</sections>

0 commit comments

Comments
 (0)