Search in sources :

Example 1 with SliderBuilderComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject in project selenium-tests by Wikia.

the class ArticleFeaturesCRUDTestsUser method modifySlider.

@Test(groups = { "ArticleFeaturesCRUDUser_005" })
@Execute(asUser = User.USER)
public void modifySlider() {
    new ArticleContent().push("<gallery type=\"slider\" orientation=\"right\">\nImage010.jpg\n" + "Image009.jpg\nImage008.jpg\nImage007.jpg\n</gallery>");
    VisualEditModePageObject visualEditor = new VisualEditModePageObject().open();
    SliderBuilderComponentObject sliderBuilder = (SliderBuilderComponentObject) visualEditor.modifyComponent(Components.SLIDER);
    sliderBuilder.selectMenuPosition(MenuPositions.HORIZONTAL);
    AddPhotoComponentObject sliderAddPhoto = sliderBuilder.clickAddPhoto();
    sliderAddPhoto.search("image");
    sliderAddPhoto.choosePhotos(8);
    sliderAddPhoto.clickSelect();
    sliderBuilder.clickFinish();
    visualEditor.verifySlider();
    visualEditor.submitArticle().verifySlider();
}
Also used : SliderBuilderComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject) ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) 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 SliderBuilderComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject 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 3 with SliderBuilderComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject in project selenium-tests by Wikia.

the class ArticleFeaturesCRUDTestsUser method addSlider.

@Test(groups = { "ArticleFeaturesCRUDUser_005" })
@Execute(asUser = User.USER)
public void addSlider() {
    new ArticleContent().clear();
    VisualEditModePageObject visualEditMode = new VisualEditModePageObject().open();
    SliderBuilderComponentObject sliderBuilder = visualEditMode.clickSliderButton();
    sliderBuilder.selectMenuPosition(MenuPositions.VERTICAL);
    AddPhotoComponentObject sliderAddPhoto = sliderBuilder.clickAddPhoto();
    sliderAddPhoto.search("image");
    sliderAddPhoto.choosePhotos(4);
    sliderAddPhoto.clickSelect();
    sliderBuilder.clickFinish();
    visualEditMode.verifySlider();
    visualEditMode.submitArticle().verifySlider();
}
Also used : SliderBuilderComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject) ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) 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 4 with SliderBuilderComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject in project selenium-tests by Wikia.

the class ArticleSourceModeTests method RTE_015_Slider.

@Test(groups = { "RTE_extended_3", "RTE_extended_015" })
public void RTE_015_Slider() {
    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();
    SliderBuilderComponentObject sliderBuilder = (SliderBuilderComponentObject) source.addComponent("slider");
    sliderBuilder.selectMenuPosition(MenuPositions.VERTICAL);
    AddPhotoComponentObject sliderAddPhoto = sliderBuilder.clickAddPhoto();
    sliderAddPhoto.search("image");
    List<String> photoNames = sliderAddPhoto.choosePhotos(4);
    sliderAddPhoto.clickSelect();
    sliderBuilder.clickFinish();
    Assertion.assertEquals(source.getSourceContent(), "<gallery type=\"slider\" orientation=\"right\">\n" + photoNames.get(0) + "\n" + photoNames.get(1) + "\n" + photoNames.get(2) + "\n" + photoNames.get(3) + "\n</gallery>");
}
Also used : SliderBuilderComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) SourceEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject) AddPhotoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.addphoto.AddPhotoComponentObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) Test(org.testng.annotations.Test)

Example 5 with SliderBuilderComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject 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

SliderBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject)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 SlideshowBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.slideshow.SlideshowBuilderComponentObject)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