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());
}
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));
}
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));
}
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());
}
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());
}
Aggregations