Search in sources :

Example 6 with CategoryPage

use of com.wikia.webdriver.elements.mercury.pages.CategoryPage 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)

Example 7 with CategoryPage

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

the class CategoryPageTest method mercury_category_navigateToCategoryPageWithArticleAndWithoutMembersFromUrl.

@Test(groups = "mercury_category_navigateToCategoryPageWithArticleAndWithoutMembersFromUrl")
public void mercury_category_navigateToCategoryPageWithArticleAndWithoutMembersFromUrl() {
    final String categoryName = String.format("Category:%s", TestContext.getCurrentMethodName());
    new ArticleContent().push("some irrelevant content of category article", categoryName);
    CategoryPage category = new CategoryPage().open(categoryName);
    Assert.assertEquals(404, category.getURLStatus(category.getCurrentUrl()));
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) CategoryPage(com.wikia.webdriver.elements.mercury.pages.CategoryPage) Test(org.testng.annotations.Test)

Aggregations

CategoryPage (com.wikia.webdriver.elements.mercury.pages.CategoryPage)7 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)6 Test (org.testng.annotations.Test)6 ArticlePage (com.wikia.webdriver.elements.mercury.pages.ArticlePage)2 WebElement (org.openqa.selenium.WebElement)1