use of com.wikia.webdriver.pageobjectsfactory.componentobject.gallery.GalleryBuilderComponentObject in project selenium-tests by Wikia.
the class BlogFeaturesTests method BlogFeatures_001_AddingGallery.
@Test(groups = { "BlogFeatures_001", "BlogFeaturesTests" })
@Execute(asUser = User.USER)
public void BlogFeatures_001_AddingGallery() {
WikiBasePageObject base = new WikiBasePageObject();
SpecialCreatePage createPage = base.openSpecialCreateBlogPage(wikiURL);
String blogPostTitle = PageContent.BLOG_POST_NAME_PREFIX + createPage.getTimeStamp();
VisualEditModePageObject blogEdit = createPage.populateTitleField(blogPostTitle);
GalleryBuilderComponentObject galleryBuiler = blogEdit.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();
blogEdit.verifyGallery();
BlogPageObject blogPage = blogEdit.submitBlog();
blogPage.verifyGallery();
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.gallery.GalleryBuilderComponentObject in project selenium-tests by Wikia.
the class ArticleSourceModeTests method RTE_014_Gallery.
@Test(groups = { "RTE_extended_2", "RTE_extended_014" })
public void RTE_014_Gallery() {
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();
GalleryBuilderComponentObject galleryBuiler = (GalleryBuilderComponentObject) source.addComponent("gallery");
AddPhotoComponentObject galleryAddPhoto = galleryBuiler.clickAddPhoto();
galleryAddPhoto.search("image");
List<String> photoNames = galleryAddPhoto.choosePhotos(4);
galleryAddPhoto.clickSelect();
galleryBuiler.adjustPosition(PositionsGallery.CENTER);
galleryBuiler.adjustColumns("2");
galleryBuiler.adjustSpacing(SpacingGallery.SMALL);
galleryBuiler.adjustOrientation(Orientation.LANDSCAPE);
galleryBuiler.clickFinish();
Assertion.assertEquals(source.getSourceContent(), "<gallery position=\"center\" columns=\"2\" spacing=\"small\">\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.gallery.GalleryBuilderComponentObject in project selenium-tests by Wikia.
the class ModalTests method ModalTests_verifyScrollbarAppears.
@CreationTicket(ticketID = "CONCF-621")
@Test(groups = { "ModalTests_verifyScrollbarAppears_001", "ModalTests" }, dataProvider = "DimensionDataProvider")
@Execute(asUser = User.USER)
public void ModalTests_verifyScrollbarAppears(Dimension dimension) {
String errorMessage = "can not scroll window";
ArticlePageObject article = new ArticlePageObject().open();
VisualEditModePageObject visualEditMode = article.navigateToArticleEditPage();
GalleryBuilderComponentObject galleryBuilder = visualEditMode.clickGalleryButton();
// resize window
driver.manage().window().setSize(dimension);
// make sure you can scroll to finish button and the finish button is visible
Assertion.assertTrue(galleryBuilder.isFinishButtonVisibleOnPage(), errorMessage);
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.gallery.GalleryBuilderComponentObject 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.pageobjectsfactory.componentobject.gallery.GalleryBuilderComponentObject 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();
}
Aggregations