Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertCaptchaFieldOnStorefront.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Customer\Test\Page\CustomerAccountLogin;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
15 class AssertCaptchaFieldOnStorefront extends AbstractConstraint
16 {
23  public function processAssert(CustomerAccountLogin $loginPage)
24  {
25  \PHPUnit\Framework\Assert::assertTrue(
26  $loginPage->getLoginBlockWithCaptcha()->isVisibleCaptcha(),
27  'Captcha image is not present on storefront login page.'
28  );
29 
30  \PHPUnit\Framework\Assert::assertTrue(
31  $loginPage->getLoginBlockWithCaptcha()->isVisibleCaptchaReloadButton(),
32  'Captcha reload button is not present on storefront login page.'
33  );
34  }
35 
41  public function toString()
42  {
43  return 'Captcha and reload button are presents on storefront login page.';
44  }
45 }