public void SignInAccountTest() { LoginPageView loginPageView = new LoginPageView(); loginPageView.SetTextCreateEmail("standard_user"); loginPageView.SetTextCreatePassword("secret_sauce"); loginPageView.LoginButtonTest(); loginPageView.AddToCartTest(); loginPageView.GoToCartTest(); loginPageView.RemoveTest(); loginPageView.ContinueShoppingTest(); loginPageView.Addonesie(); loginPageView.GoToCartTest(); loginPageView.ContionueShopTest(); loginPageView.AddToCartTest(); loginPageView.GoToCartTest(); loginPageView.CheckoutTest(); loginPageView.SetTextId("Zorba"); loginPageView.SetTextLastName("Test"); loginPageView.SetTextZipCode("12345"); loginPageView.ContinueAfterMessage(); loginPageView.ClickForFinishTest(); Assert.AreEqual("THANK YOU FOR YOUR ORDER", loginPageView.GetTextForAfterClickFinishButton()); Console.WriteLine(loginPageView.GetTextForAfterClickFinishButton()); loginPageView.HamburgerMenuButton(); loginPageView.LogoutTEst(); }
public void ThirdScenarioTest() { LoginPageView loginPageView = new LoginPageView(); loginPageView.SetTextCreateEmail("standard_user"); loginPageView.SetTextCreatePassword("secret_sauce"); loginPageView.LoginButtonTest(); loginPageView.CartTest(); loginPageView.CheckoutTest(); loginPageView.SetTextId("Zorba"); loginPageView.SetTextLastName("Test"); loginPageView.SetTextZipCode("12345"); loginPageView.ContinueAfterMessage(); loginPageView.ClickForFinishTest(); }
public void SecondScenarioLoginTest() { LoginPageView loginPageView = new LoginPageView(); loginPageView.SetTextCreateEmail("standard_user"); loginPageView.SetTextCreatePassword("secret_sauce"); loginPageView.LoginButtonTest(); loginPageView.GoToCartTest(); loginPageView.CheckoutTest(); loginPageView.ContinueAfterMessage(); Assert.AreEqual("Error: First Name is required", loginPageView.GetTextErorMEssage()); Console.WriteLine(loginPageView.GetTextErorMEssage()); loginPageView.HamburgerMenuButton(); loginPageView.LogoutTEst(); }
public ActionResult Login(LoginPageView LoginData, string ReturnUrl = "/") { if (ModelState.IsValid) { // Проверяем пользователя по логину и паролю if (SecurityManager.ValidateUser(LoginData.Login, LoginData.Password)) { // Если все ок - запоминаем его FormsAuthentication.SetAuthCookie(LoginData.Login, false); return(Redirect(ReturnUrl)); } else { ModelState.AddModelError("Login", "Login or password is incorrect"); ModelState.AddModelError("Password", "Login or password is incorrect"); } } return(View(LoginData)); }
public App() { InitializeComponent(); MainPage = new LoginPageView(); }
public MainWindowViewModel( ) { _INPCInvoke = new INPCInvoker(this); CurrentView = new LoginPageView( ); }