use of com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.editmode.WikiArticleEditMode in project selenium-tests by Wikia.
the class InteractiveMapPageObject method openEmbedMapPageEdit.
public WikiArticleEditMode openEmbedMapPageEdit(String wikiURL) {
ArticlePageObject article = new ArticlePageObject();
article.navigateToArticleEditPage(wikiURL, URLsContent.EMBEDED_MAP_ARTICLE);
return new WikiArticleEditMode();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.editmode.WikiArticleEditMode in project selenium-tests by Wikia.
the class SpecialCreatePage method addPageWithGivenTitleAndDefaultContent.
public void addPageWithGivenTitleAndDefaultContent(String title) {
populateTitleField(title);
WikiArticleEditMode article = new WikiArticleEditMode();
article.typeInContent(PageContent.ARTICLE_TEXT);
article.clickOnPublish();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.editmode.WikiArticleEditMode in project selenium-tests by Wikia.
the class ArticleRTETest method ArticleRTETest_001.
@Test(dataProvider = "wikiTextsProvider", groups = { "RTE" })
public void ArticleRTETest_001(String[] wikiTexts) {
WikiArticleEditMode edit = new WikiArticleEditMode();
edit.editArticleByName("RTE_test_page", wikiURL);
edit.clickOnSourceButton();
for (String wikitext : wikiTexts) {
String tmp1;
String tmp2;
edit.clearSource();
WebElement e = driver.findElement(By.cssSelector(".cke_source"));
e.sendKeys(wikitext);
edit.clickOnVisualButton();
edit.clickOnSourceButton();
e = driver.findElement(By.cssSelector(".cke_source"));
;
if (Assertion.assertStringContains(e.getAttribute("value"), wikitext)) {
tmp1 = e.getAttribute("value").replace("<", "<");
tmp1.replace(">", ">");
PageObjectLogging.log("checking value passed", "<pre>" + e.getAttribute("value") + "</pre>", true);
} else {
tmp1 = e.getAttribute("value").replace("<", "<");
tmp1 = tmp1.replace(">", ">");
tmp1 = tmp1.replace(" ", " ");
tmp2 = wikitext.replace("<", "<");
tmp2 = tmp2.replace(">", ">");
tmp2 = tmp2.replace(" ", " ");
PageObjectLogging.log("checking value failed", "should be: <pre>" + tmp2 + "</pre>", false);
PageObjectLogging.log("checking value failed", "result is: <pre>" + tmp1 + "</pre>", false, driver);
}
}
edit.clickOnVisualButton();
edit.clickOnPublishButton();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.editmode.WikiArticleEditMode in project selenium-tests by Wikia.
the class EmbedMapTests method EmbedMapTests_001_EmbedMapInWikiaPage.
@Test(enabled = false, groups = { "EmbedMapTests_001", "EmbedMapTests", "InteractiveMaps" })
@Execute(asUser = User.USER)
public void EmbedMapTests_001_EmbedMapInWikiaPage() {
WikiBasePageObject base = new WikiBasePageObject();
InteractiveMapsPageObject specialMap = base.openSpecialInteractiveMaps(wikiURL);
InteractiveMapPageObject selectedMap = specialMap.clickMapWithIndex(InteractiveMapsContent.SELECTED_MAP_INDEX);
selectedMap.verifyMapOpened();
String wikiEmbedCode = selectedMap.getEmbedMapWikiCode();
String mapID = selectedMap.getEmbedMapID();
WikiArticleEditMode editMode = selectedMap.openEmbedMapPageEdit(wikiURL);
editMode.clickSourceButton();
editMode.clearSource();
editMode.verifySourceEditorContentIsEmpty();
editMode.typeContentInSourceMode(wikiEmbedCode);
editMode.clickOnPublish();
editMode.verifyEmbededMap(mapID);
}
Aggregations