Пример #1
0
 /**
  * Delete Term Entity test.
  *
  * @param CheckoutAgreement $agreement
  * @return void
  */
 public function test(CheckoutAgreement $agreement)
 {
     // Precondition
     $agreement->persist();
     // Steps
     $this->agreementIndex->open()->getAgreementGridBlock()->searchAndOpen(['name' => $agreement->getName()]);
     $this->agreementNew->getPageActionsBlock()->delete();
 }
 /**
  * Update checkout agreement.
  *
  * @return array
  */
 public function run()
 {
     $this->agreementIndex->open();
     $this->agreementIndex->getAgreementGridBlock()->searchAndOpen(['name' => $this->agreement->getName()]);
     $this->agreementNew->getAgreementsForm()->fill($this->agreementUpdated);
     $this->agreementNew->getPageActionsBlock()->save();
     return ['agreement' => $this->agreementUpdated];
 }
Пример #3
0
 /**
  * Update Term Entity test.
  *
  * @param CheckoutAgreementNew $agreementNew
  * @param CheckoutAgreementIndex $agreementIndex
  * @param CheckoutAgreement $agreement
  * @param CheckoutAgreement $agreementOrigin
  * @return void
  */
 public function test(CheckoutAgreementNew $agreementNew, CheckoutAgreementIndex $agreementIndex, CheckoutAgreement $agreement, CheckoutAgreement $agreementOrigin)
 {
     // Precondition
     $agreementOrigin->persist();
     // Steps
     $agreementIndex->open();
     $agreementIndex->getAgreementGridBlock()->searchAndOpen(['name' => $agreementOrigin->getName()]);
     $agreementNew->getAgreementsForm()->fill($agreement);
     $agreementNew->getPageActionsBlock()->save();
 }
 /**
  * Assert that checkout agreement is absent in agreement grid.
  *
  * @param CheckoutAgreementIndex $agreementIndex
  * @param CheckoutAgreement $agreement
  * @return void
  */
 public function processAssert(CheckoutAgreementIndex $agreementIndex, CheckoutAgreement $agreement)
 {
     $agreementIndex->open();
     \PHPUnit_Framework_Assert::assertFalse($agreementIndex->getAgreementGridBlock()->isRowVisible(['name' => $agreement->getName()]), 'Checkout Agreement \'' . $agreement->getName() . '\' is present in agreement grid.');
 }
 /**
  * Delete checkout agreement.
  *
  * @return array
  */
 public function run()
 {
     $this->agreementIndex->open()->getAgreementGridBlock()->searchAndOpen(['name' => $this->agreement->getName()]);
     $this->agreementNew->getPageActionsBlock()->delete();
     $this->agreementNew->getModalBlock()->acceptAlert();
 }
 /**
  * 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();
 }
 /**
  * Create checkout agreement.
  *
  * @return array
  */
 public function run()
 {
     $this->agreement->persist();
     return ['agreement' => $this->agreement];
 }