Search in sources :

Example 6 with ArticleContent

use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.

the class ArticleFeaturesCRUDTestsUser method addingTable.

@Test(dataProviderClass = ArticleFeaturesCRUDDataProvider.class, dataProvider = "getTableProperties", groups = { "ArticleFeaturesCRUDUser_011" })
@Execute(asUser = User.USER)
public void addingTable(int border, int width, int height, int cellspacing, int cellpadding, Alignment alignment) {
    new ArticleContent().clear();
    VisualEditModePageObject visualEditMode = new VisualEditModePageObject().open();
    TableBuilderComponentObject addTable = visualEditMode.clickAddTableButton();
    addTable.verifyAddTableLightbox();
    addTable.typeAmountOfRows(3);
    addTable.typeAmountOfColumns(2);
    addTable.selectHeader(Headers.FIRSTCOLUMN);
    addTable.typeBorderSize(border);
    addTable.selectAlignment(alignment);
    addTable.typeWidth(width);
    addTable.typeHeight(height);
    addTable.typeCellSpacing(cellspacing);
    addTable.typeCellPadding(cellpadding);
    addTable.submitTable();
    ArticlePageObject article = visualEditMode.submitArticle();
    article.verifyTableBorder(border);
    article.verifyTableCellspacing(cellspacing);
    article.verifyTableCellpadding(cellpadding);
    article.verifyTableAlignment(alignment);
    article.verifyTableSize(width, height);
}
Also used : TableBuilderComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.addtable.TableBuilderComponentObject) ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 7 with ArticleContent

use of com.wikia.webdriver.common.core.api.ArticleContent 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 8 with ArticleContent

use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.

the class ArticleFeaturesCRUDTestsUser method addingImagePlaceholder.

@Test(groups = { "ArticleFeaturesCRUDUser_014" })
@Execute(asUser = User.USER)
public void addingImagePlaceholder() {
    new ArticleContent().clear();
    new ArticlePageObject().open();
    VisualEditModePageObject visualEditMode = new WikiBasePageObject().goToArticleDefaultContentEditPage(wikiURL, TestContext.getCurrentMethodName());
    ArticlePageObject article = visualEditMode.submitArticle();
    PhotoAddComponentObject photoAddPhoto = article.clickAddImagePlaceholder();
    PhotoOptionsComponentObject photoOptions = photoAddPhoto.addPhotoFromWiki("image", 2);
    photoOptions.setCaption(PageContent.CAPTION);
    photoOptions.clickAddPhoto();
    article.verifyPhoto();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) PhotoAddComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject) PhotoOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 9 with ArticleContent

use of com.wikia.webdriver.common.core.api.ArticleContent 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 10 with ArticleContent

use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.

the class ArticleFeaturesCRUDTestsUser method modifyImage.

@Test(groups = { "ArticleFeaturesCRUDUser_009", "Smoke4" })
@Execute(asUser = User.USER)
public void modifyImage() {
    new ArticleContent().push("[[File:Image010.jpg|thumb|QAWebdriverCaption1]]");
    VisualEditModePageObject visualEditMode = new VisualEditModePageObject().open();
    visualEditMode.modifyComponent(Components.PHOTO);
    PhotoOptionsComponentObject photoOptions = new PhotoOptionsComponentObject(driver);
    photoOptions.setCaption(PageContent.CAPTION2);
    photoOptions.clickAddPhoto();
    visualEditMode.verifyPhoto();
    visualEditMode.submitArticle().verifyPhoto();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) PhotoOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Aggregations

ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)99 Test (org.testng.annotations.Test)94 Execute (com.wikia.webdriver.common.core.annotations.Execute)55 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)51 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)38 PortableInfobox (com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox)16 TemplateContent (com.wikia.webdriver.common.core.api.TemplateContent)15 VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)15 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)11 ArticlePurger (com.wikia.webdriver.common.core.helpers.ArticlePurger)8 CategoryPage (com.wikia.webdriver.elements.mercury.pages.CategoryPage)6 AddPhotoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.addphoto.AddPhotoComponentObject)6 MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)6 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)6 VisualEditorPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject)6 PreviewEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject)5 PhotoOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject)4 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)3 Notification (com.wikia.webdriver.elements.oasis.components.notifications.Notification)3 PhotoAddComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject)3