Search in sources :

Example 1 with CategoryPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.category.CategoryPageObject 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 2 with CategoryPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.category.CategoryPageObject 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)

Aggregations

ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)2 TemplateContent (com.wikia.webdriver.common.core.api.TemplateContent)2 PortableInfobox (com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox)2 CategoryPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.category.CategoryPageObject)2 Test (org.testng.annotations.Test)2 Execute (com.wikia.webdriver.common.core.annotations.Execute)1 ArticlePurger (com.wikia.webdriver.common.core.helpers.ArticlePurger)1