Skip to content

Commit e352aea

Browse files
committed
ACP2E-56 : [On Prem] Magento invoice order date filter not working
1 parent 1ef6fe1 commit e352aea

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

dev/tests/integration/testsuite/Magento/Cms/Model/ResourceModel/Block/Grid/CollectionTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,9 @@ public function testAddFieldToFilter($field): void
5050
$convertedDate = $timeZone->convertConfigTimeToUtc($filterDate);
5151

5252
$collection = $gridCollection->addFieldToFilter($field, ['qteq' => $filterDate]);
53-
$expectedSelect = "SELECT `main_table`.* FROM `cms_block` AS `main_table` " .
54-
"WHERE ((((`{$field}` = '{$convertedDate}')))) " .
55-
"AND (main_table.created_in <= 1) AND (main_table.updated_in > 1)";
53+
$expectedSelectCondition = "`{$field}` = '{$convertedDate}'";
5654

57-
$this->assertEquals($expectedSelect, $collection->getSelectSql(true));
55+
$this->assertStringContainsString($expectedSelectCondition, $collection->getSelectSql(true));
5856
}
5957

6058
/**

dev/tests/integration/testsuite/Magento/Cms/Model/ResourceModel/Page/Grid/CollectionTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,9 @@ public function testAddFieldToFilter($field): void
5050
$convertedDate = $timeZone->convertConfigTimeToUtc($filterDate);
5151

5252
$collection = $gridCollection->addFieldToFilter($field, ['qteq' => $filterDate]);
53-
$expectedSelect = "SELECT `main_table`.* FROM `cms_page` AS `main_table` " .
54-
"WHERE ((((`{$field}` = '{$convertedDate}')))) " .
55-
"AND (main_table.created_in <= 1) AND (main_table.updated_in > 1)";
53+
$expectedSelectCondition = "`{$field}` = '{$convertedDate}'";
5654

57-
$this->assertEquals($expectedSelect, $collection->getSelectSql(true));
55+
$this->assertStringContainsString($expectedSelectCondition, $collection->getSelectSql(true));
5856
}
5957

6058
/**

0 commit comments

Comments
 (0)