Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
LinkRow.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Mtf\Block\Form;
10 use Magento\Mtf\Client\ElementInterface;
11 use Magento\Mtf\Client\Locator;
12 
16 class LinkRow extends Form
17 {
23  protected $deleteButton = 'button[data-action="remove_row"]';
24 
30  protected $sortDraggableHandle = '*[class=draggable-handle]';
31 
38  public function fillLinkRow(array $fields)
39  {
40  $mapping = $this->dataMapping($fields);
41  $this->_fill($mapping);
42  }
43 
50  public function getDataLinkRow(array $fields)
51  {
52  $mapping = $this->dataMapping($fields);
53  return $this->_getData($mapping);
54  }
55 
61  public function clickDeleteButton()
62  {
63  $this->_rootElement->find($this->deleteButton)->click();
64  }
65 
72  public function dragAndDropTo(ElementInterface $target)
73  {
74  $this->getSortHandle()->dragAndDrop($target);
75  }
76 
82  public function getSortHandle()
83  {
84  return $this->_rootElement->find($this->sortDraggableHandle);
85  }
86 }
$target
Definition: skip.phtml:8
$fields
Definition: details.phtml:14