use of com.wikia.webdriver.elements.mercury.pages.ArticlePage 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.elements.mercury.pages.ArticlePage in project selenium-tests by Wikia.
the class SearchMobileWikiTests method mercury_search_userIsRedirectedToSearchResultsPage.
@Execute(onWikia = MercuryWikis.MERCURY_AUTOMATION_TESTING)
@InBrowser(emulator = Emulator.GOOGLE_NEXUS_5)
@Test(groups = { "mercury_search_userIsRedirectedToSearchResultsPage", "Mercury_Search_001" })
public void mercury_search_userIsRedirectedToSearchResultsPage() {
SearchResultsPage searchResults = new ArticlePage().open(MercurySubpages.MAIN_PAGE).getTopBar().openSearch().typeInSearch(SEARCH_PHRASE).clickEnterAndNavigateToSearchResults(Skin.MOBILE_WIKI);
Assertion.assertTrue(searchResults.isSearchResultsPageOpen());
}
use of com.wikia.webdriver.elements.mercury.pages.ArticlePage in project selenium-tests by Wikia.
the class TopBarTests method mercury_topbar_closeButtonAppears.
@Test(groups = "mercury_topbar_closeButtonAppears")
public void mercury_topbar_closeButtonAppears() {
TopBar topBar = new ArticlePage().open(MercurySubpages.MAIN_PAGE).getTopBar();
topBar.openSearch();
Assertion.assertTrue(topBar.isCloseIconVisible());
topBar.clickCloseButton();
Assertion.assertTrue(topBar.isSearchIconVisible());
topBar.openNavigation();
Assertion.assertTrue(topBar.isCloseIconVisible());
topBar.clickCloseButton();
Assertion.assertTrue(topBar.isHamburgerIconVisible());
}
use of com.wikia.webdriver.elements.mercury.pages.ArticlePage in project selenium-tests by Wikia.
the class HeaderTest method mercury_header_heroImageIsProperlyStyled.
@Test(groups = "mercury_header_heroImageIsProperlyStyled")
public void mercury_header_heroImageIsProperlyStyled() {
Header header = new ArticlePage().open(MercurySubpages.INFOBOX_1).getHeader();
Map<String, String> attributeExpectedValues = new HashMap<String, String>() {
{
put("background-color", "rgba(255, 255, 255, 1)");
put("background-position", "50% 50%");
put("background-repeat", "no-repeat");
}
};
for (Map.Entry<String, String> attribute : attributeExpectedValues.entrySet()) {
String attributeName = attribute.getKey();
Assertion.assertEquals(header.getHeroImageCssValue(attributeName), attribute.getValue(), String.format(INVALID_ATTRIBUTE_MESSAGE_TEMPLATE, HERO_IMAGE_MESSAGE, attributeName));
}
}
use of com.wikia.webdriver.elements.mercury.pages.ArticlePage in project selenium-tests by Wikia.
the class HeaderTest method mercury_header_checkElementsVisibilityWithoutInfobox.
@Test(groups = "mercury_header_checkElementsVisibilityWithoutInfobox")
public void mercury_header_checkElementsVisibilityWithoutInfobox() {
Header header = new ArticlePage().open(MercurySubpages.NO_INFOBOX).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.assertFalse(header.isHeroImageVisible(), String.format(ELEMENT_EXPECTATION_MESSAGE_TEMPLATE, HERO_IMAGE_MESSAGE, INVISIBLE_MESSAGE));
}
Aggregations