Skip to content

Commit

Permalink
ENGCOM-3698: Fix for making subcategories appear in breadcrumbs #19781
Browse files Browse the repository at this point in the history
 - Merge Pull Request #19781 from Yamaha32088/magento2:2.3-develop
 - Merged commits:
   1. 2305acc
   2. 7ad78c9
   3. 1ffeda8
  • Loading branch information
magento-engcom-team committed Jan 4, 2019
2 parents 3c64d20 + 1ffeda8 commit a423cc1
Show file tree
Hide file tree
Showing 366 changed files with 11,511 additions and 1,458 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ script:

# The scripts for grunt/phpunit type tests
- if [ $TEST_SUITE == "functional" ]; then dev/tests/functional/vendor/phpunit/phpunit/phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
- if [ $TEST_SUITE != "functional" ] && [ $TEST_SUITE != "js"] && [ $TEST_SUITE != "graphql-api-functional" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
- if [ $TEST_SUITE != "functional" ] && [ $TEST_SUITE != "js" ] && [ $TEST_SUITE != "graphql-api-functional" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
- if [ $TEST_SUITE == "js" ]; then grunt $GRUNT_COMMAND; fi
- if [ $TEST_SUITE == "graphql-api-functional" ]; then phpunit -c dev/tests/api-functional; fi
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
namespace Magento\AdminNotification\Model\System\Message\Media\Synchronization;

/**
* Media synchronization error message class.
*
* @api
* @since 100.0.2
*/
Expand All @@ -27,7 +29,7 @@ class Error extends \Magento\AdminNotification\Model\System\Message\Media\Abstra
protected function _shouldBeDisplayed()
{
$data = $this->_syncFlag->getFlagData();
return isset($data['has_errors']) && true == $data['has_errors'];
return !empty($data['has_errors']);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
namespace Magento\AdminNotification\Model\System\Message\Media\Synchronization;

/**
* Media synchronization success message class.
*
* @api
* @since 100.0.2
*/
Expand All @@ -27,8 +29,8 @@ protected function _shouldBeDisplayed()
{
$state = $this->_syncFlag->getState();
$data = $this->_syncFlag->getFlagData();
$hasErrors = isset($data['has_errors']) && true == $data['has_errors'] ? true : false;
return false == $hasErrors && \Magento\MediaStorage\Model\File\Storage\Flag::STATE_FINISHED == $state;
$hasErrors = !empty($data['has_errors']);
return !$hasErrors && \Magento\MediaStorage\Model\File\Storage\Flag::STATE_FINISHED == $state;
}

/**
Expand Down
7 changes: 6 additions & 1 deletion app/code/Magento/Analytics/Model/Cryptographer.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,12 @@ private function getInitializationVector()
*/
private function validateCipherMethod($cipherMethod)
{
$methods = openssl_get_cipher_methods();
$methods = array_map(
'strtolower',
openssl_get_cipher_methods()
);
$cipherMethod = strtolower($cipherMethod);

return (false !== array_search($cipherMethod, $methods));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function getColumns(SelectBuilder $selectBuilder, $entityConfig)
$columnName = $this->nameResolver->getName($attributeData);
if (isset($attributeData['function'])) {
$prefix = '';
if (isset($attributeData['distinct']) && $attributeData['distinct'] == true) {
if (!empty($attributeData['distinct'])) {
$prefix = ' DISTINCT ';
}
$expression = new ColumnValueExpression(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public function testPrepareExportData($isArchiveSourceDirectory)
->with(
$archiveSource,
$archiveAbsolutePath,
$isArchiveSourceDirectory ? true : false
$isArchiveSourceDirectory
);

$fileContent = 'Some text';
Expand Down Expand Up @@ -222,7 +222,7 @@ public function prepareExportDataDataProvider()
{
return [
'Data source for archive is directory' => [true],
'Data source for archive doesn\'t directory' => [false],
'Data source for archive isn\'t directory' => [false],
];
}

Expand Down
8 changes: 5 additions & 3 deletions app/code/Magento/Authorizenet/Model/Directpost.php
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,7 @@ protected function processOrder(\Magento\Sales\Model\Order $order)
//decline the order (in case of wrong response code) but don't return money to customer.
$message = $e->getMessage();
$this->declineOrder($order, $message, false);

throw $e;
}

Expand Down Expand Up @@ -777,7 +778,7 @@ protected function processPaymentFraudStatus(\Magento\Sales\Model\Order\Payment
}

/**
* Add status comment
* Add status comment to history
*
* @param \Magento\Sales\Model\Order\Payment $payment
* @return $this
Expand Down Expand Up @@ -832,6 +833,7 @@ protected function declineOrder(\Magento\Sales\Model\Order $order, $message = ''
->void($response);
}
$order->registerCancellation($message)->save();
$this->_eventManager->dispatch('order_cancel_after', ['order' => $order ]);
} catch (\Exception $e) {
//quiet decline
$this->getPsrLogger()->critical($e);
Expand Down Expand Up @@ -866,7 +868,7 @@ public function getConfigInterface()
* Getter for specified value according to set payment method code
*
* @param mixed $key
* @param int|string|null|\Magento\Store\Model\Store $storeId
* @param mixed $storeId
* @return mixed
*/
public function getValue($key, $storeId = null)
Expand Down Expand Up @@ -930,7 +932,7 @@ public function fetchTransactionInfo(\Magento\Payment\Model\InfoInterface $payme
}

/**
* Add statuc comment on update.
* Add status comment on update
*
* @param \Magento\Sales\Model\Order\Payment $payment
* @param \Magento\Framework\DataObject $response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
* See COPYING.txt for license details.
*/

namespace Magento\Backend\Block\Widget\Form\Element;

/**
* Form element dependencies mapper
* Assumes that one element may depend on other element values.
* Will toggle as "enabled" only if all elements it depends from toggle as true.
*/
namespace Magento\Backend\Block\Widget\Form\Element;

/**
*
* @api
* @since 100.0.2
*/
Expand Down Expand Up @@ -117,6 +116,7 @@ public function addConfigOptions(array $options)

/**
* HTML output getter
*
* @return string
*/
protected function _toHtml()
Expand All @@ -139,7 +139,8 @@ protected function _toHtml()
}

/**
* Field dependences JSON map generator
* Field dependencies JSON map generator
*
* @return string
*/
protected function _getDependsJson()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
namespace Magento\Backend\Block\Widget\Grid\Massaction;

use Magento\Backend\Block\Widget\Grid\Massaction\VisibilityCheckerInterface as VisibilityChecker;
use Magento\Framework\Data\Collection\AbstractDb;
use Magento\Framework\DataObject;

/**
Expand Down Expand Up @@ -52,7 +53,7 @@ public function __construct(
}

/**
* @return void
* @inheritdoc
*/
protected function _construct()
{
Expand Down Expand Up @@ -217,6 +218,7 @@ public function getGridJsObjectName()
* Retrieve JSON string of selected checkboxes
*
* @return string
* @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
*/
public function getSelectedJson()
{
Expand All @@ -231,6 +233,7 @@ public function getSelectedJson()
* Retrieve array of selected checkboxes
*
* @return string[]
* @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
*/
public function getSelected()
{
Expand All @@ -252,6 +255,8 @@ public function getApplyButtonHtml()
}

/**
* Get mass action javascript code.
*
* @return string
*/
public function getJavaScript()
Expand All @@ -268,6 +273,8 @@ public function getJavaScript()
}

/**
* Get grid ids in JSON format.
*
* @return string
*/
public function getGridIdsJson()
Expand All @@ -284,6 +291,11 @@ public function getGridIdsJson()
$massActionIdField = $this->getParentBlock()->getMassactionIdField();
}

if ($allIdsCollection instanceof AbstractDb) {
$allIdsCollection->getSelect()->limit();
$allIdsCollection->clear();
}

$gridIds = $allIdsCollection->setPageSize(0)->getColumnValues($massActionIdField);
if (!empty($gridIds)) {
return join(",", $gridIds);
Expand All @@ -292,6 +304,8 @@ public function getGridIdsJson()
}

/**
* Get Html id.
*
* @return string
*/
public function getHtmlId()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?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="AdminSlideOutDialogSection">
<element name="closeButton" type="button" selector=".modal-slide._show [data-role='closeBtn']" timeout="30"/>
<element name="cancelButton" type="button" selector="//*[contains(@class, 'modal-slide') and contains(@class, '_show')]//*[contains(@class, 'page-actions')]//button[normalize-space(.)='Cancel']" timeout="30"/>
<element name="doneButton" type="button" selector="//*[contains(@class, 'modal-slide') and contains(@class, '_show')]//*[contains(@class, 'page-actions')]//button[normalize-space(.)='Done']" timeout="30"/>
<element name="saveButton" type="button" selector="//*[contains(@class, 'modal-slide') and contains(@class, '_show')]//*[contains(@class, 'page-actions')]//button[normalize-space(.)='Save']" timeout="30"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@
<actionGroup name="AdminOrderBraintreeFillActionGroup">
<!--Select Braintree Payment method on Admin Order Create Page-->
<click stepKey="chooseBraintree" selector="{{NewOrderSection.creditCardBraintree}}"/>
<waitForPageLoad stepKey="waitForBraintreeConfigs" time="5"/>
<waitForPageLoad stepKey="waitForBraintreeConfigs"/>
<click stepKey="openCardTypes" selector="{{NewOrderSection.openCardTypes}}"/>
<waitForPageLoad stepKey="waitForCardTypes" time="3"/>
<waitForPageLoad stepKey="waitForCardTypes"/>
<click stepKey="chooseCardType" selector="{{NewOrderSection.masterCard}}"/>
<waitForPageLoad stepKey="waitForCardSelected" time="3"/>
<waitForPageLoad stepKey="waitForCardSelected"/>

<!--Choose Master Card from drop-down list-->
<switchToIFrame stepKey="switchToCardNumber" selector="{{NewOrderSection.cardFrame}}"/>
<fillField stepKey="fillCardNumber" selector="{{NewOrderSection.creditCardNumber}}" userInput="{{PaymentAndShippingInfo.cardNumber}}"/>
<waitForPageLoad stepKey="waitForFillCardNumber" time="1"/>
<waitForPageLoad stepKey="waitForFillCardNumber"/>
<switchToIFrame stepKey="switchBackFromCard"/>

<!--Fill expire date-->
<switchToIFrame stepKey="switchToExpirationMonth" selector="{{NewOrderSection.monthFrame}}"/>
<fillField stepKey="fillMonth" selector="{{NewOrderSection.expirationMonth}}" userInput="{{PaymentAndShippingInfo.month}}"/>
<waitForPageLoad stepKey="waitForFillMonth" time="1"/>
<waitForPageLoad stepKey="waitForFillMonth"/>
<switchToIFrame stepKey="switchBackFromMonth"/>
<switchToIFrame stepKey="switchToExpirationYear" selector="{{NewOrderSection.yearFrame}}"/>
<fillField stepKey="fillYear" selector="{{NewOrderSection.expirationYear}}" userInput="{{PaymentAndShippingInfo.year}}"/>
<waitForPageLoad stepKey="waitForFillYear" time="1"/>
<waitForPageLoad stepKey="waitForFillYear"/>
<switchToIFrame stepKey="switchBackFromYear"/>

<!--Fill CVW code-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<actionGroup ref="StorefrontFillCartDataActionGroup" stepKey="StorefrontFillCartDataActionGroup"/>
<waitForPageLoad stepKey="waitForPageLoad4"/>
<!--Place order-->
<click selector="{{CheckoutPaymentSection.placeOrder}}"
<click selector="{{BraintreeConfigurationPaymentSection.paymentMethodContainer}}{{CheckoutPaymentSection.placeOrder}}"
stepKey="PlaceOrder"/>
<waitForPageLoad stepKey="waitForPageLoad5"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<test name="CreateAdminOrderPayedWithOnlinePaymentIncludingTaxAndDiscount">
<annotations>
<features value="Braintree"/>
<stories value="Get access to a New Credit Memo Page from Invocie for Order payed with online payment via Admin"/>
<stories value="Get access to a New Credit Memo Page from Invoice for Order payed with online payment via Admin"/>
<title value="Admin should be able to open a New Credit Memo Page from Invoice Page for Order with tax and discount and payed using online payment method"/>
<description value="Admin should be able to open a New Credit Memo Page from Invoice Page for Order with tax and discount and payed using online payment method"/>
<severity value="CRITICAL"/>
Expand Down Expand Up @@ -72,9 +72,9 @@

<!-- Create a cart price rule with 10% discount for whole cart -->
<click selector="{{AdminMenuSection.marketing}}" stepKey="clickOnMarketing" />
<waitForPageLoad stepKey="waitForMarketing" time="3"/>
<waitForPageLoad stepKey="waitForMarketing"/>
<click selector="{{CartPriceRulesSubmenuSection.cartPriceRules}}" stepKey="clickOnCartPriceRules"/>
<waitForPageLoad stepKey="waitForCartPriceRules" time="3"/>
<waitForPageLoad stepKey="waitForCartPriceRules"/>
<click selector="{{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey="clickAddNewRule"/>
<fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{SimpleSalesRule.name}}" stepKey="fillRuleName"/>
<selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="Main Website" stepKey="selectWebsites"/>
Expand All @@ -83,7 +83,7 @@
<selectOption selector="{{AdminCartPriceRulesFormSection.apply}}" userInput="Percent of product price discount" stepKey="selectActionType"/>
<fillField selector="{{AdminCartPriceRulesFormSection.discountAmount}}" userInput="10" stepKey="fillDiscountAmount"/>
<click selector="{{AdminCartPriceRulesFormSection.save}}" stepKey="clickSaveButton"/>
<waitForPageLoad stepKey="waitForCartRuleLoad" time="3"/>
<waitForPageLoad stepKey="waitForCartRuleLoad"/>
<see selector="{{AdminCartPriceRulesSection.messages}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/>

<!--Set Taxable Goods for Shipping Tax Class-->
Expand Down Expand Up @@ -112,15 +112,15 @@

<!--Submit Order-->
<click stepKey="submitOrder" selector="{{NewOrderSection.submitOrder}}"/>
<waitForPageLoad stepKey="waitForSubmitOrder" time="5"/>
<waitForPageLoad stepKey="waitForSubmitOrder"/>
<see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="You created the order." stepKey="seeOrderSuccessMessage" after="waitForSubmitOrder"/>

<!-- Create New invoice-->
<actionGroup ref="adminFastCreateInvoice" stepKey="createInvoice"/>

<!--Get access to Credit Memo page from Invoice page-->
<click selector="{{AdminInvoiceMainActionsSection.openNewCreditMemoFromInvoice}}" stepKey="clickCreateNewCreditMemo"/>
<waitForPageLoad stepKey="waitForLoadNewCreditMemoPage" time="5"/>
<waitForPageLoad stepKey="waitForLoadNewCreditMemoPage"/>
<see selector="{{AdminCreditMemoOrderInformationSection.orderStatus}}" userInput="Processing" stepKey="seeNewCreditMemo"/>
</test>
</tests>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@
*/
namespace Magento\Bundle\Controller\Adminhtml\Bundle\Product\Edit;

class Crosssell extends \Magento\Catalog\Controller\Adminhtml\Product\Crosssell
use Magento\Catalog\Controller\Adminhtml\Product\Crosssell as CatalogCrossel;
use Magento\Framework\App\Action\HttpPostActionInterface;

/**
* Class Crosssell
*
* @package Magento\Bundle\Controller\Adminhtml\Bundle\Product\Edit
* @deprecated Not used since cross-sell products grid moved to UI components.
* @see Magento_Catalog::view/adminhtml/ui_component/crosssell_product_listing.xml
*/
class Crosssell extends CatalogCrossel implements HttpPostActionInterface
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@
*/
namespace Magento\Bundle\Controller\Adminhtml\Bundle\Product\Edit;

class CrosssellGrid extends \Magento\Catalog\Controller\Adminhtml\Product\CrosssellGrid
use Magento\Catalog\Controller\Adminhtml\Product\CrosssellGrid as CatalogCrosssellGrid;
use Magento\Framework\App\Action\HttpPostActionInterface;

/**
* Class CrosssellGrid
*
* @package Magento\Bundle\Controller\Adminhtml\Bundle\Product\Edit
* @deprecated Not used since cross-sell products grid moved to UI components.
* @see Magento_Catalog::view/adminhtml/ui_component/crosssell_product_listing.xml
*/
class CrosssellGrid extends CatalogCrosssellGrid implements HttpPostActionInterface
{
}
Loading

0 comments on commit a423cc1

Please sign in to comment.