Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Commit cd7f153

Browse files
merge magento/2.3-qwerty into magento-qwerty/2.3-bugfixes-040219
2 parents 82125e7 + 28760f2 commit cd7f153

File tree

84 files changed

+1743
-376
lines changed

Some content is hidden

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

84 files changed

+1743
-376
lines changed

app/code/Magento/AdminNotification/view/adminhtml/layout/default.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
99
<body>
1010
<referenceContainer name="notifications">
11-
<uiComponent name="notification_area"/>
11+
<uiComponent name="notification_area" aclResource="Magento_AdminNotification::show_list"/>
1212
<block class="Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup"
1313
name="unread_system_messages"
1414
as="unread_system_messages"

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,24 @@
1919

2020
<!--Choose Master Card from drop-down list-->
2121
<switchToIFrame stepKey="switchToCardNumber" selector="{{NewOrderSection.cardFrame}}"/>
22+
<waitForElementVisible selector="{{NewOrderSection.creditCardNumber}}" stepKey="waitForFillCardNumber"/>
2223
<fillField stepKey="fillCardNumber" selector="{{NewOrderSection.creditCardNumber}}" userInput="{{PaymentAndShippingInfo.cardNumber}}"/>
23-
<waitForPageLoad stepKey="waitForFillCardNumber"/>
2424
<switchToIFrame stepKey="switchBackFromCard"/>
2525

2626
<!--Fill expire date-->
2727
<switchToIFrame stepKey="switchToExpirationMonth" selector="{{NewOrderSection.monthFrame}}"/>
28+
<waitForElementVisible selector="{{NewOrderSection.expirationMonth}}" stepKey="waitForFillMonth"/>
2829
<fillField stepKey="fillMonth" selector="{{NewOrderSection.expirationMonth}}" userInput="{{PaymentAndShippingInfo.month}}"/>
29-
<waitForPageLoad stepKey="waitForFillMonth"/>
3030
<switchToIFrame stepKey="switchBackFromMonth"/>
3131
<switchToIFrame stepKey="switchToExpirationYear" selector="{{NewOrderSection.yearFrame}}"/>
32+
<waitForElementVisible selector="{{NewOrderSection.expirationYear}}" stepKey="waitForFillYear"/>
3233
<fillField stepKey="fillYear" selector="{{NewOrderSection.expirationYear}}" userInput="{{PaymentAndShippingInfo.year}}"/>
33-
<waitForPageLoad stepKey="waitForFillYear"/>
3434
<switchToIFrame stepKey="switchBackFromYear"/>
3535

3636
<!--Fill CVW code-->
3737
<switchToIFrame stepKey="switchToCVV" selector="{{NewOrderSection.cvvFrame}}"/>
38+
<waitForElementVisible selector="{{NewOrderSection.cvv}}" stepKey="waitForFillCVV"/>
3839
<fillField stepKey="fillCVV" selector="{{NewOrderSection.cvv}}" userInput="{{PaymentAndShippingInfo.cvv}}"/>
39-
<wait stepKey="waitForFillCVV" time="1"/>
4040
<switchToIFrame stepKey="switchBackFromCVV"/>
4141
</actionGroup>
4242
</actionGroups>

app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest1.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MAGETWO-93677"/>
1919
<group value="braintree"/>
20-
<skip>
21-
<issueId value="MC-13779"/>
22-
</skip>
2320
</annotations>
2421

2522

@@ -63,21 +60,25 @@
6360
<argument name="customer" value="Simple_US_Customer"/>
6461
</actionGroup>
6562

63+
<!--Add Product to Order-->
6664
<actionGroup ref="addSimpleProductToOrder" stepKey="addProduct">
6765
<argument name="product" value="_defaultProduct"/>
6866
</actionGroup>
6967

68+
<!--Fill Order Customer Information-->
7069
<actionGroup ref="fillOrderCustomerInformation" stepKey="fillCustomerAddress">
7170
<argument name="customer" value="Simple_US_Customer"/>
7271
<argument name="address" value="US_Address_TX"/>
7372
</actionGroup>
7473

74+
<!--Select Shipping-->
7575
<actionGroup ref="orderSelectFlatRateShipping" stepKey="selectFlatRateShipping"/>
76-
7776
<waitForPageLoad stepKey="waitForShippingToFinish"/>
7877

78+
<!--Pay with Braintree -->
7979
<actionGroup ref="useBraintreeForMasterCard" stepKey="selectCardWithBraintree"/>
8080

81+
<!--Submit Order-->
8182
<click stepKey="submitOrder" selector="{{NewOrderSection.submitOrder}}"/>
8283
<waitForPageLoad stepKey="waitForSaveConfig"/>
8384
<waitForElementVisible selector="{{NewOrderSection.successMessage}}" stepKey="waitForSuccessMessage"/>

app/code/Magento/Catalog/Model/ImageExtractor.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class ImageExtractor implements TypeDataExtractorInterface
2020
* @param \DOMElement $mediaNode
2121
* @param string $mediaParentTag
2222
* @return array
23+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
2324
*/
2425
public function process(\DOMElement $mediaNode, $mediaParentTag)
2526
{
@@ -40,6 +41,12 @@ public function process(\DOMElement $mediaNode, $mediaParentTag)
4041
$nodeValue = $this->processImageBackground($attribute->nodeValue);
4142
} elseif ($attributeTagName === 'width' || $attributeTagName === 'height') {
4243
$nodeValue = (int) $attribute->nodeValue;
44+
} elseif ($attributeTagName === 'constrain'
45+
|| $attributeTagName === 'aspect_ratio'
46+
|| $attributeTagName === 'frame'
47+
|| $attributeTagName === 'transparency'
48+
) {
49+
$nodeValue = in_array($attribute->nodeValue, [true, 1, 'true', '1'], true) ?? false;
4350
} else {
4451
$nodeValue = $attribute->nodeValue;
4552
}

app/code/Magento/Catalog/Model/Product/Image/ParamsBuilder.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,7 @@ private function getWatermark(string $type): array
161161
*/
162162
private function hasDefaultFrame(): bool
163163
{
164-
return (bool) $this->viewConfig->getViewConfig()->getVarValue(
165-
'Magento_Catalog',
166-
'product_image_white_borders'
167-
);
164+
return (bool) $this->viewConfig->getViewConfig(['area' => \Magento\Framework\App\Area::AREA_FRONTEND])
165+
->getVarValue('Magento_Catalog', 'product_image_white_borders');
168166
}
169167
}

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

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@
7171
<!--Save product and see success message-->
7272
<actionGroup name="saveProductForm">
7373
<scrollToTopOfPage stepKey="scrollTopPageProduct"/>
74+
<waitForElementVisible selector="{{AdminProductFormActionSection.saveButton}}" stepKey="waitForSaveProductButton" />
7475
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveProduct"/>
76+
<waitForPageLoad stepKey="waitForProductToSave"/>
7577
<see selector="{{AdminProductMessagesSection.successMessage}}" userInput="You saved the product." stepKey="seeSaveConfirmation"/>
7678
</actionGroup>
7779

@@ -258,7 +260,7 @@
258260
<argument name="website" type="string"/>
259261
</arguments>
260262
<scrollTo selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="scrollToWebsites"/>
261-
<click selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="clickToOpenProductInWebsite"/>
263+
<conditionalClick selector="{{ProductInWebsitesSection.sectionHeader}}" dependentSelector="{{AdminProductContentSection.sectionHeaderShow}}" visible="false" stepKey="expandSection"/>
262264
<waitForPageLoad stepKey="waitForPageOpened"/>
263265
<checkOption selector="{{ProductInWebsitesSection.website(website)}}" stepKey="selectWebsite"/>
264266
</actionGroup>
@@ -328,4 +330,47 @@
328330
</assertEquals>
329331
</actionGroup>
330332

333+
<actionGroup name="expandAdminProductSection">
334+
<arguments>
335+
<argument name="sectionSelector" defaultValue="{{AdminProductContentSection.sectionHeader}}" type="string"/>
336+
<argument name="sectionDependentSelector" defaultValue="{{AdminProductContentSection.sectionHeaderShow}}" type="string"/>
337+
</arguments>
338+
<scrollToTopOfPage stepKey="scrollToTopOfPage"/>
339+
<waitForElementVisible time="30" selector="{{sectionSelector}}" stepKey="waitForSection"/>
340+
<conditionalClick selector="{{sectionSelector}}" dependentSelector="{{sectionDependentSelector}}" visible="false" stepKey="expandSection"/>
341+
<waitForPageLoad time="30" stepKey="waitForSectionToExpand"/>
342+
</actionGroup>
343+
<actionGroup name="navigateToCreatedProductEditPage">
344+
<arguments>
345+
<argument name="product" defaultValue="_defaultProduct"/>
346+
</arguments>
347+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="goToAdminProductIndexPage"/>
348+
<waitForPageLoad stepKey="waitForProductIndexPageToLoad"/>
349+
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/>
350+
<waitForPageLoad stepKey="waitForClearFilters"/>
351+
<dontSeeElement selector="{{AdminProductGridFilterSection.clearFilters}}" stepKey="dontSeeClearFilters"/>
352+
<click selector="{{AdminProductGridFilterSection.viewDropdown}}" stepKey="openViewBookmarksTab"/>
353+
<click selector="{{AdminProductGridFilterSection.viewBookmark('Default View')}}" stepKey="resetToDefaultGridView"/>
354+
<waitForPageLoad stepKey="waitForResetToDefaultView"/>
355+
<see selector="{{AdminProductGridFilterSection.viewDropdown}}" userInput="Default View" stepKey="seeDefaultViewSelected"/>
356+
<click selector="{{AdminProductGridFilterSection.filters}}" stepKey="openProductFilters"/>
357+
<fillField selector="{{AdminProductGridFilterSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillProductSkuFilter"/>
358+
<click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="clickApplyFilters"/>
359+
<waitForPageLoad stepKey="waitForFilterOnGrid"/>
360+
<click selector="{{AdminProductGridSection.selectRowBasedOnName(product.name)}}" stepKey="clickProduct"/>
361+
<waitForPageLoad stepKey="waitForProductEditPageLoad"/>
362+
<waitForElementVisible selector="{{AdminProductFormBundleSection.productSku}}" stepKey="waitForProductSKUField"/>
363+
<seeInField selector="{{AdminProductFormBundleSection.productSku}}" userInput="{{product.sku}}" stepKey="seeProductSKU"/>
364+
</actionGroup>
365+
<actionGroup name="addUpSellProductBySku" extends="addRelatedProductBySku">
366+
<click selector="{{AdminProductFormRelatedUpSellCrossSellSection.AddUpSellProductsButton}}" stepKey="clickAddRelatedProductButton"/>
367+
<conditionalClick selector="{{AdminAddUpSellProductsModalSection.Modal}} {{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminAddUpSellProductsModalSection.Modal}} {{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/>
368+
<click selector="{{AdminAddUpSellProductsModalSection.Modal}} {{AdminProductGridFilterSection.filters}}" stepKey="openProductFilters"/>
369+
<fillField selector="{{AdminAddUpSellProductsModalSection.Modal}} {{AdminProductGridFilterSection.skuFilter}}" userInput="{{sku}}" stepKey="fillProductSkuFilter"/>
370+
<click selector="{{AdminAddUpSellProductsModalSection.Modal}} {{AdminProductGridFilterSection.applyFilters}}" stepKey="clickApplyFilters"/>
371+
<waitForPageLoad stepKey="waitForPageToLoad"/>
372+
<click selector="{{AdminAddUpSellProductsModalSection.Modal}}{{AdminProductModalSlideGridSection.productGridXRowYColumnButton('1', '1')}}" stepKey="selectProduct"/>
373+
<click selector="{{AdminAddUpSellProductsModalSection.AddSelectedProductsButton}}" stepKey="addRelatedProductSelected"/>
374+
<waitForPageLoad stepKey="waitForPageToLoad1"/>
375+
</actionGroup>
331376
</actionGroups>

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,21 @@
9696
<waitForPageLoad stepKey="waitForUserInput"/>
9797
<click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="searchForAttributeFromTheGrid"/>
9898
</actionGroup>
99+
<actionGroup name="saveProductAttribute">
100+
<waitForElementVisible selector="{{AttributePropertiesSection.Save}}" stepKey="waitForSaveButton"/>
101+
<click selector="{{AttributePropertiesSection.Save}}" stepKey="clickSaveButton"/>
102+
<waitForPageLoad stepKey="waitForAttributeToSave"/>
103+
<seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSuccessMessage"/>
104+
</actionGroup>
105+
<actionGroup name="confirmChangeInputTypeModal">
106+
<waitForElementVisible selector="{{AdminEditProductAttributesSection.ProductDataMayBeLostConfirmButton}}" stepKey="waitForChangeInputTypeButton"/>
107+
<click selector="{{AdminEditProductAttributesSection.ProductDataMayBeLostConfirmButton}}" stepKey="clickChangeInputTypeButton"/>
108+
<waitForElementNotVisible selector="{{AdminEditProductAttributesSection.ProductDataMayBeLostModal}}" stepKey="waitForChangeInputTypeModalGone"/>
109+
</actionGroup>
110+
<actionGroup name="saveProductAttributeInUse">
111+
<waitForElementVisible selector="{{AttributePropertiesSection.Save}}" stepKey="waitForSaveButton"/>
112+
<click selector="{{AttributePropertiesSection.Save}}" stepKey="clickSaveButton"/>
113+
<waitForPageLoad stepKey="waitForAttributeToSave"/>
114+
<seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSuccessMessage"/>
115+
</actionGroup>
99116
</actionGroups>

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,4 +261,15 @@
261261
<waitForLoadingMaskToDisappear stepKey="waitForMaskToDisappear"/>
262262
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial2"/>
263263
</actionGroup>
264+
265+
<actionGroup name="NavigateToAndResetProductGridToDefaultView" extends="resetProductGridToDefaultView">
266+
<amOnPage url="{{AdminProductIndexPage.url}}" before="clickClearFilters" stepKey="goToAdminProductIndexPage"/>
267+
<waitForPageLoad after="goToAdminProductIndexPage" stepKey="waitForProductIndexPageToLoad"/>
268+
</actionGroup>
269+
<actionGroup name="NavigateToAndResetProductAttributeGridToDefaultView">
270+
<amOnPage url="{{AdminProductAttributeGridPage.url}}" stepKey="navigateToProductAttributeGrid"/>
271+
<waitForPageLoad stepKey="waitForPageLoad"/>
272+
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/>
273+
<waitForPageLoad stepKey="waitForGridLoad"/>
274+
</actionGroup>
264275
</actionGroups>

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,27 @@
115115
<data key="used_for_sort_by">true</data>
116116
<requiredEntity type="FrontendLabel">ProductAttributeFrontendLabel</requiredEntity>
117117
</entity>
118+
<entity name="productAttributeText" type="ProductAttribute">
119+
<data key="attribute_code" unique="suffix">attribute</data>
120+
<data key="frontend_input">text</data>
121+
<data key="scope">global</data>
122+
<data key="is_required">false</data>
123+
<data key="is_unique">false</data>
124+
<data key="is_searchable">false</data>
125+
<data key="is_visible">true</data>
126+
<data key="backend_type">text</data>
127+
<data key="is_wysiwyg_enabled">false</data>
128+
<data key="is_visible_in_advanced_search">false</data>
129+
<data key="is_visible_on_front">true</data>
130+
<data key="is_filterable">false</data>
131+
<data key="is_filterable_in_search">false</data>
132+
<data key="used_in_product_listing">false</data>
133+
<data key="is_used_for_promo_rules">false</data>
134+
<data key="is_comparable">true</data>
135+
<data key="is_used_in_grid">false</data>
136+
<data key="is_visible_in_grid">false</data>
137+
<data key="is_filterable_in_grid">false</data>
138+
<data key="used_for_sort_by">false</data>
139+
<requiredEntity type="FrontendLabel">ProductAttributeFrontendLabel</requiredEntity>
140+
</entity>
118141
</entities>

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,10 @@
1414
<data key="attributeGroupId">7</data>
1515
<data key="sortOrder">0</data>
1616
</entity>
17+
<entity name="AddToDefaultSetSortOrder1" type="ProductAttributeSet">
18+
<var key="attributeCode" entityKey="attribute_code" entityType="ProductAttribute"/>
19+
<data key="attributeSetId">4</data>
20+
<data key="attributeGroupId">7</data>
21+
<data key="sortOrder">1</data>
22+
</entity>
1723
</entities>

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,4 +708,13 @@
708708
<data key="status">1</data>
709709
<requiredEntity type="product_extension_attribute">EavStock100</requiredEntity>
710710
</entity>
711+
<entity name="ProductShortDescription" type="ProductAttribute">
712+
<data key="attribute_code">short_description</data>
713+
</entity>
714+
<entity name="AddToDefaultSetTopOfContentSection" type="ProductAttributeSet">
715+
<var key="attributeCode" entityKey="attribute_code" entityType="ProductAttribute"/>
716+
<data key="attributeSetId">4</data>
717+
<data key="attributeGroupId">13</data>
718+
<data key="sortOrder">0</data>
719+
</entity>
711720
</entities>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
<element name="AttributeDescription" type="text" selector="#description"/>
1919
<element name="ChangeAttributeDescriptionToggle" type="checkbox" selector="#toggle_description"/>
2020
<element name="Save" type="button" selector="button[title=Save]" timeout="30"/>
21+
<element name="ProductDataMayBeLostModal" type="button" selector="//aside[contains(@class,'_show')]//header[contains(.,'Product data may be lost')]"/>
22+
<element name="ProductDataMayBeLostConfirmButton" type="button" selector="//aside[contains(@class,'_show')]//button[.='Change Input Type']"/>
2123
<element name="defaultLabel" type="text" selector="//td[contains(text(), '{{attributeName}}')]/following-sibling::td[contains(@class, 'col-frontend_label')]" parameterized="true"/>
2224
</section>
2325
</sections>

app/code/Magento/Catalog/Test/Mftf/Section/AdminProductContentSection.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="AdminProductContentSection">
1212
<element name="sectionHeader" type="button" selector="div[data-index='content']" timeout="30"/>
13+
<element name="sectionHeaderShow" type="button" selector="div[data-index='content']._show" timeout="30"/>
1314
<element name="descriptionTextArea" type="textarea" selector="#product_form_description"/>
1415
<element name="shortDescriptionTextArea" type="textarea" selector="#product_form_short_description"/>
1516
<element name="sectionHeaderIfNotShowing" type="button" selector="//div[@data-index='content']//div[contains(@class, '_hide')]"/>

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

Lines changed: 5 additions & 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="AdminProductFormRelatedUpSellCrossSellSection">
1212
<element name="AddRelatedProductsButton" type="button" selector="button[data-index='button_related']" timeout="30"/>
13+
<element name="AddUpSellProductsButton" type="button" selector="button[data-index='button_upsell']" timeout="30"/>
1314
<element name="relatedProductSectionText" type="text" selector=".fieldset-wrapper.admin__fieldset-section[data-index='related']"/>
1415
<element name="upSellProductSectionText" type="text" selector=".fieldset-wrapper.admin__fieldset-section[data-index='upsell']"/>
1516
<element name="crossSellProductSectionText" type="text" selector=".fieldset-wrapper.admin__fieldset-section[data-index='crosssell']"/>
@@ -18,4 +19,8 @@
1819
<element name="selectedRelatedProduct" type="block" selector="//span[@data-index='name']"/>
1920
<element name="removeRelatedProduct" type="button" selector="//span[text()='Related Products']//..//..//..//span[text()='{{productName}}']//..//..//..//..//..//button[@class='action-delete']" parameterized="true"/>
2021
</section>
22+
<section name="AdminAddUpSellProductsModalSection">
23+
<element name="Modal" type="button" selector=".product_form_product_form_related_upsell_modal"/>
24+
<element name="AddSelectedProductsButton" type="button" selector="//aside[contains(@class, 'product_form_product_form_related_upsell_modal')]//button/span[contains(text(), 'Add Selected Products')]" timeout="30"/>
25+
</section>
2126
</sections>

0 commit comments

Comments
 (0)