use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject 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.pageobject.WikiBasePageObject in project selenium-tests by Wikia.
the class ArticleSourceModeTests method RTE_005_HeadLine.
@Test(groups = { "RTE_extended_1", "RTE_extended_005" })
public void RTE_005_HeadLine() {
WikiBasePageObject base = new WikiBasePageObject();
String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
ArticlePageObject article = new ArticlePageObject().open(articleName);
SourceEditModePageObject source = article.openCurrectArticleSourceMode();
source.clickLvl2Headline();
Assertion.assertEquals(source.getSourceContent(), "\n== Headline text ==\n");
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject in project selenium-tests by Wikia.
the class ArticleSourceModeTests method RTE_004_ExternalLink.
@Test(groups = { "RTE_extended_1", "RTE_extended_004" })
public void RTE_004_ExternalLink() {
WikiBasePageObject base = new WikiBasePageObject();
String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
ArticlePageObject article = new ArticlePageObject().open(articleName);
SourceEditModePageObject source = article.openCurrectArticleSourceMode();
source.clickExternalLink();
Assertion.assertEquals(source.getSourceContent(), "[http://www.example.com link title]");
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject 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.pageobject.WikiBasePageObject in project selenium-tests by Wikia.
the class ArticleSourceModeTests method RTE_017_MoreMainTools.
@Test(groups = { "RTE_extended_3", "RTE_extended_017" })
public void RTE_017_MoreMainTools() {
WikiBasePageObject base = new WikiBasePageObject();
String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
ArticlePageObject article = new ArticlePageObject().open(articleName);
SourceEditModePageObject source = article.openCurrectArticleSourceMode();
source.checkMainTools();
source.submitArticle();
}
Aggregations