Search in sources :

Example 6 with PortableInfobox

use of com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox in project selenium-tests by Wikia.

the class PortableInfoboxTests method verifyExternalLinksRedirecting.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_001", "PortableInfoboxLinksTests" })
public void verifyExternalLinksRedirecting() {
    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 externalLinkName = infobox.getExternalLinkRedirectTitle(0);
    String externalUrl = infobox.clickExternalLinkWithIndex(0).waitForUrlToContain(externalLinkName).getCurrentUrl();
    Assertion.assertEquals(externalLinkName.toLowerCase(), externalUrl.toLowerCase());
}
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 7 with PortableInfobox

use of com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox in project selenium-tests by Wikia.

the class PortableInfoboxTests method verifyInfoboxCategoryLinks.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_002" })
public void verifyInfoboxCategoryLinks() {
    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 categoryLinkName = infobox.getCategoryLinkName();
    infobox.clickCategoryLink();
    String categoryPageTitle = new CategoryPageObject().getCategoryPageTitle();
    Assertion.assertTrue(categoryLinkName.contains(categoryPageTitle));
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) TemplateContent(com.wikia.webdriver.common.core.api.TemplateContent) CategoryPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.category.CategoryPageObject) PortableInfobox(com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox) Test(org.testng.annotations.Test)

Example 8 with PortableInfobox

use of com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox in project selenium-tests by Wikia.

the class PortableInfoboxTests method verifyDivsWrappersAreNotIncluded.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_003" })
public void verifyDivsWrappersAreNotIncluded() {
    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);
    Assertion.assertFalse(infobox.imageContainsDiv(0));
    Assertion.assertFalse(infobox.headerContainsDiv(0));
    Assertion.assertFalse(infobox.titleContainsDiv(0));
}
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 9 with PortableInfobox

use of com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox in project selenium-tests by Wikia.

the class PortableInfoboxTests method verifyRedlinksRedirecting.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_001" })
public void verifyRedlinksRedirecting() {
    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);
    Assertion.assertTrue(infobox.clickRedLinkWithIndex(0).isCreateNewArticleModalVisible());
}
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 10 with PortableInfobox

use of com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox in project selenium-tests by Wikia.

the class PortableInfoboxTests method verifyCopiedTemplateSyntaxInArticlePresence.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_002" })
@Execute(asUser = User.USER_9)
public void verifyCopiedTemplateSyntaxInArticlePresence() {
    TemplatePage template = new TemplatePage();
    ArticlePageObject article = new ArticlePageObject();
    PortableInfobox infobox = new PortableInfobox();
    AceEditor editor = new AceEditor();
    template.openArticleByName(wikiURL, String.format("%s:%s", PageContent.TEMPLATE_NAMESPACE, PageContent.INFOBOX_2)).editArticleInSrcUsingDropdown();
    String templateSyntax = editor.getContent();
    (new ArticleContent()).clear();
    article.open();
    new ArticlePurger().purgeArticleAsLoggedUser();
    article.openCurrectArticleSourceMode().addContentInSourceMode(templateSyntax).submitArticle();
    Assertion.assertTrue(infobox.isInfoboxTitleVisible());
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) TemplatePage(com.wikia.webdriver.elements.oasis.pages.TemplatePage) ArticlePurger(com.wikia.webdriver.common.core.helpers.ArticlePurger) PortableInfobox(com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox) AceEditor(com.wikia.webdriver.pageobjectsfactory.componentobject.AceEditor) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Aggregations

PortableInfobox (com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox)18 Test (org.testng.annotations.Test)18 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)16 TemplateContent (com.wikia.webdriver.common.core.api.TemplateContent)14 Execute (com.wikia.webdriver.common.core.annotations.Execute)4 ArticlePurger (com.wikia.webdriver.common.core.helpers.ArticlePurger)4 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)2 CategoryPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.category.CategoryPageObject)2 InfoboxBuilderPage (com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage)1 TemplatePage (com.wikia.webdriver.elements.oasis.pages.TemplatePage)1 AceEditor (com.wikia.webdriver.pageobjectsfactory.componentobject.AceEditor)1 MobileAdsBaseObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.mobile.MobileAdsBaseObject)1 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)1 SpecialThemeDesignerPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.themedesigner.SpecialThemeDesignerPageObject)1