Search in sources :

Example 11 with ArticlePage

use of com.wikia.webdriver.elements.mercury.pages.ArticlePage in project selenium-tests by Wikia.

the class HeaderTest method mercury_header_checkElementsVisibilityWithInfoboxAndWithHeroImage.

@Test(groups = "mercury_header_checkElementsVisibilityWithInfoboxAndWithHeroImage")
public void mercury_header_checkElementsVisibilityWithInfoboxAndWithHeroImage() {
    Header header = new ArticlePage().open(MercurySubpages.INFOBOX_1).getHeader();
    Assertion.assertTrue(header.isHeaderVisible(), String.format(ELEMENT_EXPECTATION_MESSAGE_TEMPLATE, HEADER_MESSAGE, VISIBLE_MESSAGE));
    Assertion.assertTrue(header.isPageTitleVisible(), String.format(ELEMENT_EXPECTATION_MESSAGE_TEMPLATE, PAGE_TITLE_MESSAGE, VISIBLE_MESSAGE));
    Assertion.assertTrue(header.isHeroImageVisible(), String.format(ELEMENT_EXPECTATION_MESSAGE_TEMPLATE, HERO_IMAGE_MESSAGE, VISIBLE_MESSAGE));
}
Also used : Header(com.wikia.webdriver.elements.mercury.components.Header) ArticlePage(com.wikia.webdriver.elements.mercury.pages.ArticlePage) Test(org.testng.annotations.Test)

Example 12 with ArticlePage

use of com.wikia.webdriver.elements.mercury.pages.ArticlePage in project selenium-tests by Wikia.

the class HeaderTest method mercury_header_heroImageIsRectangle.

@Test(groups = "mercury_header_heroImageIsRectangle")
public void mercury_header_heroImageIsRectangle() {
    Header header = new ArticlePage().open(MercurySubpages.INFOBOX_4).getHeader();
    Assertion.assertFalse(header.isHeroImageSquare(), String.format(ELEMENT_EXPECTATION_MESSAGE_TEMPLATE, HERO_IMAGE_MESSAGE, "rectangular (not square)"));
}
Also used : Header(com.wikia.webdriver.elements.mercury.components.Header) ArticlePage(com.wikia.webdriver.elements.mercury.pages.ArticlePage) Test(org.testng.annotations.Test)

Example 13 with ArticlePage

use of com.wikia.webdriver.elements.mercury.pages.ArticlePage in project selenium-tests by Wikia.

the class LoginTests method anonCanNotLogInWithBlankUsername.

@Test(groups = "login-anonCanNotLogInWithBlankUsername")
public void anonCanNotLogInWithBlankUsername() {
    SignInPage signIn = new ArticlePage().open(MercurySubpages.MAIN_PAGE).getTopbar().openNavigation().clickOnSignInRegisterButton().navigateToSignIn();
    signIn.typePassword(Configuration.getCredentials().password10);
    assertTrue(signIn.submitButtonNotClickable());
}
Also used : ArticlePage(com.wikia.webdriver.elements.mercury.pages.ArticlePage) SignInPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.SignInPage) Test(org.testng.annotations.Test)

Example 14 with ArticlePage

use of com.wikia.webdriver.elements.mercury.pages.ArticlePage in project selenium-tests by Wikia.

the class LoginTests method anonCanNotLogInWithInvalidUsername.

@Test(groups = "login-anonCanNotLogInWithInvalidUsername")
public void anonCanNotLogInWithInvalidUsername() {
    SignInPage signIn = new ArticlePage().open(MercurySubpages.MAIN_PAGE).getTopbar().openNavigation().clickOnSignInRegisterButton().navigateToSignIn();
    signIn.login(String.valueOf(DateTime.now().getMillis()), Configuration.getCredentials().password10);
    assertTrue(signIn.getError().contains(EXPECTED_ERROR_MESSAGE));
}
Also used : ArticlePage(com.wikia.webdriver.elements.mercury.pages.ArticlePage) SignInPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.SignInPage) Test(org.testng.annotations.Test)

Example 15 with ArticlePage

use of com.wikia.webdriver.elements.mercury.pages.ArticlePage in project selenium-tests by Wikia.

the class CategoryPageTest method mercury_category_navigateToCategoryMemberPage.

@Test(groups = "mercury_category_navigateToCategoryMemberPage")
public void mercury_category_navigateToCategoryMemberPage() {
    final String categoryName = String.format("Category:%s", TestContext.getCurrentMethodName());
    final String articleContent = "Test article content";
    new ArticleContent().push(String.format("%s [[%s]]", articleContent, categoryName));
    ArticlePage article = new CategoryPage().open(categoryName).navigateToCategoryMemberPage();
    Assert.assertEquals(articleContent, article.getArticleContent());
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePage(com.wikia.webdriver.elements.mercury.pages.ArticlePage) CategoryPage(com.wikia.webdriver.elements.mercury.pages.CategoryPage) Test(org.testng.annotations.Test)

Aggregations

ArticlePage (com.wikia.webdriver.elements.mercury.pages.ArticlePage)25 Test (org.testng.annotations.Test)25 Header (com.wikia.webdriver.elements.mercury.components.Header)6 TopBar (com.wikia.webdriver.elements.mercury.components.TopBar)4 SignInPage (com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.SignInPage)4 Execute (com.wikia.webdriver.common.core.annotations.Execute)3 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)3 EditorHomePageObject (com.wikia.webdriver.elements.mercury.old.curatedcontent.EditorHomePageObject)3 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)2 JavascriptActions (com.wikia.webdriver.common.core.elemnt.JavascriptActions)2 CuratedMainPagePageObject (com.wikia.webdriver.elements.mercury.old.curatedcontent.CuratedMainPagePageObject)2 CategoryPage (com.wikia.webdriver.elements.mercury.pages.CategoryPage)2 SkinHelper (com.wikia.webdriver.common.skin.SkinHelper)1 CuratedContentPageObject (com.wikia.webdriver.elements.mercury.old.curatedcontent.CuratedContentPageObject)1 SearchResultsPage (com.wikia.webdriver.elements.mercury.pages.SearchResultsPage)1 GuidelinesPage (com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1