Ejemplo n.º 1
0
        public void AllRequiredFieldsAreEmpty()
        {
            // Arrange
            var p = new ContactUsParams()
            {
                FirstName       = String.Empty,
                EmailAddress    = String.Empty,
                Message         = String.Empty,

                ErrorMessages   = new List<string>()
                {
                    "Your form has encountered a problem. Please scroll down to review.",
                    "Name is required.",
                    "Email Address is required.",
                    "Subject is required.",
                    "Message is required.",
                    "Your form has encountered a problem. Please scroll up to review."
                }
            };

            // Act
            var contactUsPage = homePage
                .ClickContactUsButton()
                .ClickContactUsButton()
                .SetFields(p)
                .ClickSubmitButton();

            // Assert
            var verifiers = new List<IVerify>()
            {
                new ContactUsVerifier(contactUsPage, p)
            };

            verifiers.ForEach(v => v.Verify());
        }
Ejemplo n.º 2
0
        public ContactUsPage SetFields(ContactUsParams p)
        {
            FirstName       = p.FirstName;
            LastName        = p.LastName;
            EmailAddress    = p.EmailAddress;
            Subject         = p.Subject;
            Message         = p.Message;

            return this;
        }
Ejemplo n.º 3
0
 public ContactUsVerifier(ContactUsPage page, ContactUsParams p)
 {
     this.page                   = page;
     this.expectedErrorMessages  = p.ErrorMessages;
 }