예제 #1
0
        public void EditPostSuccessfuly()
        {
            HomePage homePage = new HomePage(this.driver);

            homePage.NavigateTo();

            LoginPage logPage = new LoginPage(this.driver);

            logPage.NavigateTo();
            var loginUser = AccessExcelData.GetTestDataLoging("LoginSuccessfully");

            logPage.FillLoginForm(loginUser);

            homePage.EditPostLink.Click();

            EditPost editPage = new EditPost(this.driver);
            var      postUser = AccessExcelData.GetTestDataPosts("EditPostSuccessfuly");

            editPage.NavigateTo();
            editPage.FillEditPostForm(postUser);

            editPage.AssertSuccessfulPostEdit("Test Post Edit");
        }
예제 #2
0
        public void WithoutContentPostEdit()
        {
            HomePage homePage = new HomePage(this.driver);

            homePage.NavigateTo();

            LoginPage logPage = new LoginPage(this.driver);

            logPage.NavigateTo();
            var loginUser = AccessExcelData.GetTestDataLoging("LoginSuccessfully");

            logPage.FillLoginForm(loginUser);

            homePage.EditPostLink.Click();

            EditPost editPage = new EditPost(this.driver);
            var      postUser = AccessExcelData.GetTestDataPosts("EditPostWithoutContent");

            editPage.NavigateTo();
            editPage.FillEditPostForm(postUser);

            editPage.AssertErrorMessageForEmptyFieldsPostEdit("The Content field is required.");
        }
예제 #3
0
        public void EditForeignPost()
        {
            HomePage homePage = new HomePage(this.driver);

            homePage.NavigateTo();

            LoginPage logPage = new LoginPage(this.driver);

            logPage.NavigateTo();
            var loginUser = AccessExcelData.GetTestDataLoging("LoginForeinUserData");

            logPage.FillLoginForm(loginUser);

            homePage.EditPostLink.Click();

            EditPost editPage = new EditPost(this.driver);

            editPage.NavigateTo();
            editPage.Title.Click();
            editPage.EditButton.Click();

            editPage.AssertEditForeignPostErrorMessageIsDisplayed("You do not have permission to view this directory or page");
        }