use of com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject in project selenium-tests by Wikia.
the class BlogFeaturesTests method BlogFeatures_001_AddingGallery.
@Test(groups = { "BlogFeatures_001", "BlogFeaturesTests" })
@Execute(asUser = User.USER)
public void BlogFeatures_001_AddingGallery() {
WikiBasePageObject base = new WikiBasePageObject();
SpecialCreatePage createPage = base.openSpecialCreateBlogPage(wikiURL);
String blogPostTitle = PageContent.BLOG_POST_NAME_PREFIX + createPage.getTimeStamp();
VisualEditModePageObject blogEdit = createPage.populateTitleField(blogPostTitle);
GalleryBuilderComponentObject galleryBuiler = blogEdit.clickGalleryButton();
AddPhotoComponentObject galleryAddPhoto = galleryBuiler.clickAddPhoto();
galleryAddPhoto.search("image");
galleryAddPhoto.choosePhotos(4);
galleryAddPhoto.clickSelect();
galleryBuiler.adjustPosition(PositionsGallery.CENTER);
galleryBuiler.adjustColumns("2");
galleryBuiler.adjustSpacing(SpacingGallery.SMALL);
galleryBuiler.adjustOrientation(Orientation.LANDSCAPE);
galleryBuiler.clickFinish();
blogEdit.verifyGallery();
BlogPageObject blogPage = blogEdit.submitBlog();
blogPage.verifyGallery();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject in project selenium-tests by Wikia.
the class BlogTests method BlogTests_003_editFromProfile.
@Test(groups = { "BlogTests_003", "BlogTests" })
@Execute(asUser = User.USER)
public void BlogTests_003_editFromProfile() {
WikiBasePageObject base = new WikiBasePageObject();
String blogContent = PageContent.BLOG_CONTENT + base.getTimeStamp();
UserProfilePageObject userProfile = base.openProfilePage(credentials.userName, wikiURL);
userProfile.clickOnBlogTab();
BlogPageObject blogPage = userProfile.openFirstPost();
String blogTitle = blogPage.getBlogName();
VisualEditModePageObject visualEditMode = blogPage.openCKModeWithMainEditButton();
visualEditMode.addContent(blogContent);
visualEditMode.submitArticle();
blogPage.verifyBlogTitle(blogTitle);
blogPage.verifyContent(blogContent);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject in project selenium-tests by Wikia.
the class BlogTests method BlogTests_004_deleteUndelete.
@Test(groups = { "BlogTests_004", "BlogTests" })
public void BlogTests_004_deleteUndelete() {
WikiBasePageObject base = new WikiBasePageObject();
base.loginAs(credentials.userNameStaff, credentials.passwordStaff, wikiURL);
UserProfilePageObject userProfile = base.openProfilePage(credentials.userName4, wikiURL);
userProfile.clickOnBlogTab();
BlogPageObject blogPage = userProfile.openFirstPost();
String blogTitle = blogPage.getBlogName();
DeletePageObject deletePage = blogPage.deleteUsingDropdown();
deletePage.submitDeletion();
List<Notification> confirmNotifications = base.getNotifications(NotificationType.CONFIRM);
Assertion.assertEquals(confirmNotifications.size(), 1, DeletePageObject.AssertionMessages.INVALID_NUMBER_OF_CONFIRMING_NOTIFICATIONS);
SpecialRestorePageObject restore = base.getNotifications(NotificationType.CONFIRM).stream().findFirst().get().undelete();
restore.giveReason(blogPage.getTimeStamp());
restore.restorePage();
confirmNotifications = blogPage.getNotifications(NotificationType.CONFIRM);
Assertion.assertEquals(confirmNotifications.size(), 1, SpecialRestorePageObject.AssertionMessages.INVALID_NUMBER_OF_CONFIRMING_NOTIFICATIONS);
Assertion.assertTrue(confirmNotifications.stream().findFirst().get().isVisible(), SpecialRestorePageObject.AssertionMessages.BANNER_NOTIFICATION_NOT_VISIBLE);
blogPage.verifyBlogTitle(blogTitle);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject in project selenium-tests by Wikia.
the class FollowBlogTests method FollowBlog_002_follow.
@Test(groups = "FollowBlog", dependsOnMethods = { "FollowBlog_001_setup" })
@Execute(asUser = User.USER)
public void FollowBlog_002_follow() {
WikiBasePageObject base = new WikiBasePageObject();
BlogPageObject blog = base.openBlogByName(wikiURL, blogTitle, credentials.userName);
blog.follow();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject in project selenium-tests by Wikia.
the class FollowBlogTests method FollowBlog_001_setup.
@Test(groups = "FollowBlog")
@Execute(asUser = User.USER)
public void FollowBlog_001_setup() {
WikiBasePageObject base = new WikiBasePageObject();
UserProfilePageObject userProfile = base.openProfilePage(credentials.userName, wikiURL);
userProfile.clickOnBlogTab();
BlogPageObject blogPage = userProfile.openFirstPost();
blogTitle = blogPage.getBlogName();
WatchPageObject watch = blogPage.unfollowBlogPage();
watch.confirmWatchUnwatch();
blogPage.verifyPageUnfollowed();
}
Aggregations