Skip to content

Commit

Permalink
Merge branch 2.2-develop into ENGCOM-4013-magento-magento2-20539
Browse files Browse the repository at this point in the history
  • Loading branch information
magento-engcom-team committed Feb 14, 2019
2 parents 21e575e + 37ad124 commit 8dbd97b
Show file tree
Hide file tree
Showing 219 changed files with 4,385 additions and 712 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
*/
namespace Magento\Backend\Controller\Adminhtml\System\Design;

/**
* Save design action.
*/
class Save extends \Magento\Backend\Controller\Adminhtml\System\Design
{
/**
Expand All @@ -26,6 +29,8 @@ protected function _filterPostData($data)
}

/**
* Save design action.
*
* @return \Magento\Backend\Model\View\Result\Redirect
*/
public function execute()
Expand Down Expand Up @@ -54,10 +59,10 @@ public function execute()
} catch (\Exception $e) {
$this->messageManager->addErrorMessage($e->getMessage());
$this->_objectManager->get(\Magento\Backend\Model\Session::class)->setDesignData($data);
return $resultRedirect->setPath('adminhtml/*/', ['id' => $design->getId()]);
return $resultRedirect->setPath('*/*/edit', ['id' => $design->getId()]);
}
}

return $resultRedirect->setPath('adminhtml/*/');
return $resultRedirect->setPath('*/*/');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
<pages xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<page name="AdminConfigurationGeneralSectionPage" url="admin/system_config/edit/section/general/{{group_anchor}}" parameterized="true" area="admin" module="Magento_Config">
<section name="AdminConfigurationGeneralSectionCountryOptionsGroupSection"/>
<section name="LocaleOptionsSection"/>
</page>
</pages>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-->

<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
<page name="ConfigurationStoresPage" url="admin/system_config/edit/section/cms/" area="admin" module="Catalog">
<section name="WYSIWYGOptionsSection"/>
</page>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="AdminMainActionsSection">
<element name="save" type="button" selector="#save" timeout="30"/>
<element name="delete" type="button" selector="#delete"/>
<element name="delete" type="button" selector="#delete" timeout="30"/>
<element name="add" type="button" selector="#add" timeout="30"/>
<element name="back" type="button" selector="#back" timeout="30"/>
<element name="saveAndContinue" type="button" selector="button[id*=save_and_]" timeout="30"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?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="AdminPopupModalSection">
<element name="message" type="text" selector="aside.modal-popup .modal-content .popup-window-content"/>
<element name="ok" type="button" selector="//span[contains(text(),'Ok')]/ancestor::button"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?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="LocaleOptionsSection">
<element name="timezone" type="select" selector="#general_locale_timezone"/>
<element name="useDefault" type="checkbox" selector="#general_locale_timezone_inherit"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
namespace Magento\Bundle\Test\Unit\Pricing\Price;

use \Magento\Bundle\Pricing\Price\SpecialPrice;
use Magento\Store\Api\Data\WebsiteInterface;

class SpecialPriceTest extends \PHPUnit\Framework\TestCase
{
Expand Down Expand Up @@ -77,12 +78,6 @@ public function testGetValue($regularPrice, $specialPrice, $isScopeDateInInterva
->method('getSpecialPrice')
->will($this->returnValue($specialPrice));

$store = $this->getMockBuilder(\Magento\Store\Model\Store::class)
->disableOriginalConstructor()
->getMock();
$this->saleable->expects($this->once())
->method('getStore')
->will($this->returnValue($store));
$this->saleable->expects($this->once())
->method('getSpecialFromDate')
->will($this->returnValue($specialFromDate));
Expand All @@ -92,7 +87,7 @@ public function testGetValue($regularPrice, $specialPrice, $isScopeDateInInterva

$this->localeDate->expects($this->once())
->method('isScopeDateInInterval')
->with($store, $specialFromDate, $specialToDate)
->with(WebsiteInterface::ADMIN_CODE, $specialFromDate, $specialToDate)
->will($this->returnValue($isScopeDateInInterval));

$this->priceCurrencyMock->expects($this->never())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Magento\Framework\UrlInterface;
use Magento\Ui\Component\Container;
use Magento\Ui\Component\Form;
use Magento\Ui\Component\Form\Fieldset;
use Magento\Ui\Component\Modal;

/**
Expand Down Expand Up @@ -69,13 +70,26 @@ public function __construct(
}

/**
* {@inheritdoc}
* @inheritdoc
*
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*/
public function modifyMeta(array $meta)
{
$meta = $this->removeFixedTierPrice($meta);
$path = $this->arrayManager->findPath(static::CODE_BUNDLE_DATA, $meta, null, 'children');

$groupCode = static::CODE_BUNDLE_DATA;
$path = $this->arrayManager->findPath($groupCode, $meta, null, 'children');
if (empty($path)) {
$meta[$groupCode]['children'] = [];
$meta[$groupCode]['arguments']['data']['config'] = [
'componentType' => Fieldset::NAME,
'label' => __('Bundle Items'),
'collapsible' => true,
];

$path = $this->arrayManager->findPath($groupCode, $meta, null, 'children');
}

$meta = $this->arrayManager->merge(
$path,
Expand Down Expand Up @@ -220,7 +234,7 @@ private function removeFixedTierPrice(array $meta)
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function modifyData(array $data)
{
Expand Down
Loading

0 comments on commit 8dbd97b

Please sign in to comment.