Search in sources :

Example 11 with AddPhotoComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.addphoto.AddPhotoComponentObject in project selenium-tests by Wikia.

the class ArticleFeaturesCRUDTestsUser method addGallery.

@Test(groups = { "ArticleFeaturesCRUDUser_001", "Smoke" })
@Execute(asUser = User.USER)
public void addGallery() {
    new ArticleContent().clear();
    VisualEditModePageObject visualEditMode = new VisualEditModePageObject().open();
    visualEditMode.clearContent();
    GalleryBuilderComponentObject galleryBuiler = visualEditMode.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();
    visualEditMode.verifyGallery();
    visualEditMode.submitArticle().verifyGallery();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) 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) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 12 with AddPhotoComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.addphoto.AddPhotoComponentObject in project selenium-tests by Wikia.

the class ArticleFeaturesCRUDTestsUser method modifyGallery.

@Test(groups = { "Smoke" })
@Execute(asUser = User.USER)
public void modifyGallery() {
    new ArticleContent().push("<gallery position=\"right\" columns=\"1\" spacing=\"medium\">\n" + "Image010.jpg\n" + "Image009.jpg\n" + "</gallery>");
    VisualEditModePageObject visualEditMode = new VisualEditModePageObject().open();
    GalleryBuilderComponentObject galleryBuiler = (GalleryBuilderComponentObject) visualEditMode.modifyComponent(Components.GALLERY);
    AddPhotoComponentObject galleryAddPhoto = galleryBuiler.clickAddPhoto();
    galleryAddPhoto.search("image");
    galleryAddPhoto.choosePhotos(2);
    galleryAddPhoto.clickSelect();
    galleryBuiler.adjustPosition(PositionsGallery.RIGHT);
    galleryBuiler.adjustColumns("3");
    galleryBuiler.adjustSpacing(SpacingGallery.MEDIUM);
    galleryBuiler.adjustOrientation(Orientation.PORTRAIT);
    galleryBuiler.clickFinish();
    visualEditMode.verifyGallery();
    visualEditMode.submitArticle().verifyGallery();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) 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) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Aggregations

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