private static JToken GetTokenAs(Role role) { var users = JsonDataHelper.ToObject <List <User> >("Configuration\\credentials.json"); var testUser = users.Where(user => user.Role == role.ToString()).SingleOrDefault(); var tokenObject = IdentityAPI.GetToken(testUser.Email, testUser.Password); return(tokenObject); }
public void AddNewSkill() { IdentityAPI.SigninAs(Role.talent); ProfilePage.Open(); var skill = new Skill(); ProfilePage.Skills.AddNewSkill(skill); Assert.IsTrue(ProfilePage.Skills.IsAdded(skill)); }
public void DeleteSkill() { IdentityAPI.SigninAs(Role.talent); var skill = new Skill(); TalentAPI.PostSkill(skill); ProfilePage.Open(); ProfilePage.Skills.DeleteSkill(skill); Assert.IsTrue(ProfilePage.Skills.IsDeleted(skill)); }