Skip to content

Commit ffbed00

Browse files
[EngCom] Public Pull Requests - 2.2-develop
- merged latest code from mainline branch
2 parents 409c019 + 5cda5e0 commit ffbed00

File tree

35 files changed

+685
-248
lines changed

35 files changed

+685
-248
lines changed

app/code/Magento/Braintree/Test/Mftf/ActionGroup/AdminOrderFillBraintreeCreditCardActionGroup.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,18 @@
1818
<!--Fill card number-->
1919
<switchToIFrame selector="{{AdminOrderFormPaymentSection.braintreeCcFrame}}" stepKey="switchToCcIFrame"/>
2020
<fillField selector="{{AdminOrderFormPaymentSection.braintreeCardNumber}}" userInput="{{cardData.card_number}}" stepKey="fillCardNumber"/>
21-
<waitForPageLoad stepKey="waitForFillCardNumber" time="1"/>
2221
<switchToIFrame stepKey="switchToDefaultContext1"/>
2322
<!--Fill card expiration month-->
2423
<switchToIFrame selector="{{AdminOrderFormPaymentSection.braintreeCcExpMonthFrame}}" stepKey="switchToCcExpMonthIFrame"/>
2524
<fillField selector="{{AdminOrderFormPaymentSection.braintreeExpMonth}}" userInput="{{cardData.exp_month}}" stepKey="fillExpMonth"/>
26-
<waitForPageLoad stepKey="waitForFillCardExpMonth" time="1"/>
2725
<switchToIFrame stepKey="switchToDefaultContext2"/>
2826
<!--Fill card expiration year-->
2927
<switchToIFrame selector="{{AdminOrderFormPaymentSection.braintreeCcExpYear}}" stepKey="switchToCcExpYearIFrame"/>
3028
<fillField selector="{{AdminOrderFormPaymentSection.braintreeExpYear}}" userInput="{{cardData.exp_year}}" stepKey="fillExpYear"/>
31-
<waitForPageLoad stepKey="waitForFillCardExpYear" time="1"/>
3229
<switchToIFrame stepKey="switchToDefaultContext3"/>
3330
<!--Fill card CVV-->
3431
<switchToIFrame selector="{{AdminOrderFormPaymentSection.braintreeCvvFrame}}" stepKey="switchToCvvIFrame"/>
3532
<fillField selector="{{AdminOrderFormPaymentSection.braintreeCvv}}" userInput="{{cardData.cvv}}" stepKey="fillCvv"/>
36-
<waitForPageLoad stepKey="waitForFillCardCvv" time="1"/>
3733
<switchToIFrame stepKey="switchToDefaultContext4"/>
3834
</actionGroup>
3935
</actionGroups>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
<click selector="{{AdminProductGridSection.bulkActionDropdown}}" stepKey="clickActionDropdown"/>
7272
<click selector="{{AdminProductGridSection.bulkActionOption('Change status')}}" stepKey="clickChangeStatusAction"/>
7373
<click selector="{{AdminProductGridSection.changeStatus('status')}}" stepKey="clickChangeStatusDisabled" parameterized="true"/>
74+
<waitForPageLoad stepKey="waitForStatusToBeChanged"/>
7475
<see selector="{{AdminMessagesSection.success}}" userInput="A total of 1 record(s) have been updated." stepKey="seeSuccessMessage"/>
7576
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial2"/>
7677
</actionGroup>

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

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

99
<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">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminCategoryBasicFieldSection">
1212
<element name="IncludeInMenu" type="checkbox" selector="input[name='include_in_menu']"/>
1313
<element name="includeInMenuLabel" type="text" selector="input[name='include_in_menu']+label"/>
@@ -17,6 +17,9 @@
1717
<element name="enableUseDefault" type="checkbox" selector="input[name='use_default[is_active]']"/>
1818
<element name="CategoryNameInput" type="input" selector="input[name='name']"/>
1919
<element name="categoryNameUseDefault" type="checkbox" selector="input[name='use_default[name]']"/>
20+
<element name="requiredFieldIndicator" type="text" selector=" return window.getComputedStyle(document.querySelector('._required[data-index=name]&gt;.admin__field-label span'), ':after').getPropertyValue('content');"/>
21+
<element name="requiredFieldIndicatorColor" type="text" selector=" return window.getComputedStyle(document.querySelector('._required[data-index=name]&gt;.admin__field-label span'), ':after').getPropertyValue('color');"/>
22+
<element name="panelFieldControl" type="input" selector='//aside//div[@data-index="{{arg1}}"]/descendant::*[@name="{{arg2}}"]' parameterized="true"/>
2023
</section>
2124
<section name="CatalogWYSIWYGSection">
2225
<element name="ShowHideBtn" type="button" selector="#togglecategory_form_description"/>

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

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

99
<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">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminProductFormSection">
1212
<element name="attributeSet" type="select" selector="div[data-index='attribute_set_id'] .admin__field-control"/>
1313
<element name="attributeSetFilter" type="input" selector="div[data-index='attribute_set_id'] .admin__field-control input"/>
@@ -38,6 +38,8 @@
3838
<element name="addAttributeBtn" type="button" selector="#addAttribute"/>
3939
<element name="attributeSetFilterResultByName" type="text" selector="//label/span[text() = '{{var}}']" timeout="30" parameterized="true"/>
4040
<element name="attributeSetDropDown" type="select" selector="div[data-index='attribute_set_id'] .action-select.admin__action-multiselect"/>
41+
<element name="requiredNameIndicator" type="text" selector=" return window.getComputedStyle(document.querySelector('._required[data-index=name]&gt;.admin__field-label span'), ':after').getPropertyValue('content');"/>
42+
<element name="requiredSkuIndicator" type="text" selector=" return window.getComputedStyle(document.querySelector('._required[data-index=sku]&gt;.admin__field-label span'), ':after').getPropertyValue('content');"/>
4143
</section>
4244
<section name="ProductInWebsitesSection">
4345
<element name="sectionHeader" type="button" selector="div[data-index='websites']" timeout="30"/>

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

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<tests 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">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
1111
<test name="AdminFilteringCategoryProductsUsingScopeSelectorTest">
1212
<annotations>
1313
<features value="Catalog"/>
@@ -19,19 +19,19 @@
1919
</annotations>
2020
<before>
2121
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
22-
<!--Create website, Sore adn Store View-->
23-
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="adminCreateWebsite">
24-
<argument name="newWebsiteName" value="secondWebsite"/>
25-
<argument name="websiteCode" value="second_website"/>
22+
<!--Create website, Sore and Store View-->
23+
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createSecondWebsite">
24+
<argument name="newWebsiteName" value="{{SecondWebsite.name}}"/>
25+
<argument name="websiteCode" value="{{SecondWebsite.code}}"/>
2626
</actionGroup>
27-
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="adminCreateStore">
28-
<argument name="website" value="secondWebsite"/>
29-
<argument name="storeGroupName" value="Second Store"/>
30-
<argument name="storeGroupCode" value="second_store"/>
27+
<actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createSecondStoreGroup">
28+
<argument name="website" value="{{SecondWebsite.name}}"/>
29+
<argument name="storeGroupName" value="{{SecondStoreGroupUnique.name}}"/>
30+
<argument name="storeGroupCode" value="{{SecondStoreGroupUnique.code}}"/>
3131
</actionGroup>
32-
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="adminCreateStoreView">
33-
<argument name="storeGroup" value="secondStoreGroup"/>
34-
<argument name="customStore" value="secondStore"/>
32+
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createSecondStoreView">
33+
<argument name="storeGroup" value="SecondStoreGroupUnique"/>
34+
<argument name="customStore" value="SecondStoreUnique"/>
3535
</actionGroup>
3636

3737
<!--Create Simple Product and Category -->
@@ -74,7 +74,7 @@
7474
<waitForPageLoad time="30" stepKey="waitForProductEditOpen1"/>
7575

7676
<actionGroup ref="SelectProductInWebsitesActionGroup" stepKey="selectProductInWebsites">
77-
<argument name="website" value="secondWebsite"/>
77+
<argument name="website" value="{{SecondWebsite.name}}"/>
7878
</actionGroup>
7979
<uncheckOption selector="{{ProductInWebsitesSection.website('Main Website')}}" stepKey="uncheckWebsite1"/>
8080
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct1"/>
@@ -89,22 +89,27 @@
8989
<waitForPageLoad time="30" stepKey="waitForProductEditOpen2"/>
9090

9191
<actionGroup ref="SelectProductInWebsitesActionGroup" stepKey="selectProductInWebsites1">
92-
<argument name="website" value="secondWebsite"/>
92+
<argument name="website" value="{{SecondWebsite.name}}"/>
9393
</actionGroup>
9494
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct2"/>
9595
<see selector="{{AdminProductMessagesSection.successMessage}}" userInput="You saved the product."
9696
stepKey="seeSuccessMessage2"/>
9797
</before>
9898
<after>
99-
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite">
100-
<argument name="websiteName" value="secondWebsite"/>
101-
</actionGroup>
102-
<actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearProductFilters"/>
10399
<deleteData createDataKey="createProduct0" stepKey="deleteProduct"/>
104100
<deleteData createDataKey="createProduct1" stepKey="deleteProduct1"/>
105101
<deleteData createDataKey="createProduct2" stepKey="deleteProduct2"/>
106102
<deleteData createDataKey="createProduct12" stepKey="deleteProduct3"/>
107103
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
104+
<!--Delete website-->
105+
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteSecondWebsite">
106+
<argument name="websiteName" value="{{SecondWebsite.name}}"/>
107+
</actionGroup>
108+
<actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearWebsitesFilters"/>
109+
<!--Clear products filter-->
110+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
111+
<actionGroup ref="clearFiltersAdminDataGrid" stepKey="clearProductsFilters"/>
112+
108113
<actionGroup ref="logout" stepKey="logout"/>
109114
</after>
110115
<!-- Step 1-2: Open Category page and Set scope selector to All Store Views-->
@@ -156,7 +161,7 @@
156161
<click selector="{{AdminCategoryMainActionsSection.categoryStoreViewDropdownToggle}}"
157162
stepKey="clickStoresList1"/>
158163
<waitForPageLoad stepKey="waitForCategoryPageLoad3"/>
159-
<click selector="{{AdminCategoryMainActionsSection.categoryStoreViewOption(secondStore.name)}}"
164+
<click selector="{{AdminCategoryMainActionsSection.categoryStoreViewOption(SecondStoreUnique.name)}}"
160165
stepKey="clickStoreView1"/>
161166
<waitForElementVisible selector="{{AdminCategoryMainActionsSection.categoryStoreViewModalAccept}}"
162167
stepKey="waitForPopup2"/>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminRequiredFieldsHaveRequiredFieldIndicatorTest">
11+
<annotations>
12+
<stories value="MAGETWO-73342: Clicking on area around the label of a toggle element results in the element's state being changed"/>
13+
<title value="Required fields should have the required asterisk indicator "/>
14+
<description value="Verify that Required fields should have the required indicator icon next to the field name"/>
15+
<severity value="MAJOR"/>
16+
<testCaseId value="MAGETWO-97037"/>
17+
<group value="catalog"/>
18+
<group value="cms"/>
19+
</annotations>
20+
<before>
21+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
22+
</before>
23+
<after>
24+
<actionGroup ref="logout" stepKey="logoutFromAdmin"/>
25+
</after>
26+
27+
<amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPage"/>
28+
<click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategory"/>
29+
30+
<!-- Verify that the Category Name field has the required field name indicator -->
31+
<executeJS function="{{AdminCategoryBasicFieldSection.requiredFieldIndicator}}" stepKey="getRequiredFieldIndicator"/>
32+
<assertEquals expected='"*"' expectedType="string" actualType="variable" actual="getRequiredFieldIndicator" stepKey="assertRequiredFieldIndicator"/>
33+
34+
<executeJS function="{{AdminCategoryBasicFieldSection.requiredFieldIndicatorColor}}" stepKey="getRequiredFieldIndicatorColor"/>
35+
<assertEquals expected="rgb(226, 38, 38)" expectedType="string" actualType="variable" actual="getRequiredFieldIndicatorColor" stepKey="assertRequiredFieldIndicator1"/>
36+
37+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndexPage"/>
38+
<click selector="{{AdminProductGridActionSection.addProductToggle}}" stepKey="addProductDropdown"/>
39+
<click selector="{{AdminProductGridActionSection.addSimpleProduct}}" stepKey="addSimpleProduct"/>
40+
41+
<!-- Verify that the Product Name and Sku fields have the required field name indicator -->
42+
<executeJS function="{{AdminProductFormSection.requiredNameIndicator}}" stepKey="productNameRequiredFieldIndicator"/>
43+
<assertEquals expected='"*"' expectedType="string" actualType="variable" actual="productNameRequiredFieldIndicator" stepKey="assertRequiredFieldIndicator2"/>
44+
<executeJS function="{{AdminProductFormSection.requiredSkuIndicator}}" stepKey="productSkuRequiredFieldIndicator"/>
45+
<assertEquals expected='"*"' expectedType="string" actualType="variable" actual="productSkuRequiredFieldIndicator" stepKey="assertRequiredFieldIndicator3"/>
46+
47+
<!-- Verify that the CMS page have the required field name indicator next to Page Title -->
48+
<amOnPage url="{{CmsPagesPage.url}}" stepKey="amOnPagePagesGrid"/>
49+
<click selector="{{CmsPagesPageActionsSection.addNewPage}}" stepKey="clickAddNewPage"/>
50+
<executeJS function="{{CmsNewPagePageBasicFieldsSection.requiredFieldIndicator}}" stepKey="pageTitleRequiredFieldIndicator"/>
51+
<assertEquals expected='"*"' expectedType="string" actualType="variable" actual="pageTitleRequiredFieldIndicator" stepKey="assertRequiredFieldIndicator4"/>
52+
</test>
53+
</tests>

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,9 @@
155155
<!--Create new order-->
156156
<actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="startToCreateNewOrder">
157157
<argument name="customer" value="$$createCustomer$$"/>
158+
<argument name="storeView" value="SecondStoreUnique"/>
158159
</actionGroup>
159-
<click selector="{{AdminOrderFormSelectWebsiteSection.website(SecondStoreUnique.name)}}" stepKey="selectStore"/>
160-
<waitForPageLoad stepKey="waitForPageOpened"/>
161-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
160+
162161
<click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickToAddProduct"/>
163162
<waitForPageLoad stepKey="waitForProductsOpened"/>
164163
<!--TEST CASE #1-->

app/code/Magento/CatalogImportExport/Model/Export/Product.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,10 @@ protected function isValidAttributeValue($code, $value)
11611161
$isValid = false;
11621162
}
11631163

1164+
if (is_array($value)) {
1165+
$isValid = false;
1166+
}
1167+
11641168
return $isValid;
11651169
}
11661170

app/code/Magento/CatalogImportExport/Model/Import/Product.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,8 +1579,12 @@ protected function _saveProducts()
15791579
continue;
15801580
}
15811581
if ($this->getErrorAggregator()->hasToBeTerminated()) {
1582-
$this->getErrorAggregator()->addRowToSkip($rowNum);
1583-
continue;
1582+
if (ProcessingErrorAggregatorInterface::VALIDATION_STRATEGY_SKIP_ERRORS
1583+
!== $this->_parameters[Import::FIELD_NAME_VALIDATION_STRATEGY]
1584+
) {
1585+
$this->getErrorAggregator()->addRowToSkip($rowNum);
1586+
continue;
1587+
}
15841588
}
15851589
$rowScope = $this->getRowScope($rowData);
15861590

app/code/Magento/Cms/Test/Mftf/Section/CmsNewPagePageBasicFieldsSection.xml

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

99
<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">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="CmsNewPagePageBasicFieldsSection">
1212
<element name="pageTitle" type="input" selector="input[name=title]"/>
13+
<element name="requiredFieldIndicator" type="text" selector=" return window.getComputedStyle(document.querySelector('._required[data-index=title]&gt;.admin__field-label span'), ':after').getPropertyValue('content');"/>
1314
</section>
1415
</sections>

0 commit comments

Comments
 (0)