Search in sources :

Example 1 with GalleryBuilderComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.gallery.GalleryBuilderComponentObject 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 2 with GalleryBuilderComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.gallery.GalleryBuilderComponentObject in project selenium-tests by Wikia.

the class ArticleSourceModeTests method RTE_014_Gallery.

@Test(groups = { "RTE_extended_2", "RTE_extended_014" })
public void RTE_014_Gallery() {
    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();
    GalleryBuilderComponentObject galleryBuiler = (GalleryBuilderComponentObject) source.addComponent("gallery");
    AddPhotoComponentObject galleryAddPhoto = galleryBuiler.clickAddPhoto();
    galleryAddPhoto.search("image");
    List<String> photoNames = galleryAddPhoto.choosePhotos(4);
    galleryAddPhoto.clickSelect();
    galleryBuiler.adjustPosition(PositionsGallery.CENTER);
    galleryBuiler.adjustColumns("2");
    galleryBuiler.adjustSpacing(SpacingGallery.SMALL);
    galleryBuiler.adjustOrientation(Orientation.LANDSCAPE);
    galleryBuiler.clickFinish();
    Assertion.assertEquals(source.getSourceContent(), "<gallery position=\"center\" columns=\"2\" spacing=\"small\">\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) GalleryBuilderComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.gallery.GalleryBuilderComponentObject) AddPhotoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.addphoto.AddPhotoComponentObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) Test(org.testng.annotations.Test)

Example 3 with GalleryBuilderComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.gallery.GalleryBuilderComponentObject in project selenium-tests by Wikia.

the class ModalTests method ModalTests_verifyScrollbarAppears.

@CreationTicket(ticketID = "CONCF-621")
@Test(groups = { "ModalTests_verifyScrollbarAppears_001", "ModalTests" }, dataProvider = "DimensionDataProvider")
@Execute(asUser = User.USER)
public void ModalTests_verifyScrollbarAppears(Dimension dimension) {
    String errorMessage = "can not scroll window";
    ArticlePageObject article = new ArticlePageObject().open();
    VisualEditModePageObject visualEditMode = article.navigateToArticleEditPage();
    GalleryBuilderComponentObject galleryBuilder = visualEditMode.clickGalleryButton();
    // resize window
    driver.manage().window().setSize(dimension);
    // make sure you can scroll to finish button and the finish button is visible
    Assertion.assertTrue(galleryBuilder.isFinishButtonVisibleOnPage(), errorMessage);
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) GalleryBuilderComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.gallery.GalleryBuilderComponentObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) CreationTicket(com.wikia.webdriver.common.core.annotations.CreationTicket) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 4 with GalleryBuilderComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.gallery.GalleryBuilderComponentObject 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 5 with GalleryBuilderComponentObject

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

GalleryBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.gallery.GalleryBuilderComponentObject)6 Test (org.testng.annotations.Test)5 Execute (com.wikia.webdriver.common.core.annotations.Execute)4 AddPhotoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.addphoto.AddPhotoComponentObject)4 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)4 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)2 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)2 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)2 CreationTicket (com.wikia.webdriver.common.core.annotations.CreationTicket)1 SliderBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject)1 SlideshowBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.slideshow.SlideshowBuilderComponentObject)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