Examples of BlogPostViewPage


Examples of org.xwiki.blog.test.po.BlogPostViewPage

        Assert.assertEquals(getTestMethodName(), blogPostInlinePage.getTitle());

        blogPostInlinePage.setTitle("Test blog title");
        blogPostInlinePage.setContent("Test blog content");
        blogPostInlinePage.setCategories(Collections.singletonList("Personal"));
        BlogPostViewPage blogPostViewPage = blogPostInlinePage.clickSaveAndView();

        // Assert the result.
        Assert.assertEquals("Test blog title", blogPostViewPage.getDocumentTitle());
        Assert.assertEquals("Test blog content", blogPostViewPage.getContent());
        Assert.assertEquals(Collections.singletonList("Personal"), blogPostViewPage.getCategories());
        Assert.assertFalse(blogPostViewPage.isPublished());

        // Edit the blog post.
        blogPostInlinePage = blogPostViewPage.clickEditBlogPostIcon();
        blogPostInlinePage.waitToLoad();

        Assert.assertEquals("Test blog title", blogPostInlinePage.getTitle());
        Assert.assertEquals("Test blog content", blogPostInlinePage.getContent());
        Assert.assertEquals(Collections.singletonList("Personal"), blogPostInlinePage.getCategories());
        Assert.assertFalse(blogPostInlinePage.isPublished());

        // Modify the blog post.
        blogPostInlinePage.setTitle("Modified title");
        blogPostInlinePage.setContent("Modified content");
        blogPostInlinePage.setCategories(Arrays.asList("News", "Personal"));
        blogPostInlinePage.setPublished(true);

        // Assert the result.
        blogPostViewPage = blogPostInlinePage.clickSaveAndView();

        Assert.assertEquals("Modified title", blogPostViewPage.getDocumentTitle());
        Assert.assertEquals("Modified content", blogPostViewPage.getContent());
        Assert.assertEquals(Arrays.asList("News", "Personal"), blogPostViewPage.getCategories());
        Assert.assertTrue(blogPostViewPage.isPublished());
        Assert.assertFalse(blogPostViewPage.isHidden());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.