use of com.wikia.webdriver.pageobjectsfactory.componentobject.slideshow.SlideshowBuilderComponentObject 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();
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.slideshow.SlideshowBuilderComponentObject in project selenium-tests by Wikia.
the class ArticleFeaturesCRUDTestsUser method modifySlideshow.
@Test(groups = { "ArticleFeaturesCRUDUser_003" })
@Execute(asUser = User.USER)
public void modifySlideshow() {
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 visualEditor = new VisualEditModePageObject().open();
SlideshowBuilderComponentObject slideshowBuilder = (SlideshowBuilderComponentObject) visualEditor.modifyComponent(Components.SLIDESHOW);
AddPhotoComponentObject slideshowAddPhoto = slideshowBuilder.clickAddPhoto();
slideshowAddPhoto.search("image");
slideshowAddPhoto.choosePhotos(8);
slideshowAddPhoto.clickSelect();
slideshowBuilder.adjustPosition(Positions.RIGHT);
slideshowBuilder.clickFinish();
visualEditor.verifySlideshow();
visualEditor.submitArticle().verifySlideshow();
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.slideshow.SlideshowBuilderComponentObject in project selenium-tests by Wikia.
the class BlogFeaturesTests method BlogFeatures_002_AddingSlideshow.
@Test(groups = { "BlogFeatures_002", "BlogFeaturesTests" })
@Execute(asUser = User.USER)
public void BlogFeatures_002_AddingSlideshow() {
WikiBasePageObject base = new WikiBasePageObject();
SpecialCreatePage createPage = base.openSpecialCreateBlogPage(wikiURL);
String blogPostTitle = PageContent.BLOG_POST_NAME_PREFIX + createPage.getTimeStamp();
VisualEditModePageObject blogEdit = createPage.populateTitleField(blogPostTitle);
SlideshowBuilderComponentObject slideshowBuilder = blogEdit.clickSlideshowButton();
AddPhotoComponentObject slideshowAddPhoto = slideshowBuilder.clickAddPhoto();
slideshowAddPhoto.search("image");
slideshowAddPhoto.choosePhotos(4);
slideshowAddPhoto.clickSelect();
slideshowBuilder.adjustPosition(Positions.CENTER);
slideshowBuilder.clickFinish();
blogEdit.verifySlideshow();
BlogPageObject blogPage = blogEdit.submitBlog();
blogPage.verifySlideshow();
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.slideshow.SlideshowBuilderComponentObject in project selenium-tests by Wikia.
the class ArticleSourceModeTests method RTE_013_Slideshow.
@Test(groups = { "RTE_extended_2", "RTE_extended_013" })
public void RTE_013_Slideshow() {
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();
SlideshowBuilderComponentObject slideshowBuilder = (SlideshowBuilderComponentObject) source.addComponent("slideshow");
AddPhotoComponentObject slideshowAddPhoto = slideshowBuilder.clickAddPhoto();
slideshowAddPhoto.search("image");
List<String> photoNames = slideshowAddPhoto.choosePhotos(4);
slideshowAddPhoto.clickSelect();
slideshowBuilder.adjustPosition(Positions.CENTER);
slideshowBuilder.clickFinish();
Assertion.assertEquals(source.getSourceContent(), "<gallery type=\"slideshow\" position=\"center\">\n" + photoNames.get(0) + "\n" + photoNames.get(1) + "\n" + photoNames.get(2) + "\n" + photoNames.get(3) + "\n</gallery>");
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.slideshow.SlideshowBuilderComponentObject in project selenium-tests by Wikia.
the class SourceEditModePageObject method addComponent.
public Object addComponent(String componentName) {
if ("slideshow".equals(componentName)) {
wait.forElementVisible(createSlideshow);
createSlideshow.click();
PageObjectLogging.log("addComponent", "selected " + componentName + " component", true);
return new SlideshowBuilderComponentObject(driver);
} else if ("gallery".equals(componentName)) {
wait.forElementVisible(createGallery);
createGallery.click();
PageObjectLogging.log("addComponent", "selected " + componentName + " component", true);
return new GalleryBuilderComponentObject(driver);
} else if ("slider".equals(componentName)) {
wait.forElementVisible(createSlider);
createSlider.click();
PageObjectLogging.log("addComponent", "selected " + componentName + " component", true);
return new SliderBuilderComponentObject(driver);
} else {
PageObjectLogging.log("addComponent", "not supported component name: " + componentName, false);
return null;
}
}
Aggregations