Пример #1
0
        public void Register_WrongEmailData_ReturnsErrorMessage()
        {
            _page.PopulateUserName("TurboUser");
            _page.PopulateFirstName("Turbo");
            _page.PopulateLastName("User");
            _page.PopulateEmail("turbouser.com");
            _page.PopulateGender("Other");
            _page.PopulateDOB("1999-06-04");
            _page.PopulatePassword("Turbo123!");
            _page.PopulateConfirmPassword("Turbo123!");
            _page.ClickCreate();

            Assert.Equal("Please enter a valid email address.", _page.EmailErrorMessage);
        }
Пример #2
0
        public void Register()
        {
            HomePage     homePage     = new HomePage(webDriver);
            RegisterPage registerPage = new RegisterPage(webDriver);

            registerPage = homePage.ClickRegister(webDriver);

            registerPage.ClickCreate();
            Assert.IsTrue(registerPage.IsNameInvalid());
            registerPage.SetName("Automated");

            registerPage.ClickCreate();
            Assert.IsTrue(registerPage.IsLastnameInvalid());
            registerPage.SetLastname("Testing");

            registerPage.ClickCreate();
            Assert.IsTrue(registerPage.IsEmailInvalid());
            registerPage.SetEmail("*****@*****.**");

            registerPage.ClickCreate();
            Assert.IsTrue(registerPage.IsNoPasswordPopupDisplayed());
            registerPage.SetPassword("12345678");
        }