Search in sources :

Example 1 with ArticleContent

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;
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent)

Example 2 with ArticleContent

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;
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent)

Example 3 with ArticleContent

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;
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent)

Example 4 with ArticleContent

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");
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) RenamePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.actions.RenamePageObject) Notification(com.wikia.webdriver.elements.oasis.components.notifications.Notification) UseUnstablePageLoadStrategy(com.wikia.webdriver.common.driverprovider.UseUnstablePageLoadStrategy) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 5 with ArticleContent

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);
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Aggregations

ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)99 Test (org.testng.annotations.Test)94 Execute (com.wikia.webdriver.common.core.annotations.Execute)55 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)51 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)38 PortableInfobox (com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox)16 TemplateContent (com.wikia.webdriver.common.core.api.TemplateContent)15 VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)15 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)11 ArticlePurger (com.wikia.webdriver.common.core.helpers.ArticlePurger)8 CategoryPage (com.wikia.webdriver.elements.mercury.pages.CategoryPage)6 AddPhotoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.addphoto.AddPhotoComponentObject)6 MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)6 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)6 VisualEditorPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject)6 PreviewEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject)5 PhotoOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject)4 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)3 Notification (com.wikia.webdriver.elements.oasis.components.notifications.Notification)3 PhotoAddComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject)3