private void StudentsBiographicalInformationIsEdited() { _newBiographicalInformation = new StudentBiographicalInformationModelBuilder().Build(); var profileModel = new ProfileModel { BiographicalInfo = _newBiographicalInformation }; _profilePage.EditBiographicalInfo(profileModel); }
public bool EditedBiographicalInformationIsVisable(EditableStudentBiographicalInfoModel newBiographicalInformation) { WaitFor.AjaxCallsToComplete(); var sex = Browser.PageSource.Contains(newBiographicalInformation.Sex.Humanize()); var birthday = Browser.PageSource.Contains(newBiographicalInformation.BirthDate); var latino = Browser.PageSource.Contains(newBiographicalInformation.HispanicLatinoEthnicity.ToString()); var race = Browser.PageSource.Contains(newBiographicalInformation.Race.Humanize()); var language = Browser.PageSource.Contains(newBiographicalInformation.HomeLanguage.ToString()); return(sex && birthday && language && latino && race); }
public virtual JsonResult EditBiographicalInfo(EditableStudentBiographicalInfoModel model) { if (!ModelState.IsValid) { var nglErrors = ModelState.GetNglErrors(); return(Json(new { nglErrors }, JsonRequestBehavior.AllowGet)); } var student = _studentRepository.GetByUSI(model.StudentUsi); _studentBiographicalInfoToStudentMapper.Map(model, student); _repository.Save(); TempData["ShowSuccess"] = true; return(Json(true, JsonRequestBehavior.AllowGet)); }