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

Commit a4c3703

Browse files
authored
Merge pull request #3709 from magento-arcticfoxes/pr
[arcticfoxes] 2.3.1-PR
2 parents 88d0413 + 4019888 commit a4c3703

File tree

65 files changed

+1523
-370
lines changed

Some content is hidden

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

65 files changed

+1523
-370
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/Unit/Model/_files/converted_view.php

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,41 @@
1111
"type" => "swatch_thumb",
1212
"width" => 75,
1313
"height" => 75,
14-
"background" => [255, 25, 2]
14+
"constrain" => false,
15+
"aspect_ratio" => false,
16+
"frame" => false,
17+
"transparency" => false,
18+
"background" => [255, 25, 2],
19+
],
20+
"swatch_thumb_medium" => [
21+
"type" => "swatch_medium",
22+
"width" => 750,
23+
"height" => 750,
24+
"constrain" => true,
25+
"aspect_ratio" => true,
26+
"frame" => true,
27+
"transparency" => true,
28+
"background" => [255, 25, 2],
29+
],
30+
"swatch_thumb_large" => [
31+
"type" => "swatch_large",
32+
"width" => 1080,
33+
"height" => 720,
34+
"constrain" => false,
35+
"aspect_ratio" => false,
36+
"frame" => false,
37+
"transparency" => false,
38+
"background" => [255, 25, 2],
39+
],
40+
"swatch_thumb_small" => [
41+
"type" => "swatch_small",
42+
"width" => 100,
43+
"height" => 100,
44+
"constrain" => true,
45+
"aspect_ratio" => true,
46+
"frame" => true,
47+
"transparency" => true,
48+
"background" => [255, 25, 2],
1549
]
1650
]
1751
]

app/code/Magento/Catalog/Test/Unit/Model/_files/valid_view.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,37 @@
1111
<image id="swatch_thumb_base" type="swatch_thumb">
1212
<width>75</width>
1313
<height>75</height>
14+
<constrain>false</constrain>
15+
<aspect_ratio>false</aspect_ratio>
16+
<frame>false</frame>
17+
<transparency>false</transparency>
18+
<background>[255, 25, 2]</background>
19+
</image>
20+
<image id="swatch_thumb_medium" type="swatch_medium">
21+
<width>750</width>
22+
<height>750</height>
23+
<constrain>true</constrain>
24+
<aspect_ratio>true</aspect_ratio>
25+
<frame>true</frame>
26+
<transparency>true</transparency>
27+
<background>[255, 25, 2]</background>
28+
</image>
29+
<image id="swatch_thumb_large" type="swatch_large">
30+
<width>1080</width>
31+
<height>720</height>
32+
<constrain>0</constrain>
33+
<aspect_ratio>0</aspect_ratio>
34+
<frame>0</frame>
35+
<transparency>0</transparency>
36+
<background>[255, 25, 2]</background>
37+
</image>
38+
<image id="swatch_thumb_small" type="swatch_small">
39+
<width>100</width>
40+
<height>100</height>
41+
<constrain>1</constrain>
42+
<aspect_ratio>1</aspect_ratio>
43+
<frame>1</frame>
44+
<transparency>1</transparency>
1445
<background>[255, 25, 2]</background>
1546
</image>
1647
</images>

app/code/Magento/CatalogWidget/Block/Product/ProductsList.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ public function createCollection()
309309

310310
$collection = $this->_addProductAttributesAndPrices($collection)
311311
->addStoreFilter()
312+
->addAttributeToSort('created_at', 'desc')
312313
->setPageSize($this->getPageSize())
313314
->setCurPage($this->getRequest()->getParam($this->getData('page_var_name'), 1));
314315

app/code/Magento/CatalogWidget/Test/Mftf/Section/CatalogWidgetSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@
2121
<element name="conditionIs" type="button" selector="//*[@id='conditions__1--1__attribute']/following-sibling::span[1]"/>
2222
<element name="conditionOperator" type="button" selector="#conditions__1--{{arg3}}__operator" parameterized="true"/>
2323
<element name="checkElementStorefrontByPrice" type="button" selector="//*[@class='product-items widget-product-grid']//*[contains(text(),'${{arg4}}.00')]" parameterized="true"/>
24+
<element name="checkElementStorefrontByName" type="button" selector="//*[@class='product-items widget-product-grid']//*[@class='product-item'][{{productPosition}}]//a[contains(text(), '{{productName}}')]" parameterized="true"/>
2425
</section>
2526
</sections>
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
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"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="CatalogProductListWidgetOrderTest">
12+
<annotations>
13+
<features value="CatalogWidget"/>
14+
<stories value="MC-5905: Wrong sorting on Products component"/>
15+
<title value="Checking order of products in the 'catalog Products List' widget"/>
16+
<description value="Check that products are ordered with recently added products first"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-13794"/>
19+
<group value="CatalogWidget"/>
20+
<group value="WYSIWYGDisabled"/>
21+
<skip>
22+
<issueId value="MC-13923"/>
23+
</skip>
24+
</annotations>
25+
<before>
26+
<createData entity="SimpleSubCategory" stepKey="simplecategory"/>
27+
<createData entity="SimpleProduct" stepKey="createFirstProduct">
28+
<requiredEntity createDataKey="simplecategory"/>
29+
<field key="price">10</field>
30+
</createData>
31+
<createData entity="SimpleProduct" stepKey="createSecondProduct">
32+
<requiredEntity createDataKey="simplecategory"/>
33+
<field key="price">20</field>
34+
</createData>
35+
<createData entity="SimpleProduct" stepKey="createThirdProduct">
36+
<requiredEntity createDataKey="simplecategory"/>
37+
<field key="price">30</field>
38+
</createData>
39+
<createData entity="_defaultCmsPage" stepKey="createPreReqPage"/>
40+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
41+
<actionGroup ref="EnabledWYSIWYG" stepKey="enableWYSIWYG"/>
42+
</before>
43+
<!--Open created cms page-->
44+
<comment userInput="Open created cms page" stepKey="commentOpenCreatedCmsPage"/>
45+
<actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToCreatedCMSPage1">
46+
<argument name="CMSPage" value="$$createPreReqPage$$"/>
47+
</actionGroup>
48+
<!--Add widget to cms page-->
49+
<comment userInput="Add widget to cms page" stepKey="commentAddWidgetToCmsPage"/>
50+
<click selector="{{TinyMCESection.InsertWidgetIcon}}" stepKey="clickInsertWidgetIcon" />
51+
<waitForPageLoad stepKey="waitForPageLoad1" />
52+
<selectOption selector="{{WidgetSection.WidgetType}}" userInput="Catalog Products List" stepKey="selectCatalogProductsList" />
53+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskDisappear1" />
54+
<click selector="{{WidgetSection.AddParam}}" stepKey="clickAddParamBtn" />
55+
<waitForElementVisible selector="{{WidgetSection.ConditionsDropdown}}" stepKey="waitForDropdownVisible"/>
56+
<selectOption selector="{{WidgetSection.ConditionsDropdown}}" userInput="Category" stepKey="selectCategoryCondition" />
57+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskDisappear2" />
58+
<click selector="{{WidgetSection.RuleParam}}" stepKey="clickRuleParam" />
59+
<waitForElementVisible selector="{{WidgetSection.Chooser}}" stepKey="waitForElement" />
60+
<click selector="{{WidgetSection.Chooser}}" stepKey="clickChooser" />
61+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskDisappear3" />
62+
<click selector="{{WidgetSection.PreCreateCategory('$$simplecategory.name$$')}}" stepKey="selectCategory" />
63+
<click selector="{{WidgetSection.InsertWidget}}" stepKey="clickInsertWidget" />
64+
<waitForPageLoad stepKey="waitForPageLoad2" />
65+
<!--Save cms page and go to Storefront-->
66+
<comment userInput="Save cms page and go to Storefront" stepKey="commentSaveCmsPageAndGoToStorefront"/>
67+
<click selector="{{CmsNewPagePageActionsSection.expandSplitButton}}" stepKey="expandButtonMenu"/>
68+
<waitForElementVisible selector="{{CmsNewPagePageActionsSection.splitButtonMenu}}" stepKey="waitForSplitButtonMenuVisible"/>
69+
<click selector="{{CmsNewPagePageActionsSection.savePage}}" stepKey="clickSavePage"/>
70+
<see userInput="You saved the page." stepKey="seeSuccessMessage"/>
71+
<amOnPage url="$$createPreReqPage.identifier$$" stepKey="amOnPageTestPage"/>
72+
<waitForPageLoad stepKey="waitForPageLoad3" />
73+
<!--Check order of products: recently added first-->
74+
<comment userInput="Check order of products: recently added first" stepKey="commentCheckOrderOfProductsRecentlyAddedFirst"/>
75+
<seeElement selector="{{InsertWidgetSection.checkElementStorefrontByName('1','$$createThirdProduct.name$$')}}" stepKey="seeElementByName1"/>
76+
<seeElement selector="{{InsertWidgetSection.checkElementStorefrontByName('2','$$createSecondProduct.name$$')}}" stepKey="seeElementByName2"/>
77+
<seeElement selector="{{InsertWidgetSection.checkElementStorefrontByName('3','$$createFirstProduct.name$$')}}" stepKey="seeElementByName3"/>
78+
<after>
79+
<actionGroup ref="DisabledWYSIWYG" stepKey="disableWYSIWYG"/>
80+
<deleteData createDataKey="createPreReqPage" stepKey="deletePreReqPage" />
81+
<deleteData createDataKey="simplecategory" stepKey="deleteSimpleCategory"/>
82+
<deleteData createDataKey="createFirstProduct" stepKey="deleteFirstProduct"/>
83+
<deleteData createDataKey="createSecondProduct" stepKey="deleteSecondProduct"/>
84+
<deleteData createDataKey="createThirdProduct" stepKey="deleteThirdProduct"/>
85+
<actionGroup ref="logout" stepKey="logout"/>
86+
</after>
87+
</test>
88+
</tests>

app/code/Magento/CatalogWidget/Test/Unit/Block/Product/ProductsListTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ public function testCreateCollection($pagerEnable, $productsCount, $productsPerP
274274
'addAttributeToSelect',
275275
'addUrlRewrite',
276276
'addStoreFilter',
277+
'addAttributeToSort',
277278
'setPageSize',
278279
'setCurPage',
279280
'distinct'
@@ -288,6 +289,7 @@ public function testCreateCollection($pagerEnable, $productsCount, $productsPerP
288289
$collection->expects($this->once())->method('addAttributeToSelect')->willReturnSelf();
289290
$collection->expects($this->once())->method('addUrlRewrite')->willReturnSelf();
290291
$collection->expects($this->once())->method('addStoreFilter')->willReturnSelf();
292+
$collection->expects($this->once())->method('addAttributeToSort')->with('created_at', 'desc')->willReturnSelf();
291293
$collection->expects($this->once())->method('setPageSize')->with($expectedPageSize)->willReturnSelf();
292294
$collection->expects($this->once())->method('setCurPage')->willReturnSelf();
293295
$collection->expects($this->once())->method('distinct')->willReturnSelf();

0 commit comments

Comments
 (0)