use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class WidgetPageObject method createMultiple.
/**
* Create all tags as defined in widget page object tags field on the tested article
*/
public WidgetPageObject createMultiple(String articleName) {
String text = "";
ArticleContent articleContent = new ArticleContent();
articleContent.clear(articleName);
for (String tag : getMultipleTags()) {
text += tag + "\n";
}
articleContent.push(text, articleName);
return this;
}
use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class WidgetPageObject method createIncorrect.
/**
* Create incorrect widget tag on the tested article
*/
public WidgetPageObject createIncorrect(String articleName) {
ArticleContent articleContent = new ArticleContent();
articleContent.clear(articleName);
articleContent.push(getIncorrectTag(), articleName);
return this;
}
use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class WidgetPageObject method create.
public WidgetPageObject create(String articleName) {
ArticleContent articleContent = new ArticleContent();
articleContent.push(getSingleTag(), articleName);
return this;
}
use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class ArticleActionsAdminTests method moveArticle.
@Test(groups = { "ArticleActionsAdmin_002" })
@UseUnstablePageLoadStrategy
@Execute(asUser = User.STAFF)
public void moveArticle() {
new ArticleContent().push(PageContent.ARTICLE_TEXT);
ArticlePageObject article = new ArticlePageObject().open();
String articleOldTitle = article.getArticleTitle();
String articleNewName = TestContext.getCurrentMethodName() + article.getTimeStamp();
RenamePageObject renamePage = article.renameUsingDropdown();
renamePage.rename(articleNewName, false);
List<Notification> confirmNotifications = article.getNotifications(NotificationType.CONFIRM);
Assertion.assertEquals(confirmNotifications.size(), 1, SpecialRestorePageObject.AssertionMessages.INVALID_NUMBER_OF_CONFIRMING_NOTIFICATIONS);
Assertion.assertEquals(confirmNotifications.stream().findFirst().get().getMessage(), "\"" + articleOldTitle + "\" has been renamed \"" + articleNewName + "\"", "Banner notification messsage is invalid");
Assertion.assertEquals(article.getArticleName(), articleNewName, "New article title is invalid");
}
use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class ArticleCRUDUserTests method ArticleCRUDUser_003_addDropdown.
@Test(groups = { "ArticleCRUDUser_003", "Smoke1" })
@Execute(asUser = User.USER)
public void ArticleCRUDUser_003_addDropdown() {
new ArticleContent().clear();
String articleContent = PageContent.ARTICLE_TEXT;
String articleTitle = PageContent.ARTICLE_NAME_PREFIX + DateTime.now().getMillis();
ArticlePageObject article = new ArticlePageObject().open(TestContext.getCurrentMethodName() + "?AbTest.ADD_NEW_PAGE=CONTROL1");
VisualEditModePageObject visualEditMode = article.createArticleInCKUsingDropdown(articleTitle);
visualEditMode.addContent(articleContent);
visualEditMode.submitArticle();
article.verifyContent(articleContent);
article.verifyArticleTitle(articleTitle);
}
Aggregations