use of com.wikia.webdriver.pageobjectsfactory.componentobject.social_buttons.SocialButtonsComponentObject 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);
}
}
Aggregations