Search in sources :

Example 1 with TemplateContent

use of com.wikia.webdriver.common.core.api.TemplateContent 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 2 with TemplateContent

use of com.wikia.webdriver.common.core.api.TemplateContent 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 3 with TemplateContent

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

the class PortableInfoboxTests method verifyOrderedAndUnorderedListFontSizes.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_001" })
public void verifyOrderedAndUnorderedListFontSizes() {
    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.assertEquals(infobox.getItemValuesFontSize(1), infobox.getOrderedElementFontSize(1));
    Assertion.assertEquals(infobox.getItemValuesFontSize(1), infobox.getUnorderedElementFontSize(1));
}
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 4 with TemplateContent

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

the class PortableInfoboxTests method verifyGroupHeadersPadding.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_003" })
public void verifyGroupHeadersPadding() {
    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.isHeaderPaddingLeftAndRightEqual(1));
}
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 5 with TemplateContent

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

the class PortableInfoboxTests method infoboxInfoboxNavigationElements.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_001" })
public void infoboxInfoboxNavigationElements() {
    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.isInfoboxNavigationElementVisible(0));
    Assertion.assertTrue(infobox.getInternalNavigationLinksNumber() > 0);
    Assertion.assertTrue(infobox.getExternalNavigationLinksNumber() > 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)

Aggregations

ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)15 TemplateContent (com.wikia.webdriver.common.core.api.TemplateContent)15 Test (org.testng.annotations.Test)15 PortableInfobox (com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox)14 ArticlePurger (com.wikia.webdriver.common.core.helpers.ArticlePurger)3 Execute (com.wikia.webdriver.common.core.annotations.Execute)2 CategoryPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.category.CategoryPageObject)2 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)1 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)1 SpecialWhatLinksHerePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialWhatLinksHerePageObject)1 SpecialThemeDesignerPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.themedesigner.SpecialThemeDesignerPageObject)1