示例#1
0
        public static void GenerateHtml(PostContent toGenerate, DateTime?generationVersion, IProgress <string> progress)
        {
            progress?.Report($"Post Content - Generate HTML for {toGenerate.Title}");

            var htmlContext = new SinglePostPage(toGenerate)
            {
                GenerationVersion = generationVersion
            };

            htmlContext.WriteLocalHtml();
        }
        public void GIVENCreatedPostWHENCommentIsAddedBelowTHENCommentIsVisibleBelowPost()
        {
            PostList postListPage = new PostList(driver);

            Assert.IsTrue(postListPage.PageTitle.Displayed);
            string firstPostTitle = postListPage.FirstPostTitle.Text;

            SinglePostPage firstPostPage = postListPage.OpenFirstPostPage();

            Assert.AreEqual(firstPostTitle.ToString(), firstPostPage.PostTitle.Text);

            Assert.IsTrue(firstPostPage.LeaveAReplySection.Displayed && firstPostPage.LeaveAReplySection.Enabled);
            string comment  = "this is very good comment20000";
            string username = "******";
            string email    = "*****@*****.**";

            firstPostPage.AddTextToComment(comment, username, email);
            firstPostPage.PostCommentButton.Click();

            firstPostPage.CompareLastCommentWithGivenData(username, comment);
        }