Ejemplo n.º 1
0
 public void ContactForm_NonAlphaChar_LastName()
 {
     ContactUsPage.FillContactUsForm("Jack", "Broughton123!$%^", "*****@*****.**", "Test Message");
     ContactUsPage.Submit();
     Assert.AreEqual(nonAlphaErrorMessage, ContactUsPage.LastNameError());
     Assert.AreEqual(generalErrorMessage, ContactUsPage.GeneralError());
 }
Ejemplo n.º 2
0
 public void ContactForm_MaxChar_LastName()
 {
     ContactUsPage.FillContactUsForm("Jack", "JackJackJackJackJackJackJackJackJackJackJackJackJa",
                                     "*****@*****.**", "Test Message");
     ContactUsPage.Submit();
     Assert.AreEqual(sentSuccessfullyMessage, ThankYouPage.SuccessText());
 }
Ejemplo n.º 3
0
 public void ContactForm_InvalidEmail()
 {
     ContactUsPage.FillContactUsForm("Jack", "Bro", "thisisnotaemail", "testy messagey2");
     Assert.AreEqual(emailValidMessage, ContactUsPage.EmailError());
     ContactUsPage.Submit();
     Assert.AreEqual(generalErrorMessage, ContactUsPage.GeneralError());
     Assert.AreEqual(emailValidMessage, ContactUsPage.EmailError());
 }
Ejemplo n.º 4
0
 public void ContactForm_MaxChar_Email()
 {
     ContactUsPage.FillContactUsForm("Jack", "Broughton",
                                     "*****@*****.**",
                                     "Test Message");
     ContactUsPage.Submit();
     Assert.AreEqual(sentSuccessfullyMessage, ThankYouPage.SuccessText());
 }
Ejemplo n.º 5
0
 public void ContactForm_OverMaxChar_LastName()
 {
     ContactUsPage.FillContactUsForm("Broughton", "JackJackJackJackJackJackJackJackJackJackJackJackJack",
                                     "*****@*****.**", "Test Message");
     ContactUsPage.Submit();
     Assert.AreEqual(generalErrorMessage, ContactUsPage.GeneralError());
     Assert.AreEqual(over50CharsErrorMessage, ContactUsPage.LastNameError());
 }
Ejemplo n.º 6
0
 public void ContactForm_OverMaxChar_Email()
 {
     ContactUsPage.FillContactUsForm("Jack", "Broughton",
                                     "*****@*****.**",
                                     "Test Message");
     ContactUsPage.Submit();
     Assert.AreEqual(generalErrorMessage, ContactUsPage.GeneralError());
     Assert.AreEqual(over100CharErrorMessage, ContactUsPage.EmailError());
 }
Ejemplo n.º 7
0
 public void ContactForm_Only_Message()
 {
     ContactUsPage.FillContactUsForm("", "", "", "This is a message!");
     ContactUsPage.Submit();
     Assert.AreEqual(requiredMessage, ContactUsPage.FirstNameError());
     Assert.AreEqual(requiredMessage, ContactUsPage.LastNameError());
     Assert.AreEqual(requiredMessage, ContactUsPage.EmailError());
     Assert.AreEqual(generalErrorMessage, ContactUsPage.GeneralError());
 }
Ejemplo n.º 8
0
 public void ContactForm_Only_Email()
 {
     ContactUsPage.FillContactUsForm("", "", "*****@*****.**", "");
     ContactUsPage.Submit();
     Assert.AreEqual(requiredMessage, ContactUsPage.FirstNameError());
     Assert.AreEqual(requiredMessage, ContactUsPage.LastNameError());
     Assert.AreEqual(requiredMessage, ContactUsPage.MessageError());
     Assert.AreEqual(generalErrorMessage, (ContactUsPage.GeneralError()));
 }
Ejemplo n.º 9
0
 public void ContactForm_Only_LastName()
 {
     ContactUsPage.FillContactUsForm("", "Broughton", "", "");
     ContactUsPage.Submit();
     Assert.AreEqual(requiredMessage, ContactUsPage.FirstNameError());
     Assert.AreEqual(requiredMessage, ContactUsPage.EmailError());
     Assert.AreEqual(requiredMessage, ContactUsPage.MessageError());
     Assert.AreEqual(generalErrorMessage, ContactUsPage.GeneralError());
 }
Ejemplo n.º 10
0
 public void ContactForm_HappyPath()
 {
     ContactUsPage.FillContactUsForm("Jack", "Bro", "*****@*****.**", "This is a test message");
     ContactUsPage.Submit();
     Assert.AreEqual(sentSuccessfullyMessage, ThankYouPage.SuccessText());
 }