Search in sources :

Example 1 with SlideshowBuilderComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.slideshow.SlideshowBuilderComponentObject in project selenium-tests by Wikia.

the class ArticleFeaturesCRUDTestsUser method addSlideshow.

@Test(groups = { "ArticleFeaturesCRUDUser_003" })
@Execute(asUser = User.USER)
public void addSlideshow() {
    new ArticleContent().clear();
    VisualEditModePageObject visualEditMode = new VisualEditModePageObject().open();
    SlideshowBuilderComponentObject slideshowBuilder = visualEditMode.clickSlideshowButton();
    AddPhotoComponentObject slideshowAddPhoto = slideshowBuilder.clickAddPhoto();
    slideshowAddPhoto.search("image");
    slideshowAddPhoto.choosePhotos(4);
    slideshowAddPhoto.clickSelect();
    slideshowBuilder.adjustPosition(Positions.CENTER);
    slideshowBuilder.clickFinish();
    visualEditMode.verifySlideshow();
    visualEditMode.submitArticle().verifySlideshow();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) 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) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 2 with SlideshowBuilderComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.slideshow.SlideshowBuilderComponentObject in project selenium-tests by Wikia.

the class ArticleFeaturesCRUDTestsUser method modifySlideshow.

@Test(groups = { "ArticleFeaturesCRUDUser_003" })
@Execute(asUser = User.USER)
public void modifySlideshow() {
    new ArticleContent().push("<gallery type=\"slideshow\">\nImage010.jpg\nImage009.jpg\nImage008.jpg\nImage007.jpg\n" + "Image010.jpg\nImage009.jpg\nImage008.jpg\nImage007.jpg\nImage006.jpg\nImage005.jpg\n" + "Image004.jpg\nImage003.jpg\n</gallery>");
    VisualEditModePageObject visualEditor = new VisualEditModePageObject().open();
    SlideshowBuilderComponentObject slideshowBuilder = (SlideshowBuilderComponentObject) visualEditor.modifyComponent(Components.SLIDESHOW);
    AddPhotoComponentObject slideshowAddPhoto = slideshowBuilder.clickAddPhoto();
    slideshowAddPhoto.search("image");
    slideshowAddPhoto.choosePhotos(8);
    slideshowAddPhoto.clickSelect();
    slideshowBuilder.adjustPosition(Positions.RIGHT);
    slideshowBuilder.clickFinish();
    visualEditor.verifySlideshow();
    visualEditor.submitArticle().verifySlideshow();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) 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) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 3 with SlideshowBuilderComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.slideshow.SlideshowBuilderComponentObject 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 4 with SlideshowBuilderComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.slideshow.SlideshowBuilderComponentObject in project selenium-tests by Wikia.

the class ArticleSourceModeTests method RTE_013_Slideshow.

@Test(groups = { "RTE_extended_2", "RTE_extended_013" })
public void RTE_013_Slideshow() {
    WikiBasePageObject base = new WikiBasePageObject();
    String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    ArticlePageObject article = new ArticlePageObject().open(articleName);
    SourceEditModePageObject source = article.openCurrectArticleSourceMode();
    source.clickAddGallery();
    source.verifyComponentSelector();
    SlideshowBuilderComponentObject slideshowBuilder = (SlideshowBuilderComponentObject) source.addComponent("slideshow");
    AddPhotoComponentObject slideshowAddPhoto = slideshowBuilder.clickAddPhoto();
    slideshowAddPhoto.search("image");
    List<String> photoNames = slideshowAddPhoto.choosePhotos(4);
    slideshowAddPhoto.clickSelect();
    slideshowBuilder.adjustPosition(Positions.CENTER);
    slideshowBuilder.clickFinish();
    Assertion.assertEquals(source.getSourceContent(), "<gallery type=\"slideshow\" position=\"center\">\n" + photoNames.get(0) + "\n" + photoNames.get(1) + "\n" + photoNames.get(2) + "\n" + photoNames.get(3) + "\n</gallery>");
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) SourceEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject) SlideshowBuilderComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.slideshow.SlideshowBuilderComponentObject) AddPhotoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.addphoto.AddPhotoComponentObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) Test(org.testng.annotations.Test)

Example 5 with SlideshowBuilderComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.slideshow.SlideshowBuilderComponentObject in project selenium-tests by Wikia.

the class SourceEditModePageObject method addComponent.

public Object addComponent(String componentName) {
    if ("slideshow".equals(componentName)) {
        wait.forElementVisible(createSlideshow);
        createSlideshow.click();
        PageObjectLogging.log("addComponent", "selected " + componentName + " component", true);
        return new SlideshowBuilderComponentObject(driver);
    } else if ("gallery".equals(componentName)) {
        wait.forElementVisible(createGallery);
        createGallery.click();
        PageObjectLogging.log("addComponent", "selected " + componentName + " component", true);
        return new GalleryBuilderComponentObject(driver);
    } else if ("slider".equals(componentName)) {
        wait.forElementVisible(createSlider);
        createSlider.click();
        PageObjectLogging.log("addComponent", "selected " + componentName + " component", true);
        return new SliderBuilderComponentObject(driver);
    } else {
        PageObjectLogging.log("addComponent", "not supported component name: " + componentName, false);
        return null;
    }
}
Also used : SliderBuilderComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject) SlideshowBuilderComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.slideshow.SlideshowBuilderComponentObject) GalleryBuilderComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.gallery.GalleryBuilderComponentObject)

Aggregations

SlideshowBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.slideshow.SlideshowBuilderComponentObject)5 AddPhotoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.addphoto.AddPhotoComponentObject)4 Test (org.testng.annotations.Test)4 Execute (com.wikia.webdriver.common.core.annotations.Execute)3 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)3 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)2 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)2 GalleryBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.gallery.GalleryBuilderComponentObject)1 SliderBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject)1 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)1 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)1 SpecialCreatePage (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage)1 BlogPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject)1