Esempio n. 1
0
        public void SubmitQuestionUsingInvalidEmail()
        {
            //Arrange
            FormPage.OpenFormToShareYourCoronavirusStory();

            //Act
            FormDataPage.FillOutFormUsingInvalidEmail();
            FormToSubmitPage.SubmitYourStory();
            BasePage.ImplicitWait();

            //Assert
            Assert.AreEqual(expectegPageTitle, FormToSubmitPage.ActualPageTitle());
            Assert.AreEqual(1, FormToSubmitPage.AmountOfValidationErrors());
            Assert.AreEqual(errorEmailMessage, FormToSubmitPage.ValidationErrors[0].Text);
        }
Esempio n. 2
0
        public void SubmitFormWithEmptyTextFieldForStory()
        {
            //Arrange
            FormPage.OpenFormToShareYourCoronavirusStory();

            //Act
            FormDataPage.FillOutFormWithoutEnteringStoryText();
            FormToSubmitPage.SubmitYourStory();
            BasePage.ImplicitWait();

            //Assert
            Assert.AreEqual(expectegPageTitle, FormToSubmitPage.ActualPageTitle());
            Assert.AreEqual(1, FormToSubmitPage.AmountOfValidationErrors());
            Assert.AreEqual(errorMessage, FormToSubmitPage.ValidationErrors[0].Text);
        }
Esempio n. 3
0
        public void SubmitEmptyFormForQuestion()
        {
            //Arrange
            FormPage.OpenFormToShareYourCoronavirusStory();

            //Act
            FormToSubmitPage.SubmitYourStory();
            BasePage.ImplicitWait();

            //Assert
            Assert.AreEqual(expectegPageTitle, FormToSubmitPage.ActualPageTitle());
            Assert.AreEqual(4, FormToSubmitPage.AmountOfValidationErrors());
            Assert.AreEqual(errorMessage, FormToSubmitPage.ValidationErrors[0].Text);
            Assert.AreEqual(errorNameMessage, FormToSubmitPage.ValidationErrors[1].Text);
            Assert.AreEqual(errorAcceptMessage, FormToSubmitPage.ValidationErrors[2].Text);
            Assert.AreEqual(errorAcceptMessage, FormToSubmitPage.ValidationErrors[3].Text);
        }