/** * @group list * @guy DeliveryTester\DeliverySteps */ public function buttonDelete(DeliveryTester\DeliverySteps $I) { $I->amOnPage(DeliveryPage::$URL); $row = $I->SearchDeliveryMethod($this->name); if (!$row) { $I->createDelivery($this->name); $row = $I->SearchDeliveryMethod($this->name); } $I->comment("{$row}"); $I->click(DeliveryPage::ListCheckboxLine($row)); $I->click(DeliveryPage::$DeleteButton); $I->waitForText("Удаление способов доставки", NULL, "//*[@id='mainContent']/div/div[1]/div[1]/h3"); $I->wait(2); $I->click(DeliveryPage::$DeleteWindowDelete); $I->exactlySeeAlert($I, 'success', 'Способ доставки удален'); }
/** * @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'); } }
/** * @group create * @guy DeliveryTester\DeliverySteps */ public function deliveryPaymentVerify(DeliveryTester\DeliverySteps $I) { $PaymentMethods = $I->GrabAllCreatedPayments(); $row = 1; $I->amOnPage(DeliveryCreatePage::$URL); $I->waitForText("Создание способа доставки", NULL, '.title'); $I->comment("I want to Verify created Pay Methods with Create Page Pay Methods"); foreach ($PaymentMethods as $Currentpay) { $I->comment($Currentpay); $CreatePagePay = $I->grabTextFrom(DeliveryCreatePage::PaymentMethodLabel($row)); $I->assertEquals($CreatePagePay, $Currentpay); $row++; } }