use of com.wikia.webdriver.common.core.api.TemplateContent 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());
}
use of com.wikia.webdriver.common.core.api.TemplateContent 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));
}
use of com.wikia.webdriver.common.core.api.TemplateContent 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));
}
use of com.wikia.webdriver.common.core.api.TemplateContent 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());
}
use of com.wikia.webdriver.common.core.api.TemplateContent 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));
}
Aggregations