public void LoggedIn() { AdminUserExists(); WebBrowser.Current.GoTo(Config.Configuration.Host + NavigationHelper.Pages["login page"]); var logOffLink = WebBrowser.Current.Links.SingleOrDefault(y => y.Id == "logOff"); if (logOffLink == null) { var formSteps = new FormSteps(); var table = new Table("InputField", "Input"); table.AddRow("UserName", "admin"); table.AddRow("Password", "asdf1234"); formSteps.WhenEnterTheFollowingInformation(table); formSteps.WhenIClickTheButton("log in"); } }
public void GivenIAmLoggedInAsTheAdminUser() { var user = new User() {Id = Guid.NewGuid(), Name = "Tomas", UserName = "******", PasswordHash = "asdf1234"}; UserHelper.InsertUser(user); WebBrowser.Current.GoTo(Config.Configuration.Host + NavigationHelper.Pages["login page"]); var logOffLink = WebBrowser.Current.Links.SingleOrDefault(y => y.Id == "logOff"); if (logOffLink == null) { var formSteps = new FormSteps(); var table = new Table("InputField", "Input"); table.AddRow("UserName", user.UserName); table.AddRow("Password", user.PasswordHash); formSteps.WhenEnterTheFollowingInformation(table); formSteps.WhenIClickTheButton("log in"); } }