Search in sources :

Example 11 with BlogPageObject

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();
}
Also used : BlogPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject) GalleryBuilderComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.gallery.GalleryBuilderComponentObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) AddPhotoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.addphoto.AddPhotoComponentObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) SpecialCreatePage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 12 with BlogPageObject

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);
}
Also used : BlogPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) UserProfilePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 13 with BlogPageObject

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);
}
Also used : BlogPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject) DeletePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.actions.DeletePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) SpecialRestorePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialRestorePageObject) UserProfilePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject) Notification(com.wikia.webdriver.elements.oasis.components.notifications.Notification) Test(org.testng.annotations.Test)

Example 14 with BlogPageObject

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();
}
Also used : BlogPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 15 with BlogPageObject

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();
}
Also used : BlogPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject) WatchPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.watch.WatchPageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) UserProfilePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Aggregations

BlogPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject)18 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)17 Test (org.testng.annotations.Test)17 Execute (com.wikia.webdriver.common.core.annotations.Execute)12 UserProfilePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject)10 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)9 SpecialCreatePage (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage)8 MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)4 Notification (com.wikia.webdriver.elements.oasis.components.notifications.Notification)3 AddPhotoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.addphoto.AddPhotoComponentObject)3 DeletePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.actions.DeletePageObject)2 GalleryBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.gallery.GalleryBuilderComponentObject)1 PhotoAddComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject)1 PhotoOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject)1 SliderBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject)1 SlideshowBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.slideshow.SlideshowBuilderComponentObject)1 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)1 VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)1 RenamePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.actions.RenamePageObject)1 SpecialRestorePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialRestorePageObject)1