Skip to content

Commit 02f8c38

Browse files
committed
Fix functional test.
1 parent a7ce7f2 commit 02f8c38

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

dev/tests/functional/tests/app/Magento/User/Test/TestStep/CloseErrorAlertStep.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,15 @@ public function __construct(
4343
public function run()
4444
{
4545
$modalMessage = $this->dashboard->getModalMessage();
46-
$this->browser->waitUntil(
47-
function () use ($modalMessage) {
48-
return $modalMessage->isVisible() ? true : null;
49-
}
50-
);
51-
$modalMessage->acceptAlert();
46+
try {
47+
$this->browser->waitUntil(
48+
function () use ($modalMessage) {
49+
return $modalMessage->isVisible() ? true : null;
50+
}
51+
);
52+
$modalMessage->acceptAlert();
53+
} catch (\PHPUnit_Extensions_Selenium2TestCase_WebDriverException $e) {
54+
//There is no modal to accept.
55+
}
5256
}
5357
}

0 commit comments

Comments
 (0)