Skip to content

Commit 296e2ff

Browse files
committed
Merge remote-tracking branch 'origin/2.2-develop' into 2.2-develop-mftf-pr5
2 parents ed80dd3 + c8c2791 commit 296e2ff

File tree

77 files changed

+1291
-210
lines changed

Some content is hidden

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

77 files changed

+1291
-210
lines changed

app/code/Magento/Bundle/Test/Mftf/ActionGroup/BundleProductsOnAdminActionGroup.xml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
<actionGroup name="CreateBundleProductForTwoSimpleProducts">
1212
<arguments>
1313
<argument name="bundleProduct"/>
14+
<argument name="simpleProductFirst"/>
15+
<argument name="simpleProductSecond"/>
1416
</arguments>
1517
<fillField userInput="{{bundleProduct.sku}}" selector="{{AdminProductFormSection.productSku}}" stepKey="fillProductSku"/>
1618
<fillField userInput="{{bundleProduct.name}}" selector="{{AdminProductFormSection.productName}}" stepKey="fillProductName"/>
@@ -19,7 +21,22 @@
1921
<click selector="{{AdminProductFormBundleSection.AddOption}}" stepKey="clickAddOptionButton"/>
2022
<fillField userInput="{{bundleProduct.option_title}}" selector="{{AdminProductFormBundleSection.OptionTitle}}" stepKey="fillOptionTitle"/>
2123
<click selector="{{AdminProductFormBundleSection.AddProductsToOption}}" stepKey="clickAddProductsToOption"/>
22-
<click selector="{{AdminProductFormBundleSection.selectAll}}" stepKey="tickSelectAllCheckbox"/>
24+
25+
<!-- Select First Simple -->
26+
<click selector="{{AdminProductGridFilterSection.filters}}" stepKey="clickOnFiltersButton"/>
27+
<conditionalClick selector="{{AdminProductGridFilterSection.clearAll}}" dependentSelector="{{AdminProductGridFilterSection.clearAll}}" visible="true" stepKey="clearFilters"/>
28+
<fillField selector="{{AdminProductGridFilterSection.name}}" userInput="{{simpleProductFirst.name}}" stepKey="fillNameFilter"/>
29+
<click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="applyFilters"/>
30+
<click selector="{{AdminProductFormBundleSection.firstRowCheckbox}}" stepKey="selectFirstSimple"/>
31+
32+
<!-- Select Second Simple -->
33+
<click selector="{{AdminProductGridFilterSection.filters}}" stepKey="clickOnFiltersButton2"/>
34+
<conditionalClick selector="{{AdminProductGridFilterSection.clearAll}}" dependentSelector="{{AdminProductGridFilterSection.clearAll}}" visible="true" stepKey="clearFilters2"/>
35+
<fillField selector="{{AdminProductGridFilterSection.name}}" userInput="{{simpleProductSecond.name}}" stepKey="fillNameFilter2"/>
36+
<click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="applyFilters2"/>
37+
<click selector="{{AdminProductFormBundleSection.firstRowCheckbox}}" stepKey="selectSecondSimple"/>
38+
39+
<!-- Add Selected Simples To Bundle -->
2340
<click selector="{{AdminProductFormBundleSection.AddSelectedProducts}}" stepKey="clickAddSelectedProductsButton"/>
2441
<fillField userInput="{{bundleProduct.default_quantity1}}" selector="{{AdminProductFormBundleSection.DefaultQuantity1}}" stepKey="fillDefaultQuantityForFirstProduct"/>
2542
<fillField userInput="{{bundleProduct.default_quantity2}}" selector="{{AdminProductFormBundleSection.DefaultQuantity2}}" stepKey="fillDefaultQuantityForSecondProduct"/>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@
2020
<!--Add Products to Option-->
2121
<element name="selectAll" type="input" selector="//label[@data-bind='attr: {for: ko.uid}']"/>
2222
<element name="AddSelectedProducts" type="button" selector="//span[contains(text(),'Add Selected Products')]/ancestor::button" timeout="30"/>
23+
<element name="firstRowCheckbox" type="checkbox" selector="tr.data-row:nth-of-type(1) input.admin__control-checkbox[data-action='select-row']"/>
2324
</section>
2425
</sections>

app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateBundleProductTest.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
<before>
2222
<createData entity="_defaultCategory" stepKey="createPreReqCategory"/>
2323
<createData entity="SimpleProduct" stepKey="createPreReqSimpleProduct1">
24-
<requiredEntity createDataKey="createPreReqCategory"/>
24+
<requiredEntity createDataKey="createPreReqCategory"/>
2525
</createData>
2626
<createData entity="SimpleProduct2" stepKey="createPreReqSimpleProduct2">
27-
<requiredEntity createDataKey="createPreReqCategory"/>
27+
<requiredEntity createDataKey="createPreReqCategory"/>
2828
</createData>
2929
</before>
3030
<after>
@@ -45,6 +45,8 @@
4545
<!--Step4. Fill in all data according to data set-->
4646
<actionGroup ref="CreateBundleProductForTwoSimpleProducts" stepKey="CreateBundleProductForTwoSimpleProducts">
4747
<argument name="bundleProduct" value="BundleProduct"/>
48+
<argument name="simpleProductFirst" value="$$createPreReqSimpleProduct1$$"/>
49+
<argument name="simpleProductSecond" value="$$createPreReqSimpleProduct2$$"/>
4850
</actionGroup>
4951

5052
<!--Step5. Save product-->

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontEditBundleProductTest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
</annotations>
2121
<before>
2222
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
23+
<createData entity="DefaultTaxConfig" stepKey="defaultTaxConfiguration"/>
24+
<createData entity="WeeeConfigDisable" stepKey="disableFPT"/>
2325
<createData entity="SimpleProduct3" stepKey="simpleProduct1"/>
2426
<createData entity="SimpleProduct3" stepKey="simpleProduct2"/>
2527
</before>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<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">
11+
<page name="AdminCategoryProductAttributeEditPage" url="catalog/product_attribute/edit/" area="admin" module="Magento_Catalog">
12+
<section name="AdminProductAttributeEditSection"/>
13+
<section name="AdminConfirmationModalSection"/>
14+
</page>
15+
</pages>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
<section name="ProductInWebsitesSection">
3838
<element name="sectionHeader" type="button" selector="div[data-index='websites']" timeout="30"/>
3939
<element name="website" type="checkbox" selector="//label[contains(text(), '{{var1}}')]/parent::div//input[@type='checkbox']" parameterized="true"/>
40+
<element name="isWebsiteDisabled" type="checkbox" selector="//label[contains(text(), '{{websiteName}}')]/parent::div//input[@type='checkbox' and @disabled]" parameterized="true"/>
4041
</section>
4142
<section name="ProductWYSIWYGSection">
4243
<element name="Switcher" type="button" selector="//select[@id='dropdown-switcher']"/>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +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="name" type="input" selector="input.admin__control-text[name='name']"/>
2021
<element name="viewBookmark" type="button" selector="//div[contains(@class, 'admin__data-grid-action-bookmarks')]/ul/li/div/a[text() = '{{label}}']" parameterized="true" timeout="30"/>
2122
<element name="viewDropdown" type="button" selector=".admin__data-grid-action-bookmarks button.admin__action-dropdown"/>
2223
<element name="name" type="input" selector="input.admin__control-text[name='name']"/>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
<element name="firstRow" type="button" selector="tr.data-row:nth-of-type(1)"/>
2222
<element name="productGridXRowYColumnButton" type="input" selector="table.data-grid tr.data-row:nth-child({{row}}) td:nth-child({{column}})" parameterized="true" timeout="30"/>
2323
<element name="productNameInNameColumn" type="input" selector="//td[4]/div[@class='data-grid-cell-content']"/>
24-
<element name="checkbox" type="checkbox" selector="//div[contains(text(),'{{product}}')]/ancestor::tr[@class='data-row']//input[@class='admin__control-checkbox']" parameterized="true" />
24+
<element name="checkbox" type="checkbox" selector="//div[contains(text(),'{{product}}')]/ancestor::tr[contains(@class, 'data-row')]//input[@class='admin__control-checkbox']" parameterized="true" />
25+
<element name="firstRowCheckbox" type="checkbox" selector="tr.data-row:nth-of-type(1) input.admin__control-checkbox"/>
2526
<element name="bulkActionOption" type="button" selector="//div[contains(@class,'admin__data-grid-header-row') and contains(@class, 'row')]//div[contains(@class, 'action-select-wrap')]//ul/li/span[text() = '{{label}}']" parameterized="true"/>
2627
<element name="productGridNameProduct" type="input" selector="//tbody//tr//td//div[contains(., '{{var1}}')]" parameterized="true" timeout="30"/>
2728
<element name="adminImgGridThumbnail" type="text" selector="img.admin__control-thumbnail[src*='/{{var1}}']" parameterized="true"/>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
<waitForPageLoad time="30" stepKey="waitForProductsGridPageLoad"/>
4444
<click selector="{{AdminProductGridActionSection.addProductToggle}}" stepKey="clickAddProductDropdown"/>
4545
<click selector="{{AdminProductGridActionSection.addSimpleProduct}}" stepKey="clickAddSimpleProduct"/>
46+
<!-- Need to wait because fields are loaded a little bit later then it starts to fill them -->
47+
<waitForElementVisible selector="{{AdminProductFormSection.productName}}" stepKey="waitForNameFieldVisible"/>
4648
<fillField userInput="{{_defaultProduct.name}}" selector="{{AdminProductFormSection.productName}}" stepKey="fillProductName"/>
4749
<fillField userInput="{{_defaultProduct.sku}}" selector="{{AdminProductFormSection.productSku}}" stepKey="fillProductSKU"/>
4850
<fillField userInput="{{_defaultProduct.price}}" selector="{{AdminProductFormSection.productPrice}}" stepKey="fillProductPrice"/>
@@ -56,9 +58,12 @@
5658
<seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSaveProductMessage"/>
5759

5860
<!-- switch to the second store view -->
61+
<scrollToTopOfPage stepKey="scrollToPageTopToSeeStoreSwitcher"/>
5962
<click selector="{{AdminProductFormActionSection.changeStoreButton}}" stepKey="clickStoreviewSwitcher"/>
6063
<click selector="{{AdminProductFormActionSection.selectStoreView('Second Store View')}}" stepKey="chooseStoreView"/>
6164
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="acceptStoreSwitchingMessage"/>
65+
<scrollToTopOfPage stepKey="scrollToPageTopToSeeStoreSwitcher2"/>
66+
<waitForElementVisible selector="{{AdminMainActionsSection.storeSwitcher}}" stepKey="waitForStoreSwitcherToBeVisible"/>
6267
<see userInput="Second Store View" selector="{{AdminMainActionsSection.storeSwitcher}}" stepKey="seeNewStoreViewName"/>
6368

6469
<!-- Check if Use Default Value checkboxes are checked -->

app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/AbstractModifierTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ protected function setUp()
6363
'getAttributes',
6464
'getStore',
6565
'getAttributeDefaultValue',
66-
'getExistsStoreValueFlag'
66+
'getExistsStoreValueFlag',
67+
'isLockedAttribute'
6768
])->getMockForAbstractClass();
6869
$this->storeMock = $this->getMockBuilder(StoreInterface::class)
6970
->setMethods(['load', 'getId', 'getConfig'])
@@ -81,9 +82,6 @@ protected function setUp()
8182
$this->arrayManagerMock->expects($this->any())
8283
->method('set')
8384
->willReturnArgument(1);
84-
$this->arrayManagerMock->expects($this->any())
85-
->method('merge')
86-
->willReturnArgument(1);
8785
$this->arrayManagerMock->expects($this->any())
8886
->method('remove')
8987
->willReturnArgument(1);

0 commit comments

Comments
 (0)