public void FailedRegistration() { RegisterPage registerPage = new RegisterPage(_driver); User user = User.GetRandomUser(); user.Login = ""; user.FromService = FromService.Social; try { registerPage.Navigate().FillUser(user).Submit(); } catch (MessageException e) { Assert.AreEqual("Login is empty", e.Message); } user.Login = TextHelper.GetRandomWord(10); user.Email = "test@t"; try { registerPage.Navigate().FillUser(user).Submit(); } catch (MessageException e) { Assert.AreEqual("Email is incorrect", e.Message); } }
public void SuccessRegistration() { RegisterPage registerPage = new RegisterPage(_driver); User user = User.GetRandomUser(); HomePage homePage = registerPage.Navigate().FillUser(user).Submit(); Assert.NotNull(homePage); homePage.ToLogin(); }
public void RegistrationAndLogin() { RegisterPage registerPage = new RegisterPage(_driver); User user = User.GetRandomUser(); HomePage homePage = registerPage.Navigate().FillUser(user).Submit(); LoginPage loginPage = homePage.ToLogin(); homePage = loginPage.Navigate().FillUser(user).Submit(); Assert.True(homePage.AreEqual()); homePage.ToLogin(); }
public void TransitionBetweenLoginAndRegisterPages() { LoginPage loginPage = new LoginPage(_driver); RegisterPage registerPage = loginPage.Navigate().ToRegister(); User user = User.GetRandomUser(); registerPage.FillUser(user); Assert.True(registerPage.AreEqual()); loginPage = registerPage.ToLogin(); Assert.True(loginPage.AreEqual()); user = User.GetValidUserForLogin(); HomePage homePage = loginPage.FillUser(user).Submit(); Assert.True(homePage.AreEqual()); }