示例#1
0
 @Test
 @Stories("Имя может содержать только буквы")
 public void nameAllowOnlyLetterSymbols() {
   p.registerPublisher();
   p.openPage("profile");
   p.profileForm.fillMessenger("skype");
   p.profileForm.fillFirstName("sd1dasdd21das");
   p.profileForm.fillLastName("name");
   p.profileForm.clickSubmit();
   p.waitForAjax();
   assertEquals(p.profileForm.firstnameAlert.getText(), "Поле должно содержать только буквы.");
 }
示例#2
0
 @Test
 @Stories("Сабмит формы с незаполненными полями")
 public void emtyProfileFormSubmith() throws InterruptedException {
   p.registerPublisher();
   p.openPage("profile");
   p.profileForm.clearEmail();
   p.profileForm.clickSubmit();
   p.waitForAjax();
   assertEquals(p.profileForm.firstnameAlert.getText(), "Пожалуйста, укажите имя.");
   assertEquals(p.profileForm.lastnameAlert.getText(), "Пожалуйста, укажите фамилию.");
   assertEquals(p.profileForm.emailAlert.getText(), "Пожалуйста, укажите email.");
   assertEquals(
       p.profileForm.messengerAlert.getText(), "Пожалуйста, укажите мессенжер для связи с вами.");
 }