Ejemplo n.º 1
0
 function CheckInListLanding($name1, $isocode1, $symbol1)
 {
     $I = $this;
     $I->wait('1');
     $I->see($name1, './/*[@id="mainContent"]/section/div[2]/div/form/table/tbody/tr[last()]/td[2]/a');
     $I->see($isocode1, './/*[@id="mainContent"]/section/div[2]/div/form/table/tbody/tr[last()]/td[3]');
     $I->see($symbol1, './/*[@id="mainContent"]/section/div[2]/div/form/table/tbody/tr[last()]/td[4]');
     $RadioBut = $I->grabAttributeFrom(\CurrenciesPage::RadioButtonLine("last()"), 'checked');
     $I->comment("{$RadioBut}");
     $I->assertEquals($RadioBut, null);
     $ActiveBut = $I->grabAttributeFrom(\CurrenciesPage::ActiveButtonLine("last()"), 'class');
     $I->comment("{$ActiveBut}");
     $I->assertEquals($ActiveBut, "prod-on_off disable_tovar");
     $DeleteBut = $I->grabAttributeFrom(\CurrenciesPage::DeleteButtonLine("last()"), 'disabled');
     $I->comment("DeleteBut");
     $I->assertEquals($DeleteBut, null);
 }
 public function DeleteAdditCur(CurrenciesTester $I)
 {
     //Проверяем возможность удаления дополнительной валюты
     $I->amOnPage("/admin/components/run/shop/currencies");
     $I->comment("Main row:{$this->j}");
     $I->comment("Rows:{$this->rows}");
     $I->wait('5');
     if ($this->j < $this->rows) {
         $this->j++;
         $I->click(CurrenciesPage::ActiveButtonLine($this->j));
     } else {
         $this->j--;
         $I->click(CurrenciesPage::ActiveButtonLine($this->j));
     }
     $this->butActiveClass = $I->grabAttributeFrom(CurrenciesPage::ActiveButtonLine($this->j), "class");
     $I->comment("{$this->butActiveClass}");
     $I->assertEquals($this->butActiveClass, 'prod-on_off');
     $I->click(CurrenciesPage::DeleteButtonLine($this->j));
     $I->waitForElement(".//div[@class='modal hide fade in']");
     $I->see('Удалить валюту');
     $I->see('Удалить выбранную валюту?');
     $I->see('Удалить', './/*[@id="first"]/div[3]/a[1]');
     $I->see('Отменить', './/*[@id="first"]/div[3]/a[2]');
     $I->click('.//*[@id="first"]/div[3]/a[1]');
     $I->waitForElementVisible('.alert.in.fade.alert-success');
     $I->see('Валюта успешно удалена');
     $I->waitForElementNotVisible('.alert.in.fade.alert-success');
     $rowsAfterDel = $I->grabTagCount($I, "tbody tr");
     $I->comment((string) $rowsAfterDel);
     InitTest::ClearAllCach($I);
 }