use of com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject in project selenium-tests by Wikia.
the class ArticleSourceModeTests method RTE_012_Photo.
@Test(groups = { "RTE_extended_2", "RTE_extended_012" })
@Execute(onWikia = "seleniumtests")
public void RTE_012_Photo() {
WikiBasePageObject base = new WikiBasePageObject();
base.loginAs(User.STAFF);
String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
ArticlePageObject article = new ArticlePageObject().open(articleName);
SourceEditModePageObject source = article.openCurrectArticleSourceMode();
PhotoAddComponentObject photoAddPhoto = source.clickAddPhoto();
PhotoOptionsComponentObject photoOptions = photoAddPhoto.addPhotoFromWiki(PageContent.FILE);
photoOptions.setCaption(PageContent.CAPTION);
photoOptions.clickAddPhoto();
String photoName = photoAddPhoto.getPhotoName();
Assertion.assertEquals(source.getSourceContent(), String.format(PageContent.WIKI_TEXT_PHOTO.replace("%photoName%", photoName), PageContent.CAPTION));
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject in project selenium-tests by Wikia.
the class BlogFeaturesTests method addingImage.
@Test(groups = { "BlogFeatures_005", "BlogFeaturesTests" })
@Execute(asUser = User.USER)
public void addingImage() {
WikiBasePageObject base = new WikiBasePageObject();
SpecialCreatePage createPage = base.openSpecialCreateBlogPage(wikiURL);
String blogPostTitle = PageContent.BLOG_POST_NAME_PREFIX + createPage.getTimeStamp();
VisualEditModePageObject blogEdit = createPage.populateTitleField(blogPostTitle);
PhotoAddComponentObject photoAddPhoto = blogEdit.clickPhotoButton();
PhotoOptionsComponentObject photoOptions = photoAddPhoto.addPhotoFromWiki("image", 1);
photoOptions.setCaption(PageContent.CAPTION);
photoOptions.clickAddPhoto();
blogEdit.verifyPhoto();
BlogPageObject blogPage = blogEdit.submitBlog();
blogPage.verifyPhoto();
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject in project selenium-tests by Wikia.
the class ArticleFeaturesCRUDTestsUser method addImage.
@Test(groups = { "ArticleFeaturesCRUDUser_010", "Smoke1" })
@Execute(asUser = User.USER)
@InBrowser(browserSize = "1024x720")
public void addImage() {
new ArticleContent().clear();
VisualEditModePageObject visualEditMode = new VisualEditModePageObject().open();
PhotoAddComponentObject photoAddPhoto = visualEditMode.clickPhotoButton();
PhotoOptionsComponentObject photoOptions = photoAddPhoto.addPhotoFromWiki("image", 1);
photoOptions.setCaption(PageContent.CAPTION);
photoOptions.clickAddPhoto();
visualEditMode.verifyPhoto();
visualEditMode.submitArticle();
}
Aggregations