private void EditCompanyContactOnCompanyPage(CompanyContactModel model)
 {
     companyPage.EditMr(model.Title.ToString());
     companyPage.EditFirstName(model.FirstName);
     companyPage.EditLastName(model.LastName);
     companyPage.EditPosition(model.Position.ToString());
 }
        public void ChangeContactDetails()
        {
            var model        = CompanyModel.GenerateCompany();
            var contactModel = CompanyContactModel.GenerateContact();

            LoginAndCreateCompany(model, contactModel);
            var contactModel2 = CompanyContactModel.GenerateContact();

            EditCompanyContactOnCompanyPage(contactModel2);
        }
        private void LoginAndCreateCompany(CompanyModel model, CompanyContactModel contactModel)
        {
            Login(Credentials.adminUserName, Credentials.adminPassword);
            headerPanel.clickaddNewLead();
            SetCompanyDetails(model);
            SetCompanyContact(contactModel);
            _addNewLead.ClickSaveGoTo();
            var actualCompanyName = companyPage.GetName();

            Assert.AreEqual(actualCompanyName, model.Name, "Company name is not same that expected");
        }
 private void SetCompanyContact(CompanyContactModel model)
 {
     _addNewLead.SelectTitle(model.Title.ToString());
     _addNewLead.SetFirstName(model.FirstName);
     _addNewLead.SetLastName(model.LastName);
     _addNewLead.SelectJobTitle(model.Position.ToString());
     _addNewLead.SetDirectTel(model.DirectTel);
     _addNewLead.SetMobileTel(model.DirectTel);
     _addNewLead.SetEmail(model.Email);
     _addNewLead.ClickMR();
     _addNewLead.ClickSaveContact();
 }
        public void CreateCompanyTest()
        {
            var model        = CompanyModel.GenerateCompany();
            var contactModel = CompanyContactModel.GenerateContact();

            Login(Credentials.adminUserName, Credentials.adminPassword);
            headerPanel.clickaddNewLead();
            SetCompanyDetails(model);
            SetCompanyContact(contactModel);
            _addNewLead.ClickSaveGoTo();
            var actualCompanyName = companyPage.GetName();

            Assert.AreEqual(actualCompanyName, model.Name, "Company name is not same that expected");
        }
        public void EditCompanyTest()
        {
            var model        = CompanyModel.GenerateCompany();
            var contactModel = CompanyContactModel.GenerateContact();

            LoginAndCreateCompany(model, contactModel);
            model = CompanyModel.GenerateCompany();
            EditCompanyInfo(model);
            var model2 = companyPage.GetCompanyModel();

            Assert.AreEqual(model.Phone, model2.Phone, "Tel is not same that expected");
            Assert.AreEqual(model.City, model2.City, "City is not same that expected");
            Assert.AreEqual(model.Name, model2.Name, "Name is not same that expected");
            Assert.AreEqual(model.Street, model2.Street, "Street is not same that expected");
            Assert.AreEqual(model.Region, model2.Region, "Region is not same that expected");
        }
示例#7
0
 public static CompanyContactViewModel ToViewModel(this CompanyContactModel model)
 {
     Mapper.Initialize(ifg => ifg.CreateMap <CompanyContactModel, CompanyContactViewModel>());
     return(Mapper.Map <CompanyContactModel, CompanyContactViewModel>(model));
 }
示例#8
0
        public int AddUpdateCompanyContact(CompanyContactModel companyContactModel)
        {
            int result = _staffingDB.spCompanyContactSet(Convert.ToInt32(companyContactModel.Id), Convert.ToInt32(companyContactModel.CompanyId), companyContactModel.Name, companyContactModel.Email, companyContactModel.ContactNo, Convert.ToInt32(companyContactModel.TypeId), companyContactModel.IsPrimary);

            return(result);
        }
示例#9
0
 private CompanyContactViewModel GetContactViewModel(CompanyContactModel model)
 {
     return(_viewModelFactory.CreateInstance <CompanyContactViewModel, CompanyContactModel>(model));
 }