Search in sources :

Example 11 with PortableInfobox

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

the class PortableInfoboxTests method infoboxImageOnCategoryPage.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_002" })
@Execute(asUser = User.USER)
public void infoboxImageOnCategoryPage() {
    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 imageName = infobox.getDataImageName();
    CategoryPageObject categoryPage = infobox.clickCategoryWithIndex(0);
    new ArticlePurger().purgeArticleAsLoggedUser();
    String categoryImageURL = categoryPage.getImageURLFromGallery(PageContent.INFOBOX_2);
    Assertion.assertTrue(categoryImageURL.contains(imageName));
}
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) ArticlePurger(com.wikia.webdriver.common.core.helpers.ArticlePurger) PortableInfobox(com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 12 with PortableInfobox

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

the class PortableInfoboxTests method verifyVisibilityOfTabberAndItsImages.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_002" })
public void verifyVisibilityOfTabberAndItsImages() {
    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);
    new ArticlePurger().purgeArticleAsAnon();
    Assertion.assertTrue(infobox.isTabberVisible().isTabberImageVisible());
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) TemplateContent(com.wikia.webdriver.common.core.api.TemplateContent) ArticlePurger(com.wikia.webdriver.common.core.helpers.ArticlePurger) PortableInfobox(com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox) Test(org.testng.annotations.Test)

Example 13 with PortableInfobox

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

the class PortableInfoboxTests method verifyHorizontalGroupFontSize.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_001" })
public void verifyHorizontalGroupFontSize() {
    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.getItemLabelsFontSize(0), infobox.getHorizontalItemLabelFontSize(0));
    Assertion.assertEquals(infobox.getItemValuesFontSize(0), infobox.getHorizontalItemValuesFontSize(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 14 with PortableInfobox

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

the class PortableInfoboxTests method verifyLightboxVisibilityAfterClickingImage.

@InBrowser(browser = Browser.FIREFOX, browserSize = "1200x720")
@Test(groups = { "PortableInfoboxTests", "PortableInfobox_002" })
public void verifyLightboxVisibilityAfterClickingImage() {
    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.clickImage().isLightboxVisible());
}
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) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 15 with PortableInfobox

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

the class PortableInfoboxTests method verifyElementsVisibility.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_001" })
public void verifyElementsVisibility() {
    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.getHeadersNumber() > 0);
    Assertion.assertTrue(infobox.isImageVisible());
    Assertion.assertTrue(infobox.isInfoboxTitleVisible());
    Assertion.assertTrue(infobox.getBoldElementsNumber() > 0);
    Assertion.assertTrue(infobox.getItalicElementsNumber() > 0);
    Assertion.assertTrue(infobox.areQuotationMarksPresented());
    Assertion.assertTrue(infobox.isReferenceElementVisible());
}
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

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