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