Search in sources :

Example 86 with ArticleContent

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

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

the class ArticleFeaturesCRUDTestsUser method addVideo.

@Test(groups = { "ArticleFeaturesCRUDUser_007", "Media" })
@Execute(asUser = User.USER)
public void addVideo() {
    new ArticleContent().clear();
    VisualEditModePageObject visualEditMode = new VisualEditModePageObject().open();
    VetAddVideoComponentObject vetAddVideo = visualEditMode.clickVideoButton();
    VetOptionsComponentObject vetOptions = vetAddVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
    vetOptions.setCaption(PageContent.CAPTION);
    vetOptions.submit();
    visualEditMode.verifyVideo();
    visualEditMode.submitArticle().verifyVideo();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) VetOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 88 with ArticleContent

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

the class ArticleFeaturesCRUDTestsUser method deleteImage.

@Test
@Execute(asUser = User.USER)
public void deleteImage() {
    new ArticleContent().push("[[File:Image009.jpg|thumb|QAWebdriverCaption1]]");
    VisualEditModePageObject visualEditMode = new VisualEditModePageObject().open();
    visualEditMode.removeComponent(Components.PHOTO);
    visualEditMode.verifyComponentRemoved(Components.PHOTO);
}
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 89 with ArticleContent

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

Example 90 with ArticleContent

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

the class VetArticleCommentsTests method RegularUserCanAddVideoInArticleCommentEditorByFindingWikiaVideo.

@Test(groups = { "VetArticleComments_002" })
@Execute(asUser = User.USER)
public void RegularUserCanAddVideoInArticleCommentEditorByFindingWikiaVideo() {
    new ArticleContent().clear();
    ArticlePageObject article = new ArticlePageObject().open();
    MiniEditorComponentObject editor = article.triggerCommentArea();
    VetAddVideoComponentObject vetAddingVideo = editor.clickAddVideo();
    VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByQuery(VideoContent.WIKIA_VIDEO_QUERY, 0);
    vetOptions.setCaption(PageContent.CAPTION);
    String desiredVideoName = vetOptions.getVideoName();
    vetOptions.submit();
    Assertion.assertTrue(article.getArticleComment().isVideoVisible(), "Video is not visible");
    article.submitComment();
    Assertion.assertTrue(article.isVideoCommentPresent(desiredVideoName), "Video comment doesn't have desired name");
}
Also used : MiniEditorComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject) ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VetOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject) VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject) 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