Skip to content

Commit

Permalink
fixes-for-magento#20237-2-2
Browse files Browse the repository at this point in the history
  • Loading branch information
Nainesh committed Feb 19, 2019
1 parent a72f59b commit 1162e1d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ body._in-resize {
.data-grid-checkbox-cell {
overflow: hidden;
padding: 0;
vertical-align: top;
vertical-align: middle;
width: @control-checkbox-radio__size + @data-grid-checkbox-cell-inner__padding-horizontal * 2;

&:hover {
Expand Down Expand Up @@ -1090,8 +1090,9 @@ body._in-resize {
}

.data-grid-checkbox-cell-inner {
margin: @data-grid-checkbox-cell-inner__padding-top @data-grid-checkbox-cell-inner__padding-horizontal .9rem;
margin: 0 @data-grid-checkbox-cell-inner__padding-horizontal 0;
padding: 0;
text-align: center;
}

// Content Hierarchy specific
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ class DataGrid extends Grid
*/
protected $currentPage = ".//*[@data-ui-id='current-page-input'][not(ancestor::*[@class='sticky-header'])]";

/**
* Top page element to implement a scrolling in case of grid element not visible.
*/
private $topElementToScroll = 'header.page-header';

/**
* Clear all applied Filters.
*
Expand Down Expand Up @@ -368,6 +373,10 @@ public function selectItems(array $items, $isSortable = true)
$this->sortGridByField('ID');
}
foreach ($items as $item) {
//Scroll to the top of the page in case current page input is not visible.
if (!$this->_rootElement->find($this->currentPage, Locator::SELECTOR_XPATH)->isVisible()) {
$this->browser->find($this->topElementToScroll)->hover();
}
$this->_rootElement->find($this->currentPage, Locator::SELECTOR_XPATH)->setValue('');
$this->waitLoader();
$selectItem = $this->getRow($item)->find($this->selectItem);
Expand Down

0 comments on commit 1162e1d

Please sign in to comment.