Skip to content

Commit 35911a3

Browse files
authored
ENGCOM-3870: Backend: User Role Checkbox alignement. #20237
2 parents 3f8dee5 + ac4acd9 commit 35911a3

File tree

2 files changed

+12
-1
lines changed
  • app/design/adminhtml/Magento/backend/Magento_Ui/web/css/source/module
  • dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml

2 files changed

+12
-1
lines changed

app/design/adminhtml/Magento/backend/Magento_Ui/web/css/source/module/_data-grid.less

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@ body._in-resize {
392392
overflow: hidden;
393393
padding: 0;
394394
vertical-align: top;
395+
vertical-align: middle;
395396
width: @control-checkbox-radio__size + @data-grid-checkbox-cell-inner__padding-horizontal * 2;
396397

397398
&:hover {
@@ -1075,8 +1076,9 @@ body._in-resize {
10751076

10761077
.data-grid-checkbox-cell-inner {
10771078
display: unset;
1078-
margin: @data-grid-checkbox-cell-inner__padding-top @data-grid-checkbox-cell-inner__padding-horizontal .9rem;
1079+
margin: 0 @data-grid-checkbox-cell-inner__padding-horizontal 0;
10791080
padding: 0;
1081+
text-align: center;
10801082
}
10811083

10821084
// Content Hierarchy specific

dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/DataGrid.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@ class DataGrid extends Grid
162162
*/
163163
protected $currentPage = ".//*[@data-ui-id='current-page-input'][not(ancestor::*[@class='sticky-header'])]";
164164

165+
/**
166+
* Top page element to implement a scrolling in case of grid element not visible.
167+
*/
168+
private $topElementToScroll = 'header.page-header';
169+
165170
/**
166171
* Clear all applied Filters.
167172
*
@@ -368,6 +373,10 @@ public function selectItems(array $items, $isSortable = true)
368373
$this->sortGridByField('ID');
369374
}
370375
foreach ($items as $item) {
376+
//Scroll to the top of the page in case current page input is not visible.
377+
if (!$this->_rootElement->find($this->currentPage, Locator::SELECTOR_XPATH)->isVisible()) {
378+
$this->browser->find($this->topElementToScroll)->hover();
379+
}
371380
$this->_rootElement->find($this->currentPage, Locator::SELECTOR_XPATH)->setValue('');
372381
$this->waitLoader();
373382
$selectItem = $this->getRow($item)->find($this->selectItem);

0 commit comments

Comments
 (0)