use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject 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.pageobjectsfactory.pageobject.WikiBasePageObject in project selenium-tests by Wikia.
the class FilePageTests method filePage003_diffPage.
/**
* Verify if a diff table is present on a diff page. Note that not all diff pages have diff tables
* but the one specified does.
*/
@Test(groups = { "FilePage", "filePage003_diffPage", "Media" })
public void filePage003_diffPage() {
WikiBasePageObject base = new WikiBasePageObject();
HistoryPagePageObject historyPage = base.openFileHistoryPage(URLsContent.FILENAME_001, wikiURL);
DiffPagePageObject diffPage = historyPage.goToDiffPageFromHistoryPage();
diffPage.verifyDiffTablePresent();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject in project selenium-tests by Wikia.
the class SignUpTests method anonCanNotSignUpIfTheUsernameAlreadyExists.
@Test(groups = "SignUp_anonCanNotSignUpIfTheUsernameAlreadyExists")
public void anonCanNotSignUpIfTheUsernameAlreadyExists() {
WikiBasePageObject base = new WikiBasePageObject();
base.openSpecialUserSignUpPage(wikiURL);
AttachedRegisterPage register = new AttachedRegisterPage();
String password = "Pass" + register.getTimeStamp();
String email = credentials.emailQaart2;
register.typeEmailAddress(email);
register.typeUsername(credentials.userName);
register.typePassword(password);
register.typeBirthdate(PageContent.WIKI_SIGN_UP_BIRTHMONTH, PageContent.WIKI_SIGN_UP_BIRTHDAY, PageContent.WIKI_SIGN_UP_BIRTHYEAR);
register.submit();
assertStringContains(register.getError(), "Username is taken");
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject in project selenium-tests by Wikia.
the class SignUpTests method anonCanSignUpOnNewBaseAuthPageFromGlobalNav.
@Test(groups = "SignUp_anonCanSignUpOnNewBaseAuthPageFromGlobalNav")
public void anonCanSignUpOnNewBaseAuthPageFromGlobalNav() {
WikiBasePageObject base = new WikiBasePageObject();
NavigationBar registerLink = new NavigationBar(driver);
DetachedRegisterPage register = new DetachedRegisterPage(registerLink.clickOnRegister());
String userName = "User" + register.getTimeStamp();
String password = "Pass" + register.getTimeStamp();
String email = credentials.emailQaart2;
register.typeEmailAddress(email);
register.typeUsername(userName);
register.typePassword(password);
register.typeBirthdate(PageContent.WIKI_SIGN_UP_BIRTHMONTH, PageContent.WIKI_SIGN_UP_BIRTHDAY, PageContent.WIKI_SIGN_UP_BIRTHYEAR);
register.submit();
base.verifyUserLoggedIn(userName);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject in project selenium-tests by Wikia.
the class SignUpTests method anonCanSignUpWithUsernameContainingJapaneseSpecialCharacters.
@Test(groups = "SignUp_anonCanSignUpWithUsernameContainingJapaneseSpecialCharacters")
@Execute(onWikia = "ja.ja-test")
public void anonCanSignUpWithUsernameContainingJapaneseSpecialCharacters() {
WikiBasePageObject base = new WikiBasePageObject();
AttachedRegisterPage signUp = base.openSpecialUserSignUpPage(wikiURL);
base.disableCaptcha();
String userName = "ユーザー" + signUp.getTimeStamp();
String password = "パス" + signUp.getTimeStamp();
String email = credentials.emailQaart2;
AttachedRegisterPage register = new AttachedRegisterPage();
register.typeEmailAddress(email);
register.typeUsername(userName);
register.typePassword(password);
register.typeBirthdate(PageContent.WIKI_SIGN_UP_BIRTHMONTH, PageContent.WIKI_SIGN_UP_BIRTHDAY, PageContent.WIKI_SIGN_UP_BIRTHYEAR);
register.submit();
base.verifyUserLoggedIn(userName);
}
Aggregations