Search in sources :

Example 36 with ArticleContent

use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.

the class CategoryPageTest method mercury_category_navigateToCategoryMemberPage.

@Test(groups = "mercury_category_navigateToCategoryMemberPage")
public void mercury_category_navigateToCategoryMemberPage() {
    final String categoryName = String.format("Category:%s", TestContext.getCurrentMethodName());
    final String articleContent = "Test article content";
    new ArticleContent().push(String.format("%s [[%s]]", articleContent, categoryName));
    ArticlePage article = new CategoryPage().open(categoryName).navigateToCategoryMemberPage();
    Assert.assertEquals(articleContent, article.getArticleContent());
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePage(com.wikia.webdriver.elements.mercury.pages.ArticlePage) CategoryPage(com.wikia.webdriver.elements.mercury.pages.CategoryPage) Test(org.testng.annotations.Test)

Example 37 with ArticleContent

use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.

the class PortableInfoboxTests method verifyImagesInWhatLinksHerePage.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_002" })
public void verifyImagesInWhatLinksHerePage() {
    new ArticleContent().push(String.format("[[%s]]", PageContent.INFOBOX_2), "Infobox2_WhatLinksHere");
    // provide an article linking to testing Infobox
    new TemplateContent().push(INFOBOX2_TEMPLATE, PageContent.INFOBOX_2);
    new ArticleContent().push(INFOBOX2_INVOCATION, PageContent.INFOBOX_2);
    ArticlePageObject article = new ArticlePageObject();
    article.open("Infobox2_WhatLinksHere");
    String articleName = article.getArticleName();
    SpecialWhatLinksHerePageObject whatLinksHere = article.openSpecialWhatLinksHere(wikiURL);
    whatLinksHere.clickPageInputField().typeInfoboxImageName("Infobox2").clickShowButton();
    Assertion.assertTrue(whatLinksHere.whatLinksHereContainsArticleName(articleName));
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) TemplateContent(com.wikia.webdriver.common.core.api.TemplateContent) SpecialWhatLinksHerePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialWhatLinksHerePageObject) Test(org.testng.annotations.Test)

Example 38 with ArticleContent

use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.

the class PortableInfoboxTests method verifyEmptyTagsAreNotAppearing.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_003" })
public void verifyEmptyTagsAreNotAppearing() {
    new ArticleContent().push(INFOBOX_EMPTY_TAGS_INVOCATION, PageContent.INFOBOX_1);
    PortableInfobox infobox = new PortableInfobox();
    infobox.open(PageContent.INFOBOX_1);
    Assertion.assertTrue(infobox.infoboxContainsEmptyTag());
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) PortableInfobox(com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox) Test(org.testng.annotations.Test)

Example 39 with ArticleContent

use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.

the class PortableInfoboxTests method verifyInternalLinksRedirecting.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_001", "PortableInfoboxLinksTests" })
public void verifyInternalLinksRedirecting() {
    new ArticleContent().push("article cannot be empty", PageContent.INFOBOX_1);
    new TemplateContent().push(INFOBOX2_TEMPLATE, PageContent.INFOBOX_2);
    new ArticleContent().push(INFOBOX2_INVOCATION, PageContent.INFOBOX_2);
    PortableInfobox infobox = new PortableInfobox();
    infobox.open(PageContent.INFOBOX_2);
    String internalLinkName = infobox.getInternalLinkRedirectTitle(0);
    String internalURL = infobox.clickInternalLinkWithIndex(0).waitForUrlToContain(internalLinkName).getCurrentUrl();
    Assertion.assertEquals(internalLinkName, internalURL);
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) TemplateContent(com.wikia.webdriver.common.core.api.TemplateContent) PortableInfobox(com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox) Test(org.testng.annotations.Test)

Example 40 with ArticleContent

use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.

the class PortableInfoboxTests method insertEmptyInfoboxInVE.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_003" })
public void insertEmptyInfoboxInVE() {
    new ArticleContent().clear();
    ArticlePageObject article = new ArticlePageObject();
    article.open();
    new ArticlePurger().purgeArticleAsAnon();
    VisualEditorPageObject visualEditor = article.openVEModeWithMainEditButton().clickInsertToolButton().clickInsertInfoboxFromInsertToolMenu().selectInfoboxTemplate(2).applyChanges();
    Assertion.assertTrue(visualEditor.isInfoboxInsertedInEditorArea());
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) ArticlePurger(com.wikia.webdriver.common.core.helpers.ArticlePurger) 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