Search in sources :

Example 1 with CreateNewWikiPageObjectStep3

use of com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep3 in project selenium-tests by Wikia.

the class CreateWikiTests_loggedInUser method CreateNewWiki_003_createWikiChangedDomain.

@Test(groups = { "CNW", "CreateNewWikiLoggedIn_003" })
@Execute(asUser = User.USER_CNW)
public void CreateNewWiki_003_createWikiChangedDomain() {
    WikiBasePageObject base = new WikiBasePageObject();
    CreateNewWikiPageObjectStep1 cnw1 = base.openSpecialCreateNewWikiPage(wikiCorporateURL);
    String wikiName = cnw1.getWikiName();
    wikiDomain = cnw1.getWikiName();
    cnw1.typeInWikiName(wikiName);
    cnw1.typeInWikiDomain(wikiDomain);
    cnw1.verifyNextButtonEnabled();
    CreateNewWikiPageObjectStep2 cnw2 = cnw1.submit();
    cnw2.selectCategory(CreateWikiMessages.WIKI_CATEGORY_ID);
    CreateNewWikiPageObjectStep3 cnw3 = cnw2.submit();
    cnw3.selectThemeByName(CreateWikiMessages.WIKI_THEME);
    ArticlePageObject article = cnw3.submit();
    article.closeNewWikiCongratulationsLightBox();
    article.verifyUserLoggedIn(User.USER_CNW.getUserName());
    article.isStringInURL(wikiDomain);
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) CreateNewWikiPageObjectStep1(com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep1) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) CreateNewWikiPageObjectStep3(com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep3) CreateNewWikiPageObjectStep2(com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep2) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 2 with CreateNewWikiPageObjectStep3

use of com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep3 in project selenium-tests by Wikia.

the class CreateWikiTests_loggedInUser method CreateNewWiki_001_createDeleteWiki.

@Test(groups = { "CNW", "CreateNewWikiLoggedIn_001" })
@Execute(asUser = User.USER_CNW)
public void CreateNewWiki_001_createDeleteWiki() {
    WikiBasePageObject base = new WikiBasePageObject();
    CreateNewWikiPageObjectStep1 cnw1 = base.openSpecialCreateNewWikiPage(wikiCorporateURL);
    String wikiName = cnw1.getWikiName();
    cnw1.typeInWikiName(wikiName);
    cnw1.verifyNextButtonEnabled();
    CreateNewWikiPageObjectStep2 cnw2 = cnw1.submit();
    cnw2.selectCategory(CreateWikiMessages.WIKI_CATEGORY_ID);
    CreateNewWikiPageObjectStep3 cnw3 = cnw2.submit();
    cnw3.selectThemeByName(CreateWikiMessages.WIKI_THEME);
    ArticlePageObject article = cnw3.submit();
    article.verifyWikiTitleOnCongratualtionsLightBox(wikiName);
    article.closeNewWikiCongratulationsLightBox();
    article.verifyWikiTitleHeader(wikiName);
    DeletePageObject deletePage = article.deleteUsingDropdown();
    deletePage.submitDeletion();
    article.verifyUserLoggedIn(User.USER_CNW.getUserName());
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) CreateNewWikiPageObjectStep1(com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep1) DeletePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.actions.DeletePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) CreateNewWikiPageObjectStep3(com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep3) CreateNewWikiPageObjectStep2(com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep2) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 3 with CreateNewWikiPageObjectStep3

use of com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep3 in project selenium-tests by Wikia.

the class CreateWikiTests_loggedOutUser method loggedOutUserCanCreateNewWiki.

@Test(groups = { "CNW", "CreateNewWikiLoggedOut_001" })
public void loggedOutUserCanCreateNewWiki() {
    WikiBasePageObject base = new WikiBasePageObject();
    CreateNewWikiPageObjectStep1 cnw1 = base.openSpecialCreateNewWikiPage(wikiCorporateURL);
    String wikiName = cnw1.getWikiName();
    cnw1.typeInWikiName(wikiName);
    cnw1.verifyNextButtonEnabled();
    cnw1.clickNextToSignIn().navigateToSignIn();
    DetachedSignInPage authModal = new DetachedSignInPage();
    authModal.login(credentials.userName10, credentials.password10);
    CreateNewWikiPageObjectStep2 cnw2 = new CreateNewWikiPageObjectStep2(driver);
    cnw2.selectCategory(CreateWikiMessages.WIKI_CATEGORY_ID);
    CreateNewWikiPageObjectStep3 cnw3 = cnw2.submit();
    cnw3.selectThemeByName(CreateWikiMessages.WIKI_THEME);
    ArticlePageObject article = cnw3.submit();
    article.verifyWikiTitleOnCongratualtionsLightBox(wikiName);
    article.closeNewWikiCongratulationsLightBox();
    article.verifyWikiTitleHeader(wikiName);
    article.verifyUserLoggedIn(credentials.userName10);
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) CreateNewWikiPageObjectStep1(com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep1) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) DetachedSignInPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.DetachedSignInPage) CreateNewWikiPageObjectStep3(com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep3) CreateNewWikiPageObjectStep2(com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep2) Test(org.testng.annotations.Test)

Example 4 with CreateNewWikiPageObjectStep3

use of com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep3 in project selenium-tests by Wikia.

the class CreateWikiTests_lang method CreateNewWiki_lang_TC001.

@Test(dataProviderClass = CreateNewWikiDataProvider.class, dataProvider = "getLangs", groups = { "CreateNewWiki_lang_001", "CNW_lang_first" })
@Execute(asUser = User.USER_CNW)
public void CreateNewWiki_lang_TC001(String lang) {
    WikiBasePageObject base = new WikiBasePageObject();
    CreateNewWikiPageObjectStep1 cnw1 = base.openSpecialCreateNewWikiPage(wikiCorporateURL);
    cnw1.selectLanguage(lang);
    String wikiName = cnw1.getWikiName();
    cnw1.typeInWikiName(wikiName);
    cnw1.verifyNextButtonEnabled();
    CreateNewWikiPageObjectStep2 cnw2 = cnw1.submit();
    cnw2.selectCategory(CreateWikiMessages.WIKI_CATEGORY_ID);
    CreateNewWikiPageObjectStep3 cnw3 = cnw2.submit();
    cnw3.selectThemeByName(CreateWikiMessages.WIKI_THEME);
    ArticlePageObject article = cnw3.submit();
    article.verifyWikiTitleOnCongratualtionsLightBox(wikiName);
    article.closeNewWikiCongratulationsLightBox();
    article.verifyWikiTitleHeader(wikiName);
    article.verifyUserLoggedIn(User.USER_CNW.getUserName());
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) CreateNewWikiPageObjectStep1(com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep1) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) CreateNewWikiPageObjectStep3(com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep3) CreateNewWikiPageObjectStep2(com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep2) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 5 with CreateNewWikiPageObjectStep3

use of com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep3 in project selenium-tests by Wikia.

the class CreateWikiTests_loggedInUser method CreateNewWiki_002_createWikiForChildren.

@Test(groups = { "CNW", "CreateNewWikiLoggedIn_002" })
@Execute(asUser = User.USER_CNW)
public void CreateNewWiki_002_createWikiForChildren() {
    WikiBasePageObject base = new WikiBasePageObject();
    CreateNewWikiPageObjectStep1 cnw1 = base.openSpecialCreateNewWikiPage(wikiCorporateURL);
    String wikiName = cnw1.getWikiName();
    cnw1.typeInWikiName(wikiName);
    cnw1.verifyNextButtonEnabled();
    CreateNewWikiPageObjectStep2 cnw2 = cnw1.submit();
    cnw2.selectCategory(CreateWikiMessages.WIKI_CATEGORY_ID);
    cnw2.selectAllAgesCheckbox();
    CreateNewWikiPageObjectStep3 cnw3 = cnw2.submit();
    cnw3.selectThemeByName(CreateWikiMessages.WIKI_THEME);
    ArticlePageObject article = cnw3.submit();
    article.closeNewWikiCongratulationsLightBox();
    article.verifyUserLoggedIn(User.USER_CNW.getUserName());
    Assertion.assertTrue(WikiaProperties.isWikiForChildren(driver), "Wiki is not for children");
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) CreateNewWikiPageObjectStep1(com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep1) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) CreateNewWikiPageObjectStep3(com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep3) CreateNewWikiPageObjectStep2(com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep2) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Aggregations

WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)5 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)5 CreateNewWikiPageObjectStep1 (com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep1)5 CreateNewWikiPageObjectStep2 (com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep2)5 CreateNewWikiPageObjectStep3 (com.wikia.webdriver.pageobjectsfactory.pageobject.createnewwiki.CreateNewWikiPageObjectStep3)5 Test (org.testng.annotations.Test)5 Execute (com.wikia.webdriver.common.core.annotations.Execute)4 DeletePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.actions.DeletePageObject)1 DetachedSignInPage (com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.DetachedSignInPage)1