use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class CategoryPageTest method mercury_category_navigateToCategoryPageWithArticleAndWithMembersFromUrl.
@Test(groups = "mercury_category_navigateToCategoryPageWithArticleAndWithMembersFromUrl")
public void mercury_category_navigateToCategoryPageWithArticleAndWithMembersFromUrl() {
final String categoryName = String.format("Category:%s", TestContext.getCurrentMethodName());
ArticleContent articleContent = new ArticleContent();
articleContent.push("some irrelevant content of category article", categoryName);
articleContent.push(String.format("[[%s]]", categoryName), String.format("A-%s", categoryName));
articleContent.push(String.format("[[%s]]", categoryName), String.format("B-%s", categoryName));
articleContent.push(String.format("[[%s]]", categoryName), String.format("C-%s", categoryName));
CategoryPage category = new CategoryPage().open(categoryName);
Assert.assertFalse("".equals(category.getArticleContent()));
Assert.assertTrue(category.categoryMembersContainerIsVisible());
Assert.assertTrue(category.hasCategoryMembers());
}
use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class CategoryPageTest method mercury_category_testPagination.
@Test(groups = "mercury_category_testPagination")
public void mercury_category_testPagination() throws InterruptedException {
// This test assumes that there are more than 200 articles created and with category like one below.
// Staging env should have fixture of this articles to create them everytime it is rebuilded
final String categoryName = String.format("Category:%s", TestContext.getCurrentMethodName());
ArticleContent articleContent = new ArticleContent();
articleContent.push("some irrelevant content of category article", categoryName);
// execute this loop only once on staging and then create fixture
// for (int i = 0; i < 300; ++i) {
// articleContent.push(String.format("aa [[%s]]", categoryName), String.format("%d-%s", i, categoryName));
// }
CategoryPage categoryPage = new CategoryPage().open(categoryName);
Assert.assertTrue(categoryPage.hasCategoryMembers());
Assert.assertTrue(categoryPage.nextButtonIsVisible());
categoryPage.clickNextButton();
Assert.assertTrue(categoryPage.hasCategoryMembers());
Assert.assertTrue(categoryPage.previousButtonIsVisible());
// Wait for scroll animation to be finished.
// categoryPage.previousButtonIsVisible() scrolls to element but jQuery animation scrolls back to somewhere in the middle of a page.
Thread.sleep(1000);
categoryPage.clickPreviousButton();
Assert.assertTrue(categoryPage.hasCategoryMembers());
Assert.assertTrue(categoryPage.nextButtonIsVisible());
}
use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class CategoryPageTest method mercury_category_navigateToCategoryPageFromLinkInArticle.
@Test(groups = "mercury_category_navigateToCategoryPageWithArticleAndWithoutMembersFromLink")
public void mercury_category_navigateToCategoryPageFromLinkInArticle() {
final String categoryName = String.format("Category:%s", TestContext.getCurrentMethodName());
new ArticleContent().push(String.format("[[%s]]", categoryName));
CategoryPage categoryPage = new ArticlePage().open().openCategoryPageFromCategoriesDropdown();
Assert.assertTrue(categoryPage.hasCategoryMembers());
}
use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class VideosModuleTests method VideosModuleTest_004.
/**
* Checks if the Videos Module is not showing any duplicate videos
*/
@Test(groups = { "VideosModule", "VideosModuleTest_004", "Media" })
public void VideosModuleTest_004() {
new ArticleContent().push(PageContent.ARTICLE_TEXT);
new ArticlePageObject().open();
new VideosModuleComponentObject(driver).verifyNoDuplicates();
}
use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.
the class CategoryPageTest method mercury_category_navigateToCategoryPageWithoutArticleAndWithMembersFromUrl.
@Test(groups = "mercury_category_navigateToCategoryPageWithoutArticleAndWithMembersFromUrl")
public void mercury_category_navigateToCategoryPageWithoutArticleAndWithMembersFromUrl() {
final String categoryName = String.format("Category:%s", TestContext.getCurrentMethodName());
ArticleContent articleContent = new ArticleContent();
articleContent.push(String.format("[[%s]]", categoryName), String.format("A-%s", categoryName));
articleContent.push(String.format("[[%s]]", categoryName), String.format("B-%s", categoryName));
articleContent.push(String.format("[[%s]]", categoryName), String.format("C-%s", categoryName));
CategoryPage category = new CategoryPage().open(categoryName);
Assert.assertEquals("", category.getArticleContent());
Assert.assertTrue(category.categoryMembersContainerIsVisible());
Assert.assertTrue(category.hasCategoryMembers());
}
Aggregations