diff --git a/app/design/adminhtml/Magento/backend/Magento_Ui/web/css/source/module/_data-grid.less b/app/design/adminhtml/Magento/backend/Magento_Ui/web/css/source/module/_data-grid.less index 829e03f461508..946d11db2d1a2 100644 --- a/app/design/adminhtml/Magento/backend/Magento_Ui/web/css/source/module/_data-grid.less +++ b/app/design/adminhtml/Magento/backend/Magento_Ui/web/css/source/module/_data-grid.less @@ -392,6 +392,7 @@ body._in-resize { overflow: hidden; padding: 0; vertical-align: top; + vertical-align: middle; width: @control-checkbox-radio__size + @data-grid-checkbox-cell-inner__padding-horizontal * 2; &:hover { @@ -1075,8 +1076,9 @@ body._in-resize { .data-grid-checkbox-cell-inner { display: unset; - 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 diff --git a/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/DataGrid.php b/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/DataGrid.php index 03476add669be..56ca47331fa1c 100644 --- a/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/DataGrid.php +++ b/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/DataGrid.php @@ -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. * @@ -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);