Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertAdditionalAddressDeletedFrontend.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Customer\Test\Page\CustomerAccountIndex;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
15 class AssertAdditionalAddressDeletedFrontend extends AbstractConstraint
16 {
20  const EXPECTED_MESSAGE = 'You have no other address entries in your address book.';
21 
28  public function processAssert(CustomerAccountIndex $customerAccountIndex)
29  {
30  $customerAccountIndex->open();
31  $customerAccountIndex->getAccountMenuBlock()->openMenuItem('Address Book');
32  $actualText = $customerAccountIndex->getAdditionalAddressBlock()->getBlockText();
33  \PHPUnit\Framework\Assert::assertTrue(
34  self::EXPECTED_MESSAGE == $actualText,
35  'Expected text is absent in Additional Address block.'
36  );
37  }
38 
44  public function toString()
45  {
46  return 'Deleted address is absent in "Additional Address Entries" block.';
47  }
48 }