Search in sources :

Example 61 with ArticleContent

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

the class ArticleFeaturesCRUDTestsUser method deleteSlideshow.

@Test(groups = { "ArticleFeaturesCRUDUser_004" })
@Execute(asUser = User.USER)
public void deleteSlideshow() {
    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 visualEditMode = new VisualEditModePageObject().open();
    visualEditMode.removeComponent(Components.SLIDESHOW);
    visualEditMode.verifyComponentRemoved(Components.SLIDESHOW);
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 62 with ArticleContent

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

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

the class ArticleFeaturesCRUDTestsUser method addImage.

@Test(groups = { "ArticleFeaturesCRUDUser_010", "Smoke1" })
@Execute(asUser = User.USER)
@InBrowser(browserSize = "1024x720")
public void addImage() {
    new ArticleContent().clear();
    VisualEditModePageObject visualEditMode = new VisualEditModePageObject().open();
    PhotoAddComponentObject photoAddPhoto = visualEditMode.clickPhotoButton();
    PhotoOptionsComponentObject photoOptions = photoAddPhoto.addPhotoFromWiki("image", 1);
    photoOptions.setCaption(PageContent.CAPTION);
    photoOptions.clickAddPhoto();
    visualEditMode.verifyPhoto();
    visualEditMode.submitArticle();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) 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) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 64 with ArticleContent

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

the class ArticleTOCTests method ArticleTOCTests_002_verifyTOChideShowButtonsWorkForAnon.

/**
   * 1. as anon open an article with TOC 3. verify TOC is collapsed 2. verify that show/hide buttons
   * work
   */
@Test(groups = { "ArticleTOCTests", "ArticleTOCTests_002" })
public void ArticleTOCTests_002_verifyTOChideShowButtonsWorkForAnon() {
    new ArticleContent().push(PageContent.ARTICLE_WITH_TOC_LINES);
    ArticlePageObject article = new ArticlePageObject().open();
    article.verifyTOCpresent();
    article.verifyTOCcollapsed();
    article.clickTOCshowHideButton();
    article.verifyTOCexpanded();
    article.clickTOCshowHideButton();
    article.verifyTOCcollapsed();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) Test(org.testng.annotations.Test)

Example 65 with ArticleContent

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

the class ArticleTOCTests method ArticleTOCTests_004_verifyTOCtakesAnonToSectionClicked.

/**
   * 1. as anon open an article with TOC 2. user expands the TOC 3. user clicks on the first link in
   * TOC 3. user view is sent to the chosen section
   */
@// QAART-262
Test(// QAART-262
enabled = false, groups = { "ArticleTOCTests", "ArticleTOCTests_004" })
public void ArticleTOCTests_004_verifyTOCtakesAnonToSectionClicked() {
    new ArticleContent().push(PageContent.ARTICLE_WITH_TOC_LINES);
    ArticlePageObject article = new ArticlePageObject().open();
    article.verifyTOCpresent();
    article.verifyTOCcollapsed();
    article.clickTOCshowHideButton();
    article.verifyTOCsectionLinkWorks(1);
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) 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