/**
  * Assert that checkout agreement is present in agreement grid.
  *
  * @param CheckoutAgreementIndex $agreementIndex
  * @param CheckoutAgreement $checkoutAgreement
  * @return void
  */
 public function processAssert(CheckoutAgreementIndex $agreementIndex, CheckoutAgreement $checkoutAgreement)
 {
     $agreementIndex->open();
     \PHPUnit_Framework_Assert::assertTrue($agreementIndex->getAgreementGridBlock()->isRowVisible(['name' => $checkoutAgreement->getName()]), 'Checkout Agreement "' . $checkoutAgreement->getName() . '" is absent in agreement grid.');
 }
Beispiel #2
0
 /**
  * Check agreement.
  *
  * @param CheckoutAgreement $agreement
  * @return bool
  */
 public function checkAgreement(CheckoutAgreement $agreement)
 {
     return $this->_rootElement->find(sprintf($this->agreement, $agreement->getCheckboxText()), Locator::SELECTOR_XPATH)->isVisible();
 }