Пример #1
0
        public void OnlySpaceCharactersInLastName()
        {
            NavigateTo.NavigateToContactUsPage();

            Actions.ClearContactUsForm();

            Actions.FillContactUsForm(Config.FormEntries.ValidEntries.FirstName, Config.FormEntries.InvalidEntries.LastName.OnlySpaceCharacters,
                                      Config.FormEntries.ValidEntries.CompanyName, Config.FormEntries.ValidEntries.EmailAddress,
                                      Config.FormEntries.ValidEntries.PhoneNumber, Config.FormEntries.ValidEntries.Subject1,
                                      Config.FormEntries.ValidEntries.Message);

            Actions.SubmitContactUsForm();

            FantooContactUsPage cuEmptyLastName = new FantooContactUsPage();

            Assert.AreEqual(Config.FormEntries.WarningMessagesEmptyContactUsForm.NoLastName, cuEmptyLastName.WarningNoLastName.Text);
        }
Пример #2
0
        public void InvalidEmailAddressMissingAtSymbol()
        {
            NavigateTo.NavigateToContactUsPage();

            Actions.ClearContactUsForm();

            Actions.FillContactUsForm(Config.FormEntries.ValidEntries.FirstName, Config.FormEntries.ValidEntries.LastName,
                                      Config.FormEntries.ValidEntries.CompanyName, Config.FormEntries.InvalidEntries.EmailAddress.MissingAtSymbol,
                                      Config.FormEntries.ValidEntries.PhoneNumber, Config.FormEntries.ValidEntries.Subject1,
                                      Config.FormEntries.ValidEntries.Message);

            Actions.SubmitContactUsForm();

            FantooContactUsPage cuInvalidEmailMessage = new FantooContactUsPage();

            Assert.AreEqual(Config.FormEntries.WarningMessagesEmptyContactUsForm.InvalidEmailWarningMessage, cuInvalidEmailMessage.WarningInvalidOrBlankEmail.Text);
        }
Пример #3
0
        public void NoSubject()
        {
            NavigateTo.NavigateToContactUsPage();

            Actions.ClearContactUsForm();

            Actions.FillContactUsForm(Config.FormEntries.ValidEntries.FirstName, Config.FormEntries.ValidEntries.LastName,
                                      Config.FormEntries.ValidEntries.CompanyName, Config.FormEntries.ValidEntries.EmailAddress,
                                      Config.FormEntries.ValidEntries.PhoneNumber, Config.FormEntries.InvalidEntries.Subject.NoSelection,
                                      Config.FormEntries.ValidEntries.Message);

            Actions.SubmitContactUsForm();

            FantooContactUsPage cuNoSubject = new FantooContactUsPage();

            Assert.AreEqual(Config.FormEntries.WarningMessagesEmptyContactUsForm.NoCompanyName, cuNoSubject.WarningNoSubject.Text);
        }
Пример #4
0
        public void AttemptToSubmitEmptyContactUsForm()
        {
            NavigateTo.NavigateToContactUsPage();

            Actions.ClearContactUsForm();

            Actions.SubmitContactUsForm();

            FantooContactUsPage cuEmptySubmitWarnings = new FantooContactUsPage();

            Assert.AreEqual(Config.FormEntries.WarningMessagesEmptyContactUsForm.NoFirstName, cuEmptySubmitWarnings.WarningNoFirstName.Text);
            Assert.AreEqual(Config.FormEntries.WarningMessagesEmptyContactUsForm.NoLastName, cuEmptySubmitWarnings.WarningNoLastName.Text);
            Assert.AreEqual(Config.FormEntries.WarningMessagesEmptyContactUsForm.NoCompanyName, cuEmptySubmitWarnings.WarningNoCompanyName.Text);
            Assert.AreEqual(Config.FormEntries.WarningMessagesEmptyContactUsForm.NoEmailAddress, cuEmptySubmitWarnings.WarningInvalidOrBlankEmail.Text);
            Assert.AreEqual(Config.FormEntries.WarningMessagesEmptyContactUsForm.NoSubject, cuEmptySubmitWarnings.WarningNoSubject.Text);
            Assert.AreEqual(Config.FormEntries.WarningMessagesEmptyContactUsForm.NoMessage, cuEmptySubmitWarnings.WarningNoMessage.Text);
        }
        public void SuccessfulContactUsRequestSubject3()
        {
            NavigateTo.NavigateToContactUsPage();

            Actions.ClearContactUsForm();

            Actions.FillContactUsForm(Config.FormEntries.ValidEntries.FirstName, Config.FormEntries.ValidEntries.LastName,
                                      Config.FormEntries.ValidEntries.CompanyName, Config.FormEntries.ValidEntries.EmailAddress,
                                      Config.FormEntries.ValidEntries.PhoneNumber, Config.FormEntries.ValidEntries.Subject3,
                                      Config.FormEntries.ValidEntries.Message);

            Actions.SubmitContactUsForm();

            Thread.Sleep(2000);

            FantooContactUsPage cuSuccessMessage = new FantooContactUsPage();

            Assert.AreEqual(true, cuSuccessMessage.SuccessMessage.Displayed);
        }