use of com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject 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();
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject in project selenium-tests by Wikia.
the class BlogFeaturesTests method BlogFeatures_003_AddingSlider.
@Test(groups = { "BlogFeatures_003", "BlogFeaturesTests" })
@Execute(asUser = User.USER)
public void BlogFeatures_003_AddingSlider() {
WikiBasePageObject base = new WikiBasePageObject();
SpecialCreatePage createPage = base.openSpecialCreateBlogPage(wikiURL);
String blogPostTitle = PageContent.BLOG_POST_NAME_PREFIX + createPage.getTimeStamp();
VisualEditModePageObject blogEdit = createPage.populateTitleField(blogPostTitle);
SliderBuilderComponentObject sliderBuilder = blogEdit.clickSliderButton();
sliderBuilder.selectMenuPosition(MenuPositions.VERTICAL);
AddPhotoComponentObject sliderAddPhoto = sliderBuilder.clickAddPhoto();
sliderAddPhoto.search("image");
sliderAddPhoto.choosePhotos(4);
sliderAddPhoto.clickSelect();
sliderBuilder.clickFinish();
blogEdit.verifySlider();
BlogPageObject blogPage = blogEdit.submitBlog();
blogPage.verifySlider();
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject 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();
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject in project selenium-tests by Wikia.
the class ArticleSourceModeTests method RTE_015_Slider.
@Test(groups = { "RTE_extended_3", "RTE_extended_015" })
public void RTE_015_Slider() {
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();
SliderBuilderComponentObject sliderBuilder = (SliderBuilderComponentObject) source.addComponent("slider");
sliderBuilder.selectMenuPosition(MenuPositions.VERTICAL);
AddPhotoComponentObject sliderAddPhoto = sliderBuilder.clickAddPhoto();
sliderAddPhoto.search("image");
List<String> photoNames = sliderAddPhoto.choosePhotos(4);
sliderAddPhoto.clickSelect();
sliderBuilder.clickFinish();
Assertion.assertEquals(source.getSourceContent(), "<gallery type=\"slider\" orientation=\"right\">\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.slider.SliderBuilderComponentObject 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