public function Symbols9FixMethodInCreate(DiscountsTester $I)
 {
     $I->amOnPage("/admin/components/init_window/mod_discount/create");
     $I->fillField(DiscountsPage::$NameDiscountCreate, '9SymbolsFixMethodDiscount + LimitDiscount');
     $I->click(DiscountsPage::$UnlimitedCheckboxCreate);
     $I->fillField(DiscountsPage::$AmountOfUse, '1');
     $I->click(DiscountsPage::$SelectMethod);
     $I->click(DiscountsPage::$SelectMethod . '/option[2]');
     $I->fillField(DiscountsPage::$ValueDiscount, '222222222');
     $I->click(DiscountsPage::$SelectTypeDiscount);
     $I->click(DiscountsPage::$SelectTypeDiscount . '/option[2]');
     $I->fillField(DiscountsPage::$BeginValueDiscount, '6');
     $I->click(DiscountsPage::$OnDateCreate);
     $I->click(".//*[@id='ui-datepicker-div']/table/tbody/tr[last()]/td/a");
     $date = $I->grabValueFrom(DiscountsPage::$OnDateCreate);
     $I->comment($date);
     $I->click(DiscountsPage::$SaveButton);
     $I->waitForText("Редактирование скидки");
     //$I->waitForElementVisible('.alert.in.fade.alert-success');
     //$I->see('Скидка успешно создана!');
     //$I->waitForElementNotVisible('.alert.in.fade.alert-success');
     $I->seeInField(DiscountsPage::$NameDiscountEdit, '9SymbolsFixMethodDiscount + LimitDiscount');
     $I->seeInField(DiscountsPage::$AmountOfUse, '1');
     $I->seeInField(DiscountsPage::$ValueDiscount, '222222222');
     $I->seeInField(DiscountsPage::$BeginValueDiscount, '6');
     $I->seeInField(DiscountsPage::$OnDateEdit, "{$date}");
     $keyDisc = $I->grabValueFrom(DiscountsPage::$DiscountKey);
     $I->comment($keyDisc);
     $I->click(DiscountsPage::$GoBackButton);
     $I->waitForText('Скидки интернет-магазина');
     $I->see($keyDisc, DiscountsPage::DisKeyLine('1'));
     $I->see('9SymbolsFixMethodDiscount + LimitDiscount', DiscountsPage::NameLine('1'));
     $I->see('1', DiscountsPage::LimitLine('1'));
     $I->see('-', DiscountsPage::UseDiscLine('1'));
     $I->see($date, DiscountsPage::BeginTimeLine('1'));
     $I->see('-', DiscountsPage::EndTimeLine('1'));
     $activeDisc = $I->grabAttributeFrom(DiscountsPage::ActiveButtonLine('1'), 'class');
     $I->comment($activeDisc);
     $I->assertEquals($activeDisc, 'prod-on_off');
 }
 public function GiftPercentMethodInCreate(DiscountsTester $I)
 {
     $I->amOnPage("/admin/components/init_window/mod_discount/create");
     $I->fillField(DiscountsPage::$NameDiscountCreate, 'GiftPercentDiscount');
     $I->fillField(DiscountsPage::$ValueDiscount, '10');
     $I->click(DiscountsPage::$SelectTypeDiscount);
     $I->click(DiscountsPage::$SelectTypeDiscount . '/option[2]');
     $I->click(DiscountsPage::$GiftSertificateCheckbox);
     $disabledCheckbox = $I->grabAttributeFrom(DiscountsPage::$UnlimitedCheckboxCreate . '/..', "style");
     $I->comment($disabledCheckbox);
     $I->assertEquals($disabledCheckbox, "display: none;");
     $I->seeInField(DiscountsPage::$AmountOfUse, '1');
     $I->click(DiscountsPage::$OnDateCreate);
     $I->click(".//*[@id='ui-datepicker-div']/table/tbody/tr[4]/td/a");
     $date = $I->grabValueFrom(DiscountsPage::$OnDateCreate);
     $I->comment($date);
     $I->click(DiscountsPage::$SaveButton);
     $I->waitForText("Редактирование скидки");
     $I->seeInField(DiscountsPage::$NameDiscountEdit, 'GiftPercentDiscount');
     $I->seeInField(DiscountsPage::$ValueDiscount, '10');
     $I->seeOptionIsSelected(DiscountsPage::$SelectMethod, 'Проценты');
     $I->seeInField(DiscountsPage::$OnDateEdit, "{$date}");
     $disabledCheckboxEdit = $I->grabAttributeFrom(DiscountsPage::$UnlimitedCheckboxEdit . '/..', "style");
     $I->comment($disabledCheckboxEdit);
     $I->assertEquals($disabledCheckbox, "display: none;");
     $I->seeInField(DiscountsPage::$AmountOfUse, '1');
     $keyDisc = $I->grabValueFrom(DiscountsPage::$DiscountKey);
     $I->comment($keyDisc);
     $I->click(DiscountsPage::$GoBackButton);
     $I->waitForText('Скидки интернет-магазина');
     $I->see($keyDisc, DiscountsPage::DisKeyLine('1'));
     $I->see('GiftPercentDiscount', DiscountsPage::NameLine('1'));
     $I->see('1', DiscountsPage::LimitLine('1'));
     $I->see('-', DiscountsPage::UseDiscLine('1'));
     $I->see($date, DiscountsPage::BeginTimeLine('1'));
     $I->see('-', DiscountsPage::EndTimeLine('1'));
     $activeDisc = $I->grabAttributeFrom(DiscountsPage::ActiveButtonLine('1'), 'class');
     $I->comment($activeDisc);
     $I->assertEquals($activeDisc, 'prod-on_off');
 }