Esempio n. 1
0
 /**
  * @group edit
  * @guy DeliveryTester\DeliverySteps
  */
 public function eCheckPriceSpecified(DeliveryTester\DeliverySteps $I)
 {
     $class = $I->grabAttributeFrom(DeliveryEditPage::$CheckboxPriceSpecified . '/..', 'class');
     $I->comment($class);
     $class == 'frame_label no_connection active' ? $I->click(DeliveryEditPage::$CheckboxPriceSpecified) : (print "");
     $class = $I->grabAttributeFrom(DeliveryEditPage::$CheckboxPriceSpecified . '/..', 'class');
     if ($class == 'frame_label no_connection') {
         $diabledPrice = $I->grabAttributeFrom(DeliveryEditPage::$FieldPrice, 'disabled');
         $diabledFreefrom = $I->grabAttributeFrom(DeliveryEditPage::$FieldFreeFrom, 'disabled');
         $I->assertEquals($diabledPrice, NULL);
         $I->assertEquals($diabledFreefrom, NULL);
     } else {
         $I->fail('wrong class of checkbox sum specified');
     }
     $I->click(DeliveryCreatePage::$CheckboxPriceSpecified);
     $class = $I->grabAttributeFrom(DeliveryEditPage::$CheckboxPriceSpecified . '/..', 'class');
     if ($class == 'frame_label no_connection active') {
         $diabledPrice = $I->grabAttributeFrom(DeliveryEditPage::$FieldPrice, 'disabled');
         $diabledFreefrom = $I->grabAttributeFrom(DeliveryEditPage::$FieldFreeFrom, 'disabled');
         $I->assertEquals($diabledPrice, "true");
         $I->assertEquals($diabledFreefrom, "true");
     } else {
         $I->fail('wrong class of checkbox sum specified');
     }
 }
Esempio n. 2
0
 /**
  * Verify that unactive method isn't present at frontend
  * 
  * @group list
  * @guy DeliveryTester\DeliverySteps
  */
 public function toggleUnActive(DeliveryTester\DeliverySteps $I)
 {
     $I->amOnPage(DeliveryPage::$URL);
     $row = $I->SearchDeliveryMethod($this->name);
     if ($row) {
         $ActiveButtonClass = $I->grabAttributeFrom(DeliveryPage::ListActiveButtonLine($row), 'class');
         $I->comment($ActiveButtonClass);
         if ($ActiveButtonClass == 'prod-on_off ') {
             $I->click(DeliveryPage::ListActiveButtonLine($row));
         }
         $missing = $I->CheckMethodNotPresentInFrontEnd($this->name);
         if (!$missing) {
             $I->fail('Unactive Method is present in front end');
         } elseif ($missing) {
             $I->assertEquals(true, true, "Unactive Method is missing in front end");
         }
     } else {
         $I->fail('There are no method $this->name for testing ToggleUnActive, create it before test');
     }
 }