Skip to content

Commit 0b5d2af

Browse files
committed
MQE-1174: Deliver weekly regression enablement tests
1 parent f1154d4 commit 0b5d2af

File tree

45 files changed

+1961
-131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1961
-131
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
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/testSchema.xsd">
11+
<actionGroup name="SetBundleProductAttributes">
12+
<arguments>
13+
<argument name="attributeSet" defaultValue="Default" type="string"/>
14+
<argument name="bundleProductName" defaultValue="defaultBundleProductNameAndSku" type="string"/>
15+
<argument name="bundleProductSku" defaultValue="defaultBundleProductNameAndSku" type="string"/>
16+
<argument name="price" defaultValue="10" type="string"/>
17+
<argument name="stock" defaultValue="In Stock" type="string"/>
18+
<argument name="weight" defaultValue="10" type="string"/>
19+
<argument name="visibility" defaultValue="Catalog, Search" type="string"/>
20+
<argument name="fromDate" defaultValue="10/10/2018" type="string"/>
21+
<argument name="toDate" defaultValue="10/10/2018" type="string"/>
22+
<argument name="country" defaultValue="Italy" type="string"/>
23+
</arguments>
24+
25+
<!--
26+
Pre-Reqs:
27+
1) Go to bundle product creation page
28+
2) Will not Enable/Disable
29+
-->
30+
31+
<!--Apply Attribute Set-->
32+
<click selector="{{AdminProductFormSection.attributeSet}}" stepKey="startEditAttrSet"/>
33+
<fillField selector="{{AdminProductFormSection.attributeSetFilter}}" userInput="{{attributeSet}}" stepKey="searchForAttrSet"/>
34+
<click selector="{{AdminProductFormSection.attributeSetFilterResult}}" stepKey="selectAttrSet"/>
35+
36+
<!--Product name and SKU-->
37+
<fillField selector="{{AdminProductFormBundleSection.productName}}" userInput="{{bundleProductName}}" stepKey="fillProductName"/>
38+
<fillField selector="{{AdminProductFormBundleSection.productSku}}" userInput="{{bundleProductSku}}" stepKey="fillProductSku"/>
39+
<click selector="{{AdminProductFormBundleSection.productName}}" stepKey="clickUnselectField"/>
40+
41+
<!--Dynamic SKU Toggle-->
42+
<checkOption selector="{{AdminProductFormBundleSection.dynamicSkuToggle}}" stepKey="clickOnToggle"/>
43+
<click selector="{{AdminProductFormBundleSection.productName}}" stepKey="clickUnselectFieldAgain"/>
44+
45+
<!--Dynamic Price Toggle-->
46+
<checkOption selector="{{AdminProductFormBundleSection.dynamicPriceToggle}}" stepKey="clickOnDynamicPriceToggle"/>
47+
48+
<!--Tax Class-->
49+
<selectOption selector="{{AdminProductFormBundleSection.taxClassDropDown}}" userInput="Taxable Goods" stepKey="taxClassDropDown"/>
50+
51+
<!--Fill out price-->
52+
<fillField selector="{{AdminProductFormBundleSection.priceField}}" userInput="{{price}}" stepKey="fillOutPrice"/>
53+
54+
<!--Stock status-->
55+
<selectOption selector="{{AdminProductFormBundleSection.stockStatusField}}" userInput="{{stock}}" stepKey="stockStatus"/>
56+
57+
<!--Dynamic weight-->
58+
<checkOption selector="{{AdminProductFormBundleSection.dynamicWeightToggle}}" stepKey="dynamicWeight"/>
59+
60+
<!--Weight-->
61+
<fillField selector="{{AdminProductFormBundleSection.weightField}}" userInput="{{weight}}" stepKey="fillIn"/>
62+
63+
<!--Visibilty-->
64+
<selectOption selector="{{AdminProductFormBundleSection.visibilityDropDown}}" userInput="{{visibility}}" stepKey="openVisibility"/>
65+
66+
<!--Categories-->
67+
<click selector="{{AdminProductFormBundleSection.categoriesDropDown}}" stepKey="clickOnCategoriesDropDown"/>
68+
<click selector="{{AdminProductFormBundleSection.defaultCategory}}" stepKey="selectDefaultCategory"/>
69+
<click selector="{{AdminProductFormBundleSection.categoryDone}}" stepKey="clickOnCategoriesDoneToCloseOptions"/>
70+
71+
<!--New from - to-->
72+
<fillField selector="{{AdminProductFormBundleSection.fromDate}}" userInput="{{fromDate}}" stepKey="fillInFirstDate"/>
73+
<fillField selector="{{AdminProductFormBundleSection.toDate}}" userInput="{{toDate}}" stepKey="fillInSecondDate"/>
74+
75+
<!--Country of manufacture-->
76+
<selectOption selector="{{AdminProductFormBundleSection.countryOfManufactureDropDown}}" userInput="{{country}}" stepKey="countryOfManufactureDropDown"/>
77+
78+
<!--Save the product-->
79+
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveButton"/>
80+
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="messageYouSavedTheProductIsShown"/>
81+
</actionGroup>
82+
</actionGroups>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<data key="urlKey2" unique="suffix">bundleproduct2</data>
2424
<data key="default_quantity1">10</data>
2525
<data key="default_quantity2">20</data>
26+
<data key="quantity">30</data>
2627
<data key="set">4</data>
2728
<data key="type">bundle</data>
2829
<data key="price">10</data>

app/code/Magento/Bundle/Test/Mftf/Section/AdminProductFormBundleSection.xml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@
4949
<!--NameOfProductOnProductPage-->
5050
<element name="bundleProductName" type="text" selector="//*[@id='maincontent']//span[@itemprop='name']"/>
5151
<!--EnableDisableToggle-->
52-
<element name="enableDisableToggle" type="button" selector="//*[@id='container']//input[@name='product[status]']/.." timeout="30"/>
52+
<element name="enableDisableToggle" type="checkbox" selector="//*[@id='container']//input[@name='product[status]']/.." timeout="30"/>
53+
<element name="enableDisableToggleOn" type="checkbox" selector="//*[@id='container']//input[@name='product[status]' and @value='1']/.."/>
54+
<element name="enableDisableToggleOff" type="checkbox" selector="//*[@id='container']//input[@name='product[status]' and @value='2']/.."/>
5355
<!--SearchButton-->
5456
<element name="searchButton" type="button" selector="//div[@class='data-grid-search-control-wrap']//*[@type='button']" timeout="30"/>
5557
<!--ClickOnFirstProductInCatalog-->
@@ -61,9 +63,33 @@
6163
<element name="listedBundleItem2" type="text" selector="//tr[@data-repeat-index='2']//div"/>
6264
<!--FirstProductOption-->
6365
<element name="firstProductOption" type="checkbox" selector="//div[@class='admin__data-grid-outer-wrap']//tr[@data-repeat-index='0']//input[@type='checkbox']"/>
66+
<element name="dynamicSkuToggle" type="checkbox" selector="div[data-index='sku_type'] .admin__actions-switch-label" timeout="30"/>
67+
<element name="dynamicPriceToggle" type="checkbox" selector="//div[@data-index='price_type']//div[@data-role='switcher']"/>
68+
<element name="taxClassDropDown" type="select" selector="//select[@name='product[tax_class_id]']" timeout="30"/>
69+
<element name="taxableGoodsOption" type="text" selector="//select[@name='product[tax_class_id]']//option[@data-title='Taxable Goods']"/>
70+
<element name="stockStatusField" type="select" selector="//select[@name='product[quantity_and_stock_status][is_in_stock]']"/>
71+
<element name="inStockOption" type="text" selector="//select[@name='product[quantity_and_stock_status][is_in_stock]']//option[@data-title='{{stock}}']" parameterized="true" timeout="30"/>
72+
<element name="dynamicWeightToggle" type="checkbox" selector="//div[@data-index='weight_type']//div[@data-role='switcher']" timeout="30"/>
73+
<element name="weightField" type="input" selector="//div[@data-index='weight']//input"/>
74+
<element name="categoriesDropDown" type="block" selector="//div[@data-index='category_ids']//div" timeout="30"/>
75+
<element name="defaultCategory" type="text" selector="//div[@data-index='category_ids']//span[contains(text(), 'Default Category')]"/>
76+
<element name="visibilityDropDown" type="select" selector="//select[@name='product[visibility]']"/>
77+
<element name="catalogOption1" type="text" selector="//select[@name='product[visibility]']//option[1]"/>
78+
<element name="catalogOption2" type="text" selector="//select[@name='product[visibility]']//option[2]"/>
79+
<element name="fromDate" type="input" selector="//div[@data-index='news_from_date']//input"/>
80+
<element name="toDate" type="input" selector="//div[@data-index='news_to_date']//input"/>
81+
<element name="countryOfManufactureDropDown" type="select" selector="//select[@name='product[country_of_manufacture]']"/>
82+
<element name="selectCountryOfManufacture" type="text" selector="//select[@name='product[country_of_manufacture]']//option[@data-title='{{country}}']" parameterized="true"/>
83+
<element name="dynamicSkuToggleOn" type="checkbox" selector="//div[@data-index='sku_type']//div[@data-role='switcher']//input[@value='0']"/>
84+
<element name="dynamicSkuToggleOff" type="checkbox" selector="//div[@data-index='sku_type']//div[@data-role='switcher']//input[@value='1']"/>
85+
<element name="dynamicWeightToggleOn" type="checkbox" selector="//div[@data-index='weight_type']//div[@data-role='switcher']//input[@value='0']"/>
86+
<element name="dynamicWeightToggleOff" type="checkbox" selector="//div[@data-index='weight_type']//div[@data-role='switcher']//input[@value='1']"/>
87+
<element name="categoryFieldName" type="text" selector="//fieldset[@data-index='container_category_ids']//label//span" timeout="30"/>
88+
<element name="categoryDone" type="button" selector=".admin__action-multiselect-actions-wrap [type='button'] span" timeout="30"/>
89+
<element name="dynamicPriceToggleOff" type="checkbox" selector="//div[@data-index='price_type']//div[@data-role='switcher']//input[@value='1']"/>
6490
<!--Category Selection-->
65-
<element name="categoriesDropDown" type="multiselect" selector="//div[@data-index='category_ids']//div" timeout="30"/>
66-
<element name="defaultCategory" type="multiselect" selector="//div[@data-index='category_ids']//span[contains(text(), 'Default Category')]"/>
91+
<!-- <element name="categoriesDropDown" type="multiselect" selector="//div[@data-index='category_ids']//div" timeout="30"/> -->
92+
<!-- <element name="defaultCategory" type="multiselect" selector="//div[@data-index='category_ids']//span[contains(text(), 'Default Category')]"/> -->
6793
<element name="categoryByName" type="multiselect" selector="//div[@data-index='category_ids']//span[contains(text(), '{{category}}')]" parameterized="true"/>
6894
<element name="searchForCategory" type="input" selector="div.action-menu._active > div.admin__action-multiselect-search-wrap input" timeout="30"/>
6995
<element name="selectCategory" type="multiselect" selector="//div[@class='action-menu _active']//label[@class='admin__action-multiselect-label']"/>

0 commit comments

Comments
 (0)