Search in sources :

Example 41 with WikiBasePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject in project selenium-tests by Wikia.

the class BlogFeaturesTests method BlogFeatures_002_AddingSlideshow.

@Test(groups = { "BlogFeatures_002", "BlogFeaturesTests" })
@Execute(asUser = User.USER)
public void BlogFeatures_002_AddingSlideshow() {
    WikiBasePageObject base = new WikiBasePageObject();
    SpecialCreatePage createPage = base.openSpecialCreateBlogPage(wikiURL);
    String blogPostTitle = PageContent.BLOG_POST_NAME_PREFIX + createPage.getTimeStamp();
    VisualEditModePageObject blogEdit = createPage.populateTitleField(blogPostTitle);
    SlideshowBuilderComponentObject slideshowBuilder = blogEdit.clickSlideshowButton();
    AddPhotoComponentObject slideshowAddPhoto = slideshowBuilder.clickAddPhoto();
    slideshowAddPhoto.search("image");
    slideshowAddPhoto.choosePhotos(4);
    slideshowAddPhoto.clickSelect();
    slideshowBuilder.adjustPosition(Positions.CENTER);
    slideshowBuilder.clickFinish();
    blogEdit.verifySlideshow();
    BlogPageObject blogPage = blogEdit.submitBlog();
    blogPage.verifySlideshow();
}
Also used : BlogPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject) SlideshowBuilderComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.slideshow.SlideshowBuilderComponentObject) 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 42 with WikiBasePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject in project selenium-tests by Wikia.

the class BlogFeaturesTests method BlogFeatures_003_AddingSlider.

@Test(groups = { "BlogFeatures_003", "BlogFeaturesTests" })
@Execute(asUser = User.USER)
public void BlogFeatures_003_AddingSlider() {
    WikiBasePageObject base = new WikiBasePageObject();
    SpecialCreatePage createPage = base.openSpecialCreateBlogPage(wikiURL);
    String blogPostTitle = PageContent.BLOG_POST_NAME_PREFIX + createPage.getTimeStamp();
    VisualEditModePageObject blogEdit = createPage.populateTitleField(blogPostTitle);
    SliderBuilderComponentObject sliderBuilder = blogEdit.clickSliderButton();
    sliderBuilder.selectMenuPosition(MenuPositions.VERTICAL);
    AddPhotoComponentObject sliderAddPhoto = sliderBuilder.clickAddPhoto();
    sliderAddPhoto.search("image");
    sliderAddPhoto.choosePhotos(4);
    sliderAddPhoto.clickSelect();
    sliderBuilder.clickFinish();
    blogEdit.verifySlider();
    BlogPageObject blogPage = blogEdit.submitBlog();
    blogPage.verifySlider();
}
Also used : SliderBuilderComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject) BlogPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject) 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 43 with WikiBasePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject in project selenium-tests by Wikia.

the class BlogTests method BlogTests_002_addByUrl.

@Test(dataProviderClass = ArticleDataProvider.class, dataProvider = "articleTitles", groups = { "BlogTests_002", "BlogTests" })
@Execute(asUser = User.USER)
public void BlogTests_002_addByUrl(String blogTitle) {
    WikiBasePageObject base = new WikiBasePageObject();
    String blogContent = PageContent.BLOG_CONTENT + base.getTimeStamp();
    String randomBlogTitle = blogTitle + base.getTimeStamp();
    SpecialCreatePage createBlogPage = base.openSpecialCreateBlogPage(wikiURL);
    VisualEditModePageObject visualEditMode = createBlogPage.populateTitleField(randomBlogTitle);
    visualEditMode.addContent(blogContent);
    BlogPageObject blogPage = visualEditMode.submitBlog();
    blogPage.verifyBlogTitle(randomBlogTitle);
    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) SpecialCreatePage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 44 with WikiBasePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject in project selenium-tests by Wikia.

the class BlogTests method BlogTests_005_move.

@Test(groups = { "BlogTests_005", "BlogTests" })
public void BlogTests_005_move() {
    WikiBasePageObject base = new WikiBasePageObject();
    base.loginAs(credentials.userNameStaff, credentials.passwordStaff, wikiURL);
    String blogTitleMove = PageContent.BLOG_POST_NAME_PREFIX + base.getTimeStamp();
    UserProfilePageObject userProfile = base.openProfilePage(credentials.userName, wikiURL);
    userProfile.clickOnBlogTab();
    BlogPageObject blogPage = userProfile.openFirstPost();
    RenamePageObject renamePage = blogPage.renameUsingDropdown();
    renamePage.rename(credentials.userNameStaff + "/" + blogTitleMove, true);
    blogPage.verifyBlogTitle(blogTitleMove);
    List<Notification> confirmNotifications = blogPage.getNotifications(NotificationType.CONFIRM);
    Assertion.assertEquals(confirmNotifications.size(), 1, RenamePageObject.AssertionMessages.INVALID_NUMBER_OF_CONFIRMING_NOTIFICATIONS);
    Assertion.assertTrue(confirmNotifications.stream().findFirst().get().isVisible(), RenamePageObject.AssertionMessages.BANNER_NOTIFICATION_NOT_VISIBLE);
}
Also used : RenamePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.actions.RenamePageObject) BlogPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) UserProfilePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject) Notification(com.wikia.webdriver.elements.oasis.components.notifications.Notification) Test(org.testng.annotations.Test)

Example 45 with WikiBasePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject in project selenium-tests by Wikia.

the class BlogTests method BlogTests_001_addFromProfile.

@Test(groups = { "BlogTests_001", "BlogTests", "Smoke1" })
public void BlogTests_001_addFromProfile() {
    WikiBasePageObject base = new WikiBasePageObject();
    base.loginAs(credentials.userName4, credentials.password4, wikiURL);
    String blogTitle = PageContent.BLOG_POST_NAME_PREFIX + base.getTimeStamp();
    String blogContent = PageContent.BLOG_CONTENT + base.getTimeStamp();
    UserProfilePageObject userProfile = base.openProfilePage(credentials.userName4, wikiURL);
    userProfile.clickOnBlogTab();
    SpecialCreatePage createBlogPage = userProfile.clickOnCreateBlogPost();
    VisualEditModePageObject visualEditMode = createBlogPage.populateTitleField(blogTitle);
    visualEditMode.addContent(blogContent);
    BlogPageObject blogPage = visualEditMode.submitBlog();
    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) SpecialCreatePage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage) Test(org.testng.annotations.Test)

Aggregations

WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)174 Test (org.testng.annotations.Test)162 Execute (com.wikia.webdriver.common.core.annotations.Execute)72 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)39 InteractiveMapsPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapsPageObject)38 InteractiveMapPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapPageObject)30 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)24 DontRun (com.wikia.webdriver.common.core.annotations.DontRun)23 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)21 BlogPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject)17 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)14 MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)13 CreateAMapComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreateAMapComponentObject)12 MessageWall (com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall)12 NavigationBar (com.wikia.webdriver.pageobjectsfactory.componentobject.global_navitagtion.NavigationBar)11 AddPinComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.AddPinComponentObject)11 CreatePinTypesComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreatePinTypesComponentObject)10 UserProfilePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject)10 SpecialCreatePage (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage)10 DetachedSignInPage (com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.DetachedSignInPage)9