Skip to content

Commit

Permalink
Merge pull request #4 from magento/2.3-develop
Browse files Browse the repository at this point in the history
2.3 Latest
  • Loading branch information
Dharmeshvaja91 authored Jan 30, 2019
2 parents f1e2fff + beb0274 commit 8a872be
Show file tree
Hide file tree
Showing 135 changed files with 2,689 additions and 834 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?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="SetAdminAccountActionGroup">
<arguments>
<argument name="InterfaceLocaleByValue" type="string"/>
</arguments>
<!-- Navigate to admin System Account Page-->
<amOnPage url="{{AdminSystemAccountPage.url}}" stepKey="openAdminSystemAccountPage" />
<waitForPageLoad stepKey="loadAdminSystemAccountPage"/>
<!-- Change Admin locale to Français (France) / French (France) -->
<selectOption userInput="{{InterfaceLocaleByValue}}" selector="{{AdminSystemAccountSection.interfaceLocale}}" stepKey="setInterfaceLocate"/>
<fillField selector="{{AdminSystemAccountSection.currentPassword}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}" stepKey="fillPassword"/>
<click selector="{{AdminCustomerMainActionsSection.saveButton}}" stepKey="clickSave"/>
<waitForElement selector="{{AdminCustomerMessagesSection.successMessage}}" stepKey="waitSuccessMessage"/>
</actionGroup>
</actionGroups>
14 changes: 14 additions & 0 deletions app/code/Magento/Backend/Test/Mftf/Page/AdminSystemAccountPage.xml
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.
*/
-->

<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
<page name="AdminSystemAccountPage" url="admin/system_account/index/" area="admin" module="Magento_Backend">
<section name="AdminSystemAccountSection"/>
</page>
</pages>
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="AdminSystemAccountSection">
<element name="interfaceLocale" type="text" selector="#interface_locale"/>
<element name="currentPassword" type="text" selector="#current_password"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
<section name="LocaleOptionsSection">
<element name="sectionHeader" type="text" selector="#general_locale-head"/>
<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 @@ -131,10 +131,10 @@

<!--Check all products and Cart Subtotal -->
<actionGroup ref="StorefrontCheckCartActionGroup" stepKey="cartAssert" after="waitForDetailsOpen">
<argument name="subtotal" value="BundleProductsSummary.subtotal"/>
<argument name="shipping" value="BundleProductsSummary.shipping"/>
<argument name="shippingMethod" value="BundleProductsSummary.shippingMethod"/>
<argument name="total" value="BundleProductsSummary.total"/>
<argument name="subtotal" value="1,968.00"/>
<argument name="shipping" value="5.00"/>
<argument name="shippingMethod" value="Flat Rate - Fixed"/>
<argument name="total" value="1,973.00"/>
</actionGroup>
</test>
</tests>
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,129 +7,150 @@
// @codingStandardsIgnoreFile

/** @var $block \Magento\Bundle\Block\Sales\Order\Items\Renderer */
$parentItem = $block->getItem();
$items = array_merge([$parentItem], $parentItem->getChildrenItems());
$index = 0;
$prevOptionId = '';
?>
<?php $parentItem = $block->getItem() ?>
<?php $items = array_merge([$parentItem], $parentItem->getChildrenItems()); ?>
<?php $_index = 0 ?>

<?php $_prevOptionId = '' ?>
<?php foreach ($items as $item): ?>

<?php foreach ($items as $_item): ?>

<?php if ($block->getItemOptions() || $parentItem->getDescription() || $this->helper('Magento\GiftMessage\Helper\Message')->isMessagesAllowed('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?>
<?php $_showlastRow = true ?>
<?php if ($block->getItemOptions()
|| $parentItem->getDescription()
|| $this->helper('Magento\GiftMessage\Helper\Message')->isMessagesAllowed('order_item', $parentItem)
&& $parentItem->getGiftMessageId()): ?>
<?php $showLastRow = true; ?>
<?php else: ?>
<?php $_showlastRow = false ?>
<?php $showLastRow = false; ?>
<?php endif; ?>

<?php if ($_item->getParentItem()): ?>
<?php $attributes = $block->getSelectionAttributes($_item) ?>
<?php if ($_prevOptionId != $attributes['option_id']): ?>
<?php if ($item->getParentItem()): ?>
<?php $attributes = $block->getSelectionAttributes($item) ?>
<?php if ($prevOptionId != $attributes['option_id']): ?>
<tr class="options-label">
<td class="col label" colspan="5"><?= /* @escapeNotVerified */ $attributes['option_label'] ?></td>
<td class="col label" colspan="5"><?= $block->escapeHtml($attributes['option_label']); ?></td>
</tr>
<?php $_prevOptionId = $attributes['option_id'] ?>
<?php $prevOptionId = $attributes['option_id'] ?>
<?php endif; ?>
<?php endif; ?>
<tr id="order-item-row-<?= /* @escapeNotVerified */ $_item->getId() ?>" class="<?php if ($_item->getParentItem()): ?>item-options-container<?php else: ?>item-parent<?php endif; ?>"<?php if ($_item->getParentItem()): ?> data-th="<?= /* @escapeNotVerified */ $attributes['option_label'] ?>"<?php endif; ?>>
<?php if (!$_item->getParentItem()): ?>
<td class="col name" data-th="<?= $block->escapeHtml(__('Product Name')) ?>">
<strong class="product name product-item-name"><?= $block->escapeHtml($_item->getName()) ?></strong>
<tr id="order-item-row-<?= /* @noEscape */ $item->getId() ?>"
class="<?php if ($item->getParentItem()): ?>
item-options-container
<?php else: ?>
item-parent
<?php endif; ?>"
<?php if ($item->getParentItem()): ?>
data-th="<?= $block->escapeHtml($attributes['option_label']); ?>"
<?php endif; ?>>
<?php if (!$item->getParentItem()): ?>
<td class="col name" data-th="<?= $block->escapeHtml(__('Product Name')); ?>">
<strong class="product name product-item-name"><?= $block->escapeHtml($item->getName()); ?></strong>
</td>
<?php else: ?>
<td class="col value" data-th="<?= $block->escapeHtml(__('Product Name')) ?>"><?= $block->getValueHtml($_item) ?></td>
<td class="col value" data-th="<?= $block->escapeHtml(__('Product Name')); ?>">
<?= $block->getValueHtml($item); ?>
</td>
<?php endif; ?>
<td class="col sku" data-th="<?= $block->escapeHtml(__('SKU')) ?>"><?= /* @escapeNotVerified */ $block->prepareSku($_item->getSku()) ?></td>
<td class="col price" data-th="<?= $block->escapeHtml(__('Price')) ?>">
<?php if (!$_item->getParentItem()): ?>
<?= $block->getItemPriceHtml() ?>
<td class="col sku" data-th="<?= $block->escapeHtml(__('SKU')); ?>">
<?= /* @noEscape */ $block->prepareSku($item->getSku()); ?>
</td>
<td class="col price" data-th="<?= $block->escapeHtml(__('Price')); ?>">
<?php if (!$item->getParentItem()): ?>
<?= /* @noEscape */ $block->getItemPriceHtml(); ?>
<?php else: ?>
&nbsp;
<?php endif; ?>
</td>
<td class="col qty" data-th="<?= $block->escapeHtml(__('Quantity')) ?>">
<td class="col qty" data-th="<?= $block->escapeHtml(__('Quantity')); ?>">
<?php if (
($_item->getParentItem() && $block->isChildCalculated()) ||
(!$_item->getParentItem() && !$block->isChildCalculated()) || ($_item->getQtyShipped() > 0 && $_item->getParentItem() && $block->isShipmentSeparately())):?>
($item->getParentItem() && $block->isChildCalculated()) ||
(!$item->getParentItem() && !$block->isChildCalculated()) ||
($item->getQtyShipped() > 0 && $item->getParentItem() && $block->isShipmentSeparately())): ?>
<ul class="items-qty">
<?php endif; ?>
<?php if (($_item->getParentItem() && $block->isChildCalculated()) ||
(!$_item->getParentItem() && !$block->isChildCalculated())): ?>
<?php if ($_item->getQtyOrdered() > 0): ?>
<?php if (($item->getParentItem() && $block->isChildCalculated()) ||
(!$item->getParentItem() && !$block->isChildCalculated())): ?>
<?php if ($item->getQtyOrdered() > 0): ?>
<li class="item">
<span class="title"><?= /* @escapeNotVerified */ __('Ordered') ?></span>
<span class="content"><?= /* @escapeNotVerified */ $_item->getQtyOrdered()*1 ?></span>
<span class="title"><?= $block->escapeHtml(__('Ordered')); ?></span>
<span class="content"><?= /* @noEscape */ $item->getQtyOrdered() * 1; ?></span>
</li>
<?php endif; ?>
<?php if ($_item->getQtyShipped() > 0 && !$block->isShipmentSeparately()): ?>
<?php if ($item->getQtyShipped() > 0 && !$block->isShipmentSeparately()): ?>
<li class="item">
<span class="title"><?= /* @escapeNotVerified */ __('Shipped') ?></span>
<span class="content"><?= /* @escapeNotVerified */ $_item->getQtyShipped()*1 ?></span>
<span class="title"><?= $block->escapeHtml(__('Shipped')); ?></span>
<span class="content"><?= /* @noEscape */ $item->getQtyShipped() * 1; ?></span>
</li>
<?php endif; ?>
<?php if ($_item->getQtyCanceled() > 0): ?>
<?php if ($item->getQtyCanceled() > 0): ?>
<li class="item">
<span class="title"><?= /* @escapeNotVerified */ __('Canceled') ?></span>
<span class="content"><?= /* @escapeNotVerified */ $_item->getQtyCanceled()*1 ?></span>
<span class="title"><?= $block->escapeHtml(__('Canceled')); ?></span>
<span class="content"><?= /* @noEscape */ $item->getQtyCanceled() * 1; ?></span>
</li>
<?php endif; ?>
<?php if ($_item->getQtyRefunded() > 0): ?>
<?php if ($item->getQtyRefunded() > 0): ?>
<li class="item">
<span class="title"><?= /* @escapeNotVerified */ __('Refunded') ?></span>
<span class="content"><?= /* @escapeNotVerified */ $_item->getQtyRefunded()*1 ?></span>
<span class="title"><?= $block->escapeHtml(__('Refunded')); ?></span>
<span class="content"><?= /* @noEscape */ $item->getQtyRefunded() * 1; ?></span>
</li>
<?php endif; ?>
<?php elseif ($_item->getQtyShipped() > 0 && $_item->getParentItem() && $block->isShipmentSeparately()): ?>
<?php elseif ($item->getQtyShipped() > 0 && $item->getParentItem() && $block->isShipmentSeparately()): ?>
<li class="item">
<span class="title"><?= /* @escapeNotVerified */ __('Shipped') ?></span>
<span class="content"><?= /* @escapeNotVerified */ $_item->getQtyShipped()*1 ?></span>
<span class="title"><?= $block->escapeHtml(__('Shipped')); ?></span>
<span class="content"><?= /* @noEscape */ $item->getQtyShipped() * 1; ?></span>
</li>
<?php else: ?>
&nbsp;
<span class="content"><?= /* @noEscape */ $parentItem->getQtyOrdered() * 1; ?></span>
<?php endif; ?>
<?php if (
($_item->getParentItem() && $block->isChildCalculated()) ||
(!$_item->getParentItem() && !$block->isChildCalculated()) || ($_item->getQtyShipped() > 0 && $_item->getParentItem() && $block->isShipmentSeparately())):?>
($item->getParentItem() && $block->isChildCalculated()) ||
(!$item->getParentItem() && !$block->isChildCalculated()) ||
($item->getQtyShipped() > 0 && $item->getParentItem() && $block->isShipmentSeparately())):?>
</ul>
<?php endif; ?>
</td>
<td class="col subtotal" data-th="<?= $block->escapeHtml(__('Subtotal')) ?>">
<?php if (!$_item->getParentItem()): ?>
<?= $block->getItemRowTotalHtml() ?>
<?php if (!$item->getParentItem()): ?>
<?= /* @noEscape */ $block->getItemRowTotalHtml(); ?>
<?php else: ?>
&nbsp;
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>

<?php if ($_showlastRow && (($_options = $block->getItemOptions()) || $block->escapeHtml($_item->getDescription()))): ?>
<?php if ($showLastRow && (($options = $block->getItemOptions()) || $block->escapeHtml($item->getDescription()))): ?>
<tr>
<td class="col options" colspan="5">
<?php if ($_options = $block->getItemOptions()): ?>
<?php if ($options = $block->getItemOptions()): ?>
<dl class="item-options">
<?php foreach ($_options as $_option) : ?>
<dt><?= $block->escapeHtml($_option['label']) ?></dt>
<?php foreach ($options as $option) : ?>
<dt><?= $block->escapeHtml($option['label']) ?></dt>
<?php if (!$block->getPrintStatus()): ?>
<?php $_formatedOptionValue = $block->getFormatedOptionValue($_option) ?>
<dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="tooltip wrapper"<?php endif; ?>>
<?= /* @escapeNotVerified */ $_formatedOptionValue['value'] ?>
<?php if (isset($_formatedOptionValue['full_view'])): ?>
<?php $formattedOptionValue = $block->getFormatedOptionValue($option) ?>
<dd<?php if (isset($formattedOptionValue['full_view'])): ?>
class="tooltip wrapper"
<?php endif; ?>>
<?= /* @noEscape */ $formattedOptionValue['value'] ?>
<?php if (isset($formattedOptionValue['full_view'])): ?>
<div class="tooltip content">
<dl class="item options">
<dt><?= $block->escapeHtml($_option['label']) ?></dt>
<dd><?= /* @escapeNotVerified */ $_formatedOptionValue['full_view'] ?></dd>
<dt><?= $block->escapeHtml($option['label']); ?></dt>
<dd><?= /* @noEscape */ $formattedOptionValue['full_view']; ?></dd>
</dl>
</div>
<?php endif; ?>
</dd>
<?php else: ?>
<dd><?= $block->escapeHtml((isset($_option['print_value']) ? $_option['print_value'] : $_option['value'])) ?></dd>
<dd><?= $block->escapeHtml((isset($option['print_value']) ?
$option['print_value'] :
$option['value'])); ?>
</dd>
<?php endif; ?>
<?php endforeach; ?>
</dl>
<?php endif; ?>
<?= $block->escapeHtml($_item->getDescription()) ?>
<?= $block->escapeHtml($item->getDescription()); ?>
</td>
</tr>
<?php endif; ?>
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public function setWidth($width);

/**
* Retrieve image label
*
* Image label is short description of this image
*
* @return string
Expand All @@ -111,7 +112,7 @@ public function setLabel($label);
/**
* Retrieve resize width
*
* This width is image dimension, which represents the width, that can be used for perfomance improvements
* This width is image dimension, which represents the width, that can be used for performance improvements
*
* @return float
* @since 101.1.0
Expand All @@ -128,6 +129,8 @@ public function getResizedWidth();
public function setResizedWidth($width);

/**
* Set resized height
*
* @param string $height
* @return void
* @since 101.1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ protected function duplicate($product)

$this->resourceModel->duplicate(
$this->getAttribute()->getAttributeId(),
isset($mediaGalleryData['duplicate']) ? $mediaGalleryData['duplicate'] : [],
$mediaGalleryData['duplicate'] ?? [],
$product->getOriginalLinkId(),
$product->getData($this->metadata->getLinkField())
);
Expand Down
Loading

0 comments on commit 8a872be

Please sign in to comment.