<commit_before>package pl.stqa.pft.addressbook.tests;

import org.testng.annotations.Test;
import pl.stqa.pft.addressbook.model.ContactData;

/**
 * Created by Konrad on 03/06/2017.
 */
public class ContactEditTests extends TestBase {

  @Test
  public void testContactEdit() {
    app.getNavigationHelper().gotoContactsHomePage();
    app.getContactHelper().selectContact();
    app.getContactHelper().clickEditContact();
    app.getContactHelper().fillContactForm(new ContactData("Christiano", "Ronaldo", "CR7", "CR7", "CR7", "CR Company", "Barcelona", null), false);
    app.getContactHelper().clickUpdateContact();

  }
}<commit_msg>added verifying if contact exist while contact editing<commit_after>package pl.stqa.pft.addressbook.tests;

import org.testng.annotations.Test;
import pl.stqa.pft.addressbook.model.ContactData;

/**
 * Created by Konrad on 03/06/2017.
 */
public class ContactEditTests extends TestBase {

  @Test
  public void testContactEdit() {
    app.getNavigationHelper().gotoContactsHomePage();
    if(! app.getContactHelper().isContactExist()){
      app.getNavigationHelper().goToContactsPage();
      app.getContactHelper().createContact(new ContactData("Michael", "Jordan", "MJK", "MJ", "MR", "Own company",
              "null", "test1"), true);
    }
    app.getNavigationHelper().gotoContactsHomePage();
    app.getContactHelper().selectContact();
    app.getContactHelper().clickEditContact();
    app.getContactHelper().fillContactForm(new ContactData("Christiano", "Ronaldo", "CR7", "CR7", "CR7", "CR Company", "Barcelona", null), false);
    app.getContactHelper().clickUpdateContact();

  }
}
{'fraction_non_alphanumeric': 0.1496014714898835, 'fraction_numerical': 0.014101778050275904, 'mean_word_length': 5.044444444444444, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4559654', 'n_tokens_mistral': 514, 'n_tokens_neox': 489, 'n_words': 92}