Skip to content

Commit

Permalink
Merge branch 2.3-develop into ENGCOM-4722-magento-magento2-22258
Browse files Browse the repository at this point in the history
  • Loading branch information
magento-engcom-team committed Apr 12, 2019
2 parents 2e018a1 + 07e57ac commit 5286ff8
Show file tree
Hide file tree
Showing 78 changed files with 1,558 additions and 331 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting-edge, feature-rich eCommerce solution that gets results.

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

## Install Magento

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
*/
namespace Magento\Backend\Controller\Adminhtml\Dashboard;

use Magento\Framework\App\Action\HttpGetActionInterface;
use Magento\Framework\App\Action\HttpPostActionInterface;

/**
* Get most viewed products controller.
*/
class ProductsViewed extends AjaxBlock implements HttpGetActionInterface
class ProductsViewed extends AjaxBlock implements HttpPostActionInterface
{
/**
* Gets most viewed products list
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="SetWebsiteCountryOptionsToDefaultActionGroup">
<conditionalClick selector="{{CountryOptionsSection.countryOptions}}" dependentSelector="{{CountryOptionsSection.countryOptionsOpen}}" visible="false" stepKey="clickOnStoreInformation3"/>
<waitForElementVisible selector="{{CountryOptionsSection.topDestinations}}" stepKey="waitCheckboxToBeVisible3"/>
<checkOption selector="{{CountryOptionsSection.generalCountryAllowInherit}}" stepKey="setToDefault1"/>
<checkOption selector="{{CountryOptionsSection.generalCountryDefaultInherit}}" stepKey="setToDefault2"/>
<click selector="{{ContentManagementSection.Save}}" stepKey="saveDefaultConfig"/>
<waitForPageLoad stepKey="waitForSavingSystemConfiguration"/>
<see userInput="You saved the configuration." stepKey="seeSuccessMessage"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="CountryOptionsSection">
<element name="allowedCountries" type="select" selector="#general_country_allow"/>
<element name="notAllowedCountry" type="button" selector="#general_country_allow option:not([selected])"/>
<element name="generalCountryAllowInherit" type="checkbox" selector="#general_country_allow_inherit"/>
<element name="generalCountryDefaultInherit" type="checkbox" selector="#general_country_default_inherit"/>
<element name="generalCountryDefault" type="select" selector="#general_country_default"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
*
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*
* @deprecated
* @see \Magento\Catalog\Model\Product\Type\Price
*/
class FrontSpecialPrice extends Price
{
Expand Down Expand Up @@ -66,6 +69,8 @@ public function __construct(

/**
* @inheritdoc
*
* @deprecated
*/
protected function _applySpecialPrice($product, $finalPrice)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,4 +289,13 @@
<waitForPageLoad stepKey="waitForProductToLoad"/>
<waitForElementVisible selector="{{AdminHeaderSection.pageTitle}}" stepKey="waitForProductTitle"/>
</actionGroup>

<actionGroup name="deleteProductsIfTheyExist">
<conditionalClick selector="{{AdminProductGridSection.multicheckDropdown}}" dependentSelector="{{AdminProductGridSection.firstProductRow}}" visible="true" stepKey="openMulticheckDropdown"/>
<conditionalClick selector="{{AdminProductGridSection.multicheckOption('Select All')}}" dependentSelector="{{AdminProductGridSection.firstProductRow}}" visible="true" stepKey="selectAllProductInFilteredGrid"/>
<click selector="{{AdminProductGridSection.bulkActionDropdown}}" stepKey="clickActionDropdown"/>
<click selector="{{AdminProductGridSection.bulkActionOption('Delete')}}" stepKey="clickDeleteAction"/>
<waitForElementVisible selector="{{AdminProductGridConfirmActionSection.ok}}" stepKey="waitForModalPopUp"/>
<click selector="{{AdminProductGridConfirmActionSection.ok}}" stepKey="confirmProductDelete"/>
</actionGroup>
</actionGroups>
3 changes: 3 additions & 0 deletions app/code/Magento/Catalog/Test/Mftf/Data/ProductGridData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@
<data key="from">10</data>
<data key="to">100</data>
</entity>
<entity name="ProductPerPage">
<data key="productCount">1</data>
</entity>
</entities>
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminGridPageNumberAfterSaveAndCloseActionTest">
<annotations>
<features value="Catalog"/>
<title value="Checking Catalog grid page number after Save and Close action"/>
<description value="Checking Catalog grid page number after Save and Close action"/>
<severity value="MAJOR"/>
<testCaseId value="MAGETWO-96164"/>
<useCaseId value="MAGETWO-96127"/>
<group value="Catalog"/>
</annotations>
<before>
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
<!--Clear product grid-->
<comment userInput="Clear product grid" stepKey="commentClearProductGrid"/>
<amOnPage url="{{ProductCatalogPage.url}}" stepKey="goToProductCatalog"/>
<waitForPageLoad stepKey="waitForProductIndexPage"/>
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}"
dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/>
<waitForLoadingMaskToDisappear stepKey="waitForGridLoad"/>
<actionGroup ref="deleteProductsIfTheyExist" stepKey="deleteProductIfTheyExist"/>
<createData stepKey="category1" entity="SimpleSubCategory"/>
<createData stepKey="product1" entity="SimpleProduct">
<requiredEntity createDataKey="category1"/>
</createData>
<createData stepKey="category2" entity="SimpleSubCategory"/>
<createData stepKey="product2" entity="SimpleProduct">
<requiredEntity createDataKey="category2"/>
</createData>
</before>
<after>
<amOnPage url="{{ProductCatalogPage.url}}" stepKey="goToProductCatalog"/>
<waitForPageLoad stepKey="waitForProductIndexPage"/>
<click selector="{{AdminDataGridPaginationSection.previousPage}}" stepKey="clickPrevPageOrderGrid"/>
<actionGroup ref="adminDataGridDeleteCustomPerPage" stepKey="deleteCustomAddedPerPage">
<argument name="perPage" value="ProductPerPage.productCount"/>
</actionGroup>
<deleteData stepKey="deleteCategory1" createDataKey="category1"/>
<deleteData stepKey="deleteProduct1" createDataKey="product1"/>
<deleteData stepKey="deleteCategory2" createDataKey="category2"/>
<deleteData stepKey="deleteProduct2" createDataKey="product2"/>
<actionGroup ref="logout" stepKey="logout"/>
</after>
<amOnPage url="{{ProductCatalogPage.url}}" stepKey="goToProductCatalog"/>
<waitForPageLoad stepKey="waitForProductIndexPage"/>
<actionGroup ref="adminDataGridSelectCustomPerPage" stepKey="select1OrderPerPage">
<argument name="perPage" value="ProductPerPage.productCount"/>
</actionGroup>
<!--Go to the next page and edit the product-->
<comment userInput="Go to the next page and edit the product" stepKey="commentEdiProduct"/>
<click selector="{{AdminDataGridPaginationSection.nextPage}}" stepKey="clickNextPageOrderGrid"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct2">
<argument name="product" value="$$product2$$"/>
</actionGroup>
<actionGroup ref="AdminFormSaveAndClose" stepKey="saveAndCloseProduct"/>
<waitForPageLoad stepKey="waitForPageLoad1"/>
<seeInField selector="{{AdminDataGridPaginationSection.currentPage}}" userInput="2" stepKey="seeOnSecondPageOrderGrid"/>
</test>
</tests>
1 change: 0 additions & 1 deletion app/code/Magento/Catalog/etc/frontend/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,4 @@
<plugin name="catalog_app_action_dispatch_controller_context_plugin"
type="Magento\Catalog\Plugin\Framework\App\Action\ContextPlugin" />
</type>
<preference for="Magento\Catalog\Model\Product\Type\Price" type="Magento\Catalog\Model\Product\Type\FrontSpecialPrice" />
</config>
22 changes: 17 additions & 5 deletions app/code/Magento/ConfigurableProduct/Model/LinkManagement.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php
/**
*
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
Expand All @@ -11,6 +10,11 @@
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Framework\Exception\StateException;

/**
* Configurable product link management.
*
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class LinkManagement implements \Magento\ConfigurableProduct\Api\LinkManagementInterface
{
/**
Expand Down Expand Up @@ -68,7 +72,7 @@ public function __construct(
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function getChildren($sku)
{
Expand Down Expand Up @@ -107,11 +111,15 @@ public function getChildren($sku)
}

/**
* {@inheritdoc}
* @inheritdoc
* @throws InputException
* @throws NoSuchEntityException
* @throws StateException
* @throws \Magento\Framework\Exception\CouldNotSaveException
*/
public function addChild($sku, $childSku)
{
$product = $this->productRepository->get($sku);
$product = $this->productRepository->get($sku, true);
$child = $this->productRepository->get($childSku);

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

/**
* {@inheritdoc}
* @inheritdoc
* @throws InputException
* @throws NoSuchEntityException
* @throws StateException
* @throws \Magento\Framework\Exception\CouldNotSaveException
*/
public function removeChild($sku, $childSku)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,11 @@
<entity name="GlobalCustomerAccountSharing" type="account_share_scope_value">
<data key="value">0</data>
</entity>

<entity name="CustomerAccountSharingSystemValue" type="customer_account_sharing_config_inherit">
<requiredEntity type="account_share_scope_inherit">CustomerAccountSharingInherit</requiredEntity>
</entity>
<entity name="CustomerAccountSharingInherit" type="account_share_scope_inherit">
<data key="inherit">true</data>
</entity>
</entities>
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,16 @@
</object>
</object>
</operation>
<operation name="CustomerAccountShareConfigInherit" dataType="customer_account_sharing_config_inherit" type="create" auth="adminFormKey" url="/admin/system_config/save/section/customer/"
method="POST">
<object key="groups" dataType="customer_account_sharing_config_inherit">
<object key="account_share" dataType="customer_account_sharing_config_inherit">
<object key="fields" dataType="customer_account_sharing_config_inherit">
<object key="scope" dataType="account_share_scope_inherit">
<field key="inherit">boolean</field>
</object>
</object>
</object>
</object>
</operation>
</operations>
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="AdminCustomerConfigSection">
<element name="customerDataLifetime" type="input" selector="#customer_online_customers_section_data_lifetime"/>
<element name="accountSharingOptionsTab" type="button" selector="#customer_account_share-head"/>
<element name="shareCustomerAccountInherit" type="checkbox" selector="#customer_account_share_scope_inherit"/>
<element name="shareCustomerAccount" type="select" selector="#customer_account_share_scope"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
<element name="clearAll" type="button" selector=".admin__data-grid-header .action-tertiary.action-clear" timeout="30"/>
<element name="viewDropdown" type="button" selector=".admin__data-grid-action-bookmarks button.admin__action-dropdown"/>
<element name="viewBookmark" type="button" selector="//div[contains(@class, 'admin__data-grid-action-bookmarks')]/ul/li/div/a[text() = '{{label}}']" parameterized="true" timeout="30"/>
<element name="countryOptions" type="button" selector=".admin__data-grid-filters select[name=billing_country_id] option"/>
</section>
</sections>
Loading

0 comments on commit 5286ff8

Please sign in to comment.