Example #1
0
        public void WhenAUserThatExistsAlreadyIsJoining()
        {
            var dateAndTimeOfTest = DateTime.Now.ToString("yyyyMMddHHmmss");

            page.EnterUsername("AutomationCustomer_" + dateAndTimeOfTest);
            page.EnterPassword("Password123");
            page.EnterConfermePassword("Password123");
            page.EnterEmail("*****@*****.**");
            page.SelectQuestion(1);
            page.EnterAnswer("Test");
            page.ClickJoinButton();
            Browser.WaitForControlReady(5000);
            page = page.NavigateToJoin();
            var startingUrl = Browser.Uri.ToString();

            page.EnterUsername("AutomationCustomer_" + dateAndTimeOfTest);
            page.EnterPassword("Password123");
            page.EnterConfermePassword("Password123");
            page.EnterEmail("*****@*****.**");
            page.SelectQuestion(1);
            page.EnterAnswer("Test");
            page.ClickJoinButton();
            Browser.WaitForControlReady(5000);
            var validation = page.GetValidation();

            Assert.AreEqual(1, validation.Length);
            Assert.AreEqual("Unable to create a user with the details you gave are you user your not already in the system?", validation[0].InnerText);
        }
Example #2
0
        public void WhenNoValuesAreEntered()
        {
            page.ClickJoinButton();
            var validation = page.GetValidation();

            Assert.AreEqual(4, validation.Length);
        }