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();
}
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();
}
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);
}
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();
}
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");
}
Aggregations