use of com.wikia.webdriver.elements.mercury.components.Header 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.components.Header 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));
}
use of com.wikia.webdriver.elements.mercury.components.Header 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));
}
use of com.wikia.webdriver.elements.mercury.components.Header 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)"));
}
use of com.wikia.webdriver.elements.mercury.components.Header in project selenium-tests by Wikia.
the class HeaderTest method mercury_header_heroImageIsSquare.
@Test(groups = "mercury_header_heroImageIsSquare")
public void mercury_header_heroImageIsSquare() {
Header header = new ArticlePage().open(MercurySubpages.INFOBOX_1).getHeader();
Assertion.assertTrue(header.isHeroImageSquare(), String.format(ELEMENT_EXPECTATION_MESSAGE_TEMPLATE, HERO_IMAGE_MESSAGE, "square"));
}
Aggregations