Пример #1
0
        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);
            }
        }
Пример #2
0
        public void SuccessRegistration()
        {
            RegisterPage registerPage = new RegisterPage(_driver);
            User         user         = User.GetRandomUser();
            HomePage     homePage     = registerPage.Navigate().FillUser(user).Submit();

            Assert.NotNull(homePage);
            homePage.ToLogin();
        }
Пример #3
0
        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();
        }
Пример #4
0
        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());
        }