use of com.wikia.webdriver.common.core.api.ArticleContent 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.ArticleContent 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.ArticleContent in project selenium-tests by Wikia.
the class SocialButtonsTests method SocialButtons_001_differentLanguages.
/**
* This tests executes for 11 users with different languages. Log in, open random article, compare
* present social buttons to expected social buttons
*/
@Test(groups = { "SocialButtons", "SocialButtons_001" }, dataProvider = "SocialButtonsDataProvider")
public void SocialButtons_001_differentLanguages(String[] credentials, String[] expectedSocialNetworks) {
new ArticleContent().push(PageContent.ARTICLE_TEXT);
WikiBasePageObject base = new WikiBasePageObject();
base.loginAs(credentials[0], credentials[1], wikiURL);
new ArticlePageObject().open();
SocialButtonsComponentObject buttons = new SocialButtonsComponentObject(driver);
buttons.verifyShareButtonsPresent();
String[] currentSocialNetworks = buttons.getShareButtonTitles();
for (int i = 0; i < expectedSocialNetworks.length; i++) {
String currentSocialNetwork = currentSocialNetworks[i];
String expectedSocialNetwork = expectedSocialNetworks[i];
Assertion.assertEquals(currentSocialNetwork, expectedSocialNetwork, "Expected network not found on its position. " + "Note that the order of social buttons is also important, " + "as defined in requirements. Missing network:" + expectedSocialNetwork);
}
}
use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class AllTagsTests method prepareTest.
@BeforeMethod(alwaysRun = true)
public void prepareTest() {
driver.manage().timeouts().pageLoadTimeout(100, TimeUnit.SECONDS);
widgets = new ArrayList<>();
widgets.add(new PollsnackWidgetPageObject(driver));
widgets.add(new SoundCloudWidgetPageObject(driver));
widgets.add(new SpotifyWidgetPageObject(driver));
widgets.add(new TwitterWidgetPageObject(driver));
widgets.add(new VKWidgetPageObject(driver));
widgets.add(new WeiboWidgetPageObject(driver));
widgets.add(new GoogleFormWidgetPageObject(driver));
widgets.add(new PolldaddyWidgetPageObject(driver));
widgets.add(new PlaybuzzWidgetPageObject(driver));
widgets.add(new ApesterWidgetPageObject(driver));
String content = "";
for (WidgetPageObject widget : widgets) {
content += widget.getSingleTag();
}
ArticleContent articleContent = new ArticleContent();
articleContent.clear(ARTICLE_NAME);
articleContent.push(content, ARTICLE_NAME);
}
use of com.wikia.webdriver.common.core.api.ArticleContent 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));
}
Aggregations