Skip to content

Commit 66289b4

Browse files
ENGCOM-3870: Backend: User Role Checkbox alignement. #20237
- Merge Pull Request #20237 from suryakant-krish/magento2:checkbox-align - Merged commits: 1. 9569278 2. 926ba33 3. fc3a1a6 4. c7e0a40 5. 9eaa5fc
2 parents 9c16bdb + 9eaa5fc commit 66289b4

File tree

1 file changed

+9
-0
lines changed
  • dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml

1 file changed

+9
-0
lines changed

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)