/**
  * Test create tax rule.
  *
  * @param TaxRule $taxRule
  * @return void
  */
 public function testCreateTaxRule(TaxRule $taxRule)
 {
     // Steps
     $this->taxRuleIndexPage->open();
     $this->taxRuleIndexPage->getGridPageActions()->addNew();
     $this->taxRuleNewPage->getTaxRuleForm()->fill($taxRule);
     $this->taxRuleNewPage->getFormPageActions()->save();
 }
 /**
  * Delete Tax Rule on backend
  *
  * @return array
  */
 public function run()
 {
     $this->taxRuleIndexPage->open();
     while ($this->taxRuleIndexPage->getTaxRuleGrid()->isFirstRowVisible()) {
         $this->taxRuleIndexPage->getTaxRuleGrid()->openFirstRow();
         $this->taxRuleNewPage->getFormPageActions()->delete();
     }
 }
 /**
  * Delete Tax Rule Entity test.
  *
  * @param TaxRule $taxRule
  * @return void
  */
 public function testDeleteTaxRule(TaxRule $taxRule)
 {
     // Precondition
     $taxRule->persist();
     // Steps
     $this->taxRuleIndexPage->open();
     $this->taxRuleIndexPage->getTaxRuleGrid()->searchAndOpen(['code' => $taxRule->getCode()]);
     $this->taxRuleNewPage->getFormPageActions()->delete();
 }
 /**
  * Delete Tax Rule on backend
  *
  * @return array
  */
 public function run()
 {
     $this->taxRuleIndexPage->open();
     $this->taxRuleIndexPage->getTaxRuleGrid()->resetFilter();
     while ($this->taxRuleIndexPage->getTaxRuleGrid()->isFirstRowVisible()) {
         $this->taxRuleIndexPage->getTaxRuleGrid()->openFirstRow();
         $this->taxRuleNewPage->getFormPageActions()->delete();
         $this->taxRuleNewPage->getModalBlock()->acceptAlert();
     }
 }
 /**
  * Update Tax Rule Entity test.
  *
  * @param TaxRule $initialTaxRule
  * @param TaxRule $taxRule
  * @return void
  */
 public function testUpdateTaxRule(TaxRule $initialTaxRule, TaxRule $taxRule)
 {
     // Precondition
     $initialTaxRule->persist();
     // Steps
     $this->taxRuleIndexPage->open();
     $this->taxRuleIndexPage->getTaxRuleGrid()->searchAndOpen(['code' => $initialTaxRule->getCode()]);
     $this->taxRuleNewPage->getTaxRuleForm()->fill($taxRule);
     $this->taxRuleNewPage->getFormPageActions()->save();
 }
Пример #6
0
 /**
  * Delete Tax Rule Entity test
  *
  * @param TaxRule $taxRule
  * @param AddressInjectable $address
  * @param array $shipping
  *
  * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  */
 public function testDeleteTaxRule(TaxRule $taxRule, AddressInjectable $address, array $shipping)
 {
     // Precondition
     $taxRule->persist();
     // Steps
     $filters = ['code' => $taxRule->getCode()];
     $this->taxRuleIndexPage->open();
     $this->taxRuleIndexPage->getTaxRuleGrid()->searchAndOpen($filters);
     $this->taxRuleNewPage->getFormPageActions()->delete();
 }