use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject in project selenium-tests by Wikia.
the class ArticlePageObject method verifyRedLinkEditor.
public void verifyRedLinkEditor(Editor expectedEditor) {
switch(expectedEditor) {
case VE:
VisualEditorPageObject ve = openVEModeWithRedLinks(0);
ve.verifyVEToolBarPresent();
ve.verifyEditorSurfacePresent();
break;
case CK:
VisualEditModePageObject ck = openCKModeWithRedLinks(0);
Assertion.assertTrue(ck.isContentLoaded(), "Content is not loaded");
ck.clickPublishButton();
break;
case SRC:
SourceEditModePageObject src = openSrcModeWithRedLinks(0);
src.verifySourceOnlyMode();
src.clickPublishButton();
break;
}
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject in project selenium-tests by Wikia.
the class ArticleSourceModeTests method RTE_010_Signature.
@Test(groups = { "RTE_extended_2", "RTE_extended_010" })
public void RTE_010_Signature() {
WikiBasePageObject base = new WikiBasePageObject();
String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
ArticlePageObject article = new ArticlePageObject().open(articleName);
SourceEditModePageObject source = article.openCurrectArticleSourceMode();
source.clickSignature();
Assertion.assertEquals(source.getSourceContent(), "--~~~~");
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject in project selenium-tests by Wikia.
the class ArticleSourceModeTests method RTE_018_MoreWikiMarkupTools.
@Test(groups = { "RTE_extended_3", "RTE_extended_018" })
public void RTE_018_MoreWikiMarkupTools() {
WikiBasePageObject base = new WikiBasePageObject();
String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
ArticlePageObject article = new ArticlePageObject().open(articleName);
SourceEditModePageObject source = article.openCurrectArticleSourceMode();
source.checkWikiMarkupTools();
source.submitArticle();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject in project selenium-tests by Wikia.
the class ArticleSourceModeTests method RTE_021_YoutubeTag_Publish.
@CreationTicket(ticketID = "CONCF-626")
@Test(groups = { "RTE_extended_4", "RTE_extended_021" })
public void RTE_021_YoutubeTag_Publish() {
WikiBasePageObject base = new WikiBasePageObject();
String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
ArticlePageObject article = new ArticlePageObject().open(articleName);
SourceEditModePageObject source = article.openCurrectArticleSourceMode();
YoutubeVideo video = YoutubeVideoProvider.getLatestVideoForQuery("water");
String videoID = video.getID();
source.addContentInSourceMode("<youtube>\n" + videoID + "\n</youtube>");
article = source.clickPublishButton();
article.verifyArticleTitle(articleName);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject 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));
}
Aggregations