Skip to content

Commit 42cb921

Browse files
author
Aliaksei Yakimovich2
committed
Merge branch '2.3-develop' into MAGETWO-98947
2 parents 6cc2244 + 07e57ac commit 42cb921

File tree

75 files changed

+1003
-309
lines changed

Some content is hidden

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

75 files changed

+1003
-309
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting-edge, feature-rich eCommerce solution that gets results.
77

88
## Magento System Requirements
9-
[Magento System Requirements](https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements2.html).
9+
[Magento System Requirements](https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements.html).
1010

1111
## Install Magento
1212

app/code/Magento/Backend/Controller/Adminhtml/Dashboard/ProductsViewed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
*/
77
namespace Magento\Backend\Controller\Adminhtml\Dashboard;
88

9-
use Magento\Framework\App\Action\HttpGetActionInterface;
9+
use Magento\Framework\App\Action\HttpPostActionInterface;
1010

1111
/**
1212
* Get most viewed products controller.
1313
*/
14-
class ProductsViewed extends AjaxBlock implements HttpGetActionInterface
14+
class ProductsViewed extends AjaxBlock implements HttpPostActionInterface
1515
{
1616
/**
1717
* Gets most viewed products list
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="SetWebsiteCountryOptionsToDefaultActionGroup">
12+
<conditionalClick selector="{{CountryOptionsSection.countryOptions}}" dependentSelector="{{CountryOptionsSection.countryOptionsOpen}}" visible="false" stepKey="clickOnStoreInformation3"/>
13+
<waitForElementVisible selector="{{CountryOptionsSection.topDestinations}}" stepKey="waitCheckboxToBeVisible3"/>
14+
<checkOption selector="{{CountryOptionsSection.generalCountryAllowInherit}}" stepKey="setToDefault1"/>
15+
<checkOption selector="{{CountryOptionsSection.generalCountryDefaultInherit}}" stepKey="setToDefault2"/>
16+
<click selector="{{ContentManagementSection.Save}}" stepKey="saveDefaultConfig"/>
17+
<waitForPageLoad stepKey="waitForSavingSystemConfiguration"/>
18+
<see userInput="You saved the configuration." stepKey="seeSuccessMessage"/>
19+
</actionGroup>
20+
</actionGroups>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="CountryOptionsSection">
12+
<element name="allowedCountries" type="select" selector="#general_country_allow"/>
13+
<element name="notAllowedCountry" type="button" selector="#general_country_allow option:not([selected])"/>
14+
<element name="generalCountryAllowInherit" type="checkbox" selector="#general_country_allow_inherit"/>
15+
<element name="generalCountryDefaultInherit" type="checkbox" selector="#general_country_default_inherit"/>
16+
<element name="generalCountryDefault" type="select" selector="#general_country_default"/>
17+
</section>
18+
</sections>

app/code/Magento/Catalog/Model/Product/Type/FrontSpecialPrice.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
*
1818
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
1919
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
20+
*
21+
* @deprecated
22+
* @see \Magento\Catalog\Model\Product\Type\Price
2023
*/
2124
class FrontSpecialPrice extends Price
2225
{
@@ -66,6 +69,8 @@ public function __construct(
6669

6770
/**
6871
* @inheritdoc
72+
*
73+
* @deprecated
6974
*/
7075
protected function _applySpecialPrice($product, $finalPrice)
7176
{

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,4 +289,13 @@
289289
<waitForPageLoad stepKey="waitForProductToLoad"/>
290290
<waitForElementVisible selector="{{AdminHeaderSection.pageTitle}}" stepKey="waitForProductTitle"/>
291291
</actionGroup>
292+
293+
<actionGroup name="deleteProductsIfTheyExist">
294+
<conditionalClick selector="{{AdminProductGridSection.multicheckDropdown}}" dependentSelector="{{AdminProductGridSection.firstProductRow}}" visible="true" stepKey="openMulticheckDropdown"/>
295+
<conditionalClick selector="{{AdminProductGridSection.multicheckOption('Select All')}}" dependentSelector="{{AdminProductGridSection.firstProductRow}}" visible="true" stepKey="selectAllProductInFilteredGrid"/>
296+
<click selector="{{AdminProductGridSection.bulkActionDropdown}}" stepKey="clickActionDropdown"/>
297+
<click selector="{{AdminProductGridSection.bulkActionOption('Delete')}}" stepKey="clickDeleteAction"/>
298+
<waitForElementVisible selector="{{AdminProductGridConfirmActionSection.ok}}" stepKey="waitForModalPopUp"/>
299+
<click selector="{{AdminProductGridConfirmActionSection.ok}}" stepKey="confirmProductDelete"/>
300+
</actionGroup>
292301
</actionGroups>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@
1212
<data key="from">10</data>
1313
<data key="to">100</data>
1414
</entity>
15+
<entity name="ProductPerPage">
16+
<data key="productCount">1</data>
17+
</entity>
1518
</entities>
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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="AdminGridPageNumberAfterSaveAndCloseActionTest">
12+
<annotations>
13+
<features value="Catalog"/>
14+
<title value="Checking Catalog grid page number after Save and Close action"/>
15+
<description value="Checking Catalog grid page number after Save and Close action"/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="MAGETWO-96164"/>
18+
<useCaseId value="MAGETWO-96127"/>
19+
<group value="Catalog"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
23+
<!--Clear product grid-->
24+
<comment userInput="Clear product grid" stepKey="commentClearProductGrid"/>
25+
<amOnPage url="{{ProductCatalogPage.url}}" stepKey="goToProductCatalog"/>
26+
<waitForPageLoad stepKey="waitForProductIndexPage"/>
27+
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}"
28+
dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/>
29+
<waitForLoadingMaskToDisappear stepKey="waitForGridLoad"/>
30+
<actionGroup ref="deleteProductsIfTheyExist" stepKey="deleteProductIfTheyExist"/>
31+
<createData stepKey="category1" entity="SimpleSubCategory"/>
32+
<createData stepKey="product1" entity="SimpleProduct">
33+
<requiredEntity createDataKey="category1"/>
34+
</createData>
35+
<createData stepKey="category2" entity="SimpleSubCategory"/>
36+
<createData stepKey="product2" entity="SimpleProduct">
37+
<requiredEntity createDataKey="category2"/>
38+
</createData>
39+
</before>
40+
<after>
41+
<amOnPage url="{{ProductCatalogPage.url}}" stepKey="goToProductCatalog"/>
42+
<waitForPageLoad stepKey="waitForProductIndexPage"/>
43+
<click selector="{{AdminDataGridPaginationSection.previousPage}}" stepKey="clickPrevPageOrderGrid"/>
44+
<actionGroup ref="adminDataGridDeleteCustomPerPage" stepKey="deleteCustomAddedPerPage">
45+
<argument name="perPage" value="ProductPerPage.productCount"/>
46+
</actionGroup>
47+
<deleteData stepKey="deleteCategory1" createDataKey="category1"/>
48+
<deleteData stepKey="deleteProduct1" createDataKey="product1"/>
49+
<deleteData stepKey="deleteCategory2" createDataKey="category2"/>
50+
<deleteData stepKey="deleteProduct2" createDataKey="product2"/>
51+
<actionGroup ref="logout" stepKey="logout"/>
52+
</after>
53+
<amOnPage url="{{ProductCatalogPage.url}}" stepKey="goToProductCatalog"/>
54+
<waitForPageLoad stepKey="waitForProductIndexPage"/>
55+
<actionGroup ref="adminDataGridSelectCustomPerPage" stepKey="select1OrderPerPage">
56+
<argument name="perPage" value="ProductPerPage.productCount"/>
57+
</actionGroup>
58+
<!--Go to the next page and edit the product-->
59+
<comment userInput="Go to the next page and edit the product" stepKey="commentEdiProduct"/>
60+
<click selector="{{AdminDataGridPaginationSection.nextPage}}" stepKey="clickNextPageOrderGrid"/>
61+
<waitForPageLoad stepKey="waitForPageLoad"/>
62+
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct2">
63+
<argument name="product" value="$$product2$$"/>
64+
</actionGroup>
65+
<actionGroup ref="AdminFormSaveAndClose" stepKey="saveAndCloseProduct"/>
66+
<waitForPageLoad stepKey="waitForPageLoad1"/>
67+
<seeInField selector="{{AdminDataGridPaginationSection.currentPage}}" userInput="2" stepKey="seeOnSecondPageOrderGrid"/>
68+
</test>
69+
</tests>

app/code/Magento/Catalog/etc/frontend/di.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,5 +120,4 @@
120120
<plugin name="catalog_app_action_dispatch_controller_context_plugin"
121121
type="Magento\Catalog\Plugin\Framework\App\Action\ContextPlugin" />
122122
</type>
123-
<preference for="Magento\Catalog\Model\Product\Type\Price" type="Magento\Catalog\Model\Product\Type\FrontSpecialPrice" />
124123
</config>

app/code/Magento/ConfigurableProduct/Model/LinkManagement.php

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22
/**
3-
*
43
* Copyright © Magento, Inc. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
@@ -11,6 +10,11 @@
1110
use Magento\Framework\Exception\NoSuchEntityException;
1211
use Magento\Framework\Exception\StateException;
1312

13+
/**
14+
* Configurable product link management.
15+
*
16+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
17+
*/
1418
class LinkManagement implements \Magento\ConfigurableProduct\Api\LinkManagementInterface
1519
{
1620
/**
@@ -68,7 +72,7 @@ public function __construct(
6872
}
6973

7074
/**
71-
* {@inheritdoc}
75+
* @inheritdoc
7276
*/
7377
public function getChildren($sku)
7478
{
@@ -107,11 +111,15 @@ public function getChildren($sku)
107111
}
108112

109113
/**
110-
* {@inheritdoc}
114+
* @inheritdoc
115+
* @throws InputException
116+
* @throws NoSuchEntityException
117+
* @throws StateException
118+
* @throws \Magento\Framework\Exception\CouldNotSaveException
111119
*/
112120
public function addChild($sku, $childSku)
113121
{
114-
$product = $this->productRepository->get($sku);
122+
$product = $this->productRepository->get($sku, true);
115123
$child = $this->productRepository->get($childSku);
116124

117125
$childrenIds = array_values($this->configurableType->getChildrenIds($product->getId())[0]);
@@ -150,7 +158,11 @@ public function addChild($sku, $childSku)
150158
}
151159

152160
/**
153-
* {@inheritdoc}
161+
* @inheritdoc
162+
* @throws InputException
163+
* @throws NoSuchEntityException
164+
* @throws StateException
165+
* @throws \Magento\Framework\Exception\CouldNotSaveException
154166
*/
155167
public function removeChild($sku, $childSku)
156168
{

0 commit comments

Comments
 (0)