Skip to content

Commit ea33f5f

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-75612' into 2.1-develop-pr31
2 parents 5fe8cdd + a7eb5cc commit ea33f5f

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/View/Tab/Shipments/Grid.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,29 @@
66

77
namespace Magento\Sales\Test\Block\Adminhtml\Order\View\Tab\Shipments;
88

9+
use Magento\Ui\Test\Block\Adminhtml\DataGrid;
10+
911
/**
10-
* Class Grid
11-
* Shipments grid on order view page
12+
* Shipments grid on order view page.
1213
*/
13-
class Grid extends \Magento\Backend\Test\Block\Widget\Grid
14+
class Grid extends DataGrid
1415
{
1516
/**
16-
* Locator value for link in action column
17+
* Locator value for link in action column.
1718
*
1819
* @var string
1920
*/
2021
protected $editLink = '[data-column="real_shipment_id"]';
2122

2223
/**
23-
* Locator for shipment ids
24+
* Locator for shipment ids.
2425
*
2526
* @var string
2627
*/
2728
protected $shipmentId = 'tbody td:nth-child(2)';
2829

2930
/**
30-
* Filters array mapping
31+
* Filters array mapping.
3132
*
3233
* @var array
3334
*/
@@ -44,12 +45,13 @@ class Grid extends \Magento\Backend\Test\Block\Widget\Grid
4445
];
4546

4647
/**
47-
* Get shipment ids
48+
* Get shipment ids.
4849
*
4950
* @return array
5051
*/
5152
public function getIds()
5253
{
54+
$this->waitLoader();
5355
$result = [];
5456
$shipmentIds = $this->_rootElement->getElements($this->shipmentId);
5557
foreach ($shipmentIds as $shipmentId) {

dev/tests/functional/tests/app/Magento/Shipping/Test/Constraint/AssertShipmentInShipmentsTab.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,21 @@ public function processAssert(
3939

4040
foreach ($ids['shipmentIds'] as $key => $shipmentId) {
4141
$filter = [
42+
'id' => $shipmentId,
43+
'qty' => number_format($totalQty[$key], 4, '.', ''),
44+
];
45+
$filterQty = [
4246
'id' => $shipmentId,
4347
'qty_from' => $totalQty[$key],
4448
'qty_to' => $totalQty[$key],
4549
];
50+
$salesOrderView->getOrderForm()->getTab('shipments')->getGridBlock()->search($filterQty);
4651
\PHPUnit_Framework_Assert::assertTrue(
47-
$salesOrderView->getOrderForm()->getTab('shipments')->getGridBlock()->isRowVisible($filter),
52+
$salesOrderView
53+
->getOrderForm()
54+
->getTab('shipments')
55+
->getGridBlock()
56+
->isRowVisible($filter, false),
4857
'Shipment is absent on shipments tab.'
4958
);
5059
}

0 commit comments

Comments
 (0)