Skip to content

Commit e4404d2

Browse files
committed
MTA-3389: Alert Modal Block after deleting Sale or Catalog Rule randomly is not clickable
1 parent 27c7763 commit e4404d2

File tree

1 file changed

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

1 file changed

+16
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class Modal extends Block
5555
*/
5656
public function acceptAlert()
5757
{
58+
$this->waitModalAnimationFinished();
5859
$this->_rootElement->find($this->acceptButtonSelector)->click();
5960
}
6061

@@ -65,6 +66,7 @@ public function acceptAlert()
6566
*/
6667
public function dismissAlert()
6768
{
69+
$this->waitModalAnimationFinished();
6870
$this->_rootElement->find($this->dismissButtonSelector)->click();
6971
}
7072

@@ -75,6 +77,7 @@ public function dismissAlert()
7577
*/
7678
public function closeAlert()
7779
{
80+
$this->waitModalAnimationFinished();
7881
$this->_rootElement->find($this->closeButtonSelector)->click();
7982
}
8083

@@ -85,6 +88,7 @@ public function closeAlert()
8588
*/
8689
public function getAlertText()
8790
{
91+
$this->waitModalAnimationFinished();
8892
return $this->_rootElement->find($this->inputFieldSelector)->getValue();
8993
}
9094

@@ -96,6 +100,7 @@ public function getAlertText()
96100
*/
97101
public function setAlertText($text)
98102
{
103+
$this->waitModalAnimationFinished();
99104
$this->_rootElement->find($this->inputFieldSelector)->setValue($text);
100105
}
101106

@@ -112,4 +117,15 @@ function () {
112117
}
113118
);
114119
}
120+
121+
/**
122+
* Waiting until CSS animation is done.
123+
* Transition-duration is set at this file: "<magento_root>/lib/web/css/source/components/_modals.less"
124+
*
125+
* @return void
126+
*/
127+
private function waitModalAnimationFinished()
128+
{
129+
usleep(500000);
130+
}
115131
}

0 commit comments

Comments
 (0)