Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
StatusGrid.php
Go to the documentation of this file.
1 <?php
8 
13 {
17  protected $filters = [
18  'label' => [
19  'selector' => '#sales_order_status_grid_filter_label',
20  ],
21  'status' => [
22  'selector' => '#sales_order_status_grid_filter_status',
23  ],
24  'state' => [
25  'selector' => '#sales_order_status_grid_filter_state',
26  ],
27  ];
28 
34  protected $editLink = '[data-column="label"]';
35 
41  protected $unassignLink = '[data-column="unassign"] a';
42 
50  public function searchAndUnassign(array $filter)
51  {
52  $this->search($filter);
53  $selectItem = $this->_rootElement->find($this->unassignLink);
54  if ($selectItem->isVisible()) {
55  $selectItem->click();
56  } else {
57  throw new \Exception("Searched item was not found by filter\n" . print_r($filter, true));
58  }
59  }
60 
67  public function isAssign(array $filter)
68  {
69  $this->search($filter);
70  return $this->_rootElement->find($this->unassignLink)->isVisible();
71  }
72 }