Search in sources :

Example 76 with WikiBasePageObject

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);
    }
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) SocialButtonsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.social_buttons.SocialButtonsComponentObject) Test(org.testng.annotations.Test)

Example 77 with WikiBasePageObject

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();
}
Also used : DiffPagePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.diffpage.DiffPagePageObject) HistoryPagePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.historypage.HistoryPagePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) Test(org.testng.annotations.Test)

Example 78 with WikiBasePageObject

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");
}
Also used : WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) AttachedRegisterPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.register.AttachedRegisterPage) Test(org.testng.annotations.Test)

Example 79 with WikiBasePageObject

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);
}
Also used : NavigationBar(com.wikia.webdriver.pageobjectsfactory.componentobject.global_navitagtion.NavigationBar) DetachedRegisterPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.register.DetachedRegisterPage) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) Test(org.testng.annotations.Test)

Example 80 with WikiBasePageObject

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);
}
Also used : WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) AttachedRegisterPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.register.AttachedRegisterPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Aggregations

WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)174 Test (org.testng.annotations.Test)162 Execute (com.wikia.webdriver.common.core.annotations.Execute)72 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)39 InteractiveMapsPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapsPageObject)38 InteractiveMapPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapPageObject)30 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)24 DontRun (com.wikia.webdriver.common.core.annotations.DontRun)23 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)21 BlogPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject)17 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)14 MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)13 CreateAMapComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreateAMapComponentObject)12 MessageWall (com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall)12 NavigationBar (com.wikia.webdriver.pageobjectsfactory.componentobject.global_navitagtion.NavigationBar)11 AddPinComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.AddPinComponentObject)11 CreatePinTypesComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreatePinTypesComponentObject)10 UserProfilePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject)10 SpecialCreatePage (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage)10 DetachedSignInPage (com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.DetachedSignInPage)9