Skip to content

Commit

Permalink
Merge pull request #7448 from magento-gl/L3_Arrows_PR_20220209
Browse files Browse the repository at this point in the history
L3 arrows pr 20220209
  • Loading branch information
viktym authored Feb 15, 2022
2 parents 2d44647 + 3dffebe commit 65714d4
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,48 +14,41 @@
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
{
/**
* Review table
*
* @var string
*/
protected $_reviewTable = null;

/**
* Review detail table
*
* @var string
*/
protected $_reviewDetailTable = null;

/**
* Review status table
*
* @var string
*/
protected $_reviewStatusTable = null;

/**
* Review entity table
*
* @var string
*/
protected $_reviewEntityTable = null;

/**
* Review store table
*
* @var string
*/
protected $_reviewStoreTable = null;

/**
* Add store data flag
* @var bool
*/
protected $_addStoreDataFlag = false;

/**
* Review data
*
* @var \Magento\Review\Helper\Data
*/
Expand Down Expand Up @@ -125,7 +118,7 @@ protected function _initSelect()
$this->getSelect()->join(
['detail' => $this->getReviewDetailTable()],
'main_table.review_id = detail.review_id',
['detail_id', 'title', 'detail', 'nickname', 'customer_id']
['detail_id', 'store_id', 'title', 'detail', 'nickname', 'customer_id']
);
return $this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function testInitSelect(): void
->with(
['detail' => 'review_detail'],
'main_table.review_id = detail.review_id',
['detail_id', 'title', 'detail', 'nickname', 'customer_id']
['detail_id', 'store_id', 'title', 'detail', 'nickname', 'customer_id']
);
$this->objectManager->getObject(
Collection::class,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?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="AdminFilterOrderByPurchaseDateReset">
<annotations>
<title value="Create Order in Admin with simple product"/>
<stories value="ACP2E-188: Date picker filters are not cleared after deleting the filter in Sales Order grid"/>
<description value="Search order by purchase date and clear date filter"/>
<features value="Sales"/>
<testCaseId value="ACP2E-188"/>
<severity value="MAJOR"/>
<group value="Sales"/>
</annotations>
<before>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="navigateToOrderIndexPage"/>
<waitForPageLoad stepKey="waitForIndexPageLoad"/>
<actionGroup ref="FilterOrderGridByPurchaseDateActionGroup" stepKey="filterOrderByPurchaseDate">
<argument name="from" value="01/18/2021" />
<argument name="to" value="01/18/2021" />
</actionGroup>
<actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearOrderFilter"/>
<grabValueFrom selector="{{AdminDataGridHeaderSection.filterFieldInput('created_at[from]')}}" stepKey="grabPurchasedDateFrom"/>
<grabValueFrom selector="{{AdminDataGridHeaderSection.filterFieldInput('created_at[to]')}}" stepKey="grabPurchasedDateTo"/>
<assertEmpty stepKey="checkPurchaseDateFromReset">
<actualResult type="string">$grabPurchasedDateFrom</actualResult>
</assertEmpty>
<assertEmpty stepKey="checkPurchaseDateToReset">
<actualResult type="string">$grabPurchasedDateTo</actualResult>
</assertEmpty>
<after>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ define([
* For more info about options take a look at "mage/calendar" and jquery.ui.datepicker widget.
* @param {HTMLElement} el - Element, that binding is applied to
* @param {Function} valueAccessor - Function that returns value, passed to binding
* @param {object} allBindings
* @param {object} viewModel
* @param {object} bindingContext
*/
init: function (el, valueAccessor) {
init: function (el, valueAccessor, allBindings, viewModel, bindingContext) {
var config = valueAccessor(),
observable,
options = {};
Expand All @@ -50,6 +53,16 @@ define([
observable(this.value);
});
});

if (bindingContext.$data) {
bindingContext.$data.value.subscribe(function (newVal) {
if (!newVal) {
$(el).val('');
}
}, this);
}


},

/**
Expand Down

0 comments on commit 65714d4

Please sign in to comment.