use of com.wikia.webdriver.common.core.annotations.Execute in project selenium-tests by Wikia.
the class PinMapTests method PinMapTests_006_VerifyChangePinData.
@DontRun(env = { "dev", "sandbox", "preview" })
@Test(enabled = false, groups = { "PinMapTests_006", "PinMapTests", "InteractiveMaps", "PinMapTests_004" })
@Execute(asUser = User.USER)
public void PinMapTests_006_VerifyChangePinData() {
WikiBasePageObject base = new WikiBasePageObject();
InteractiveMapsPageObject specialMap = base.openSpecialInteractiveMaps(wikiURL);
InteractiveMapPageObject selectedMap = specialMap.clickMapWithIndex(InteractiveMapsContent.SELECTED_MAP_INDEX);
selectedMap.verifyMapOpened();
selectedMap.clickOnFilterBoxTitle();
AddPinComponentObject pinModal = selectedMap.placePinInMap();
String pinTitle = base.getTimeStamp();
String pinDescription = base.getTimeStamp() + base.getTimeStamp();
pinModal.typePinName(pinTitle);
pinModal.selectPinType();
pinModal.typePinDescription(pinDescription);
selectedMap = pinModal.clickSaveButton();
pinModal = selectedMap.clickOnEditPin();
pinModal.clearPinName();
pinModal.typePinName(base.getTimeStamp() + base.getTimeStamp());
pinModal.clearPinDescription();
pinModal.typePinDescription(base.getTimeStamp());
selectedMap = pinModal.clickSaveButton();
selectedMap.verifyPinDataWasChanged(pinTitle, pinDescription);
selectedMap.refreshPage();
selectedMap.clickOnPin(0);
}
use of com.wikia.webdriver.common.core.annotations.Execute in project selenium-tests by Wikia.
the class MainPageTests method MercuryCuratedMainPageTest_001_CheckElementsVisibilityElementsOrderAndRootPath.
@Test(groups = "MercuryCuratedMainPageTest_001")
@Execute(onWikia = MercuryWikis.MERCURY_CC)
@RelatedIssue(issueID = "XW-1739", comment = "if this tests fails just edit any article on mercurycc.wikia.com and wait 24h")
public void MercuryCuratedMainPageTest_001_CheckElementsVisibilityElementsOrderAndRootPath() {
init();
navigate.toPage(MercurySubpages.CC_MAIN_PAGE);
Assertion.assertTrue(new SkinHelper(driver).isSkin(Skin.MOBILE_WIKI));
new ArticlePageObject(driver).isFooterVisible();
boolean result = driver.getCurrentUrl().contains(ROOT_PATH);
PageObjectLogging.log("Current URL", "is set on " + ROOT_PATH, "is not set on " + ROOT_PATH, result);
result = curatedMainPage.isMobileTopLeaderboardVisible();
PageObjectLogging.log(PageElements.TOP_LEADERBOARD.name, MercuryMessages.VISIBLE_MSG, MercuryMessages.INVISIBLE_MSG, result);
result = curatedMainPage.isArticleTitleVisible();
PageObjectLogging.log(PageElements.ARTICLE_TITLE.name, MercuryMessages.VISIBLE_MSG, MercuryMessages.INVISIBLE_MSG, result);
result = curatedMainPage.isWikiaStatsContainerVisible();
PageObjectLogging.log(PageElements.WIKIA_STATS.name, MercuryMessages.VISIBLE_MSG, MercuryMessages.INVISIBLE_MSG, result);
Assertion.assertTrue(curatedMainPage.isMainPagePadSlotInDOM());
result = curatedMainPage.isFeaturedContentVisible();
PageObjectLogging.log(PageElements.FEATURED_CONTENT.name, MercuryMessages.VISIBLE_MSG, MercuryMessages.INVISIBLE_MSG, result);
result = curatedMainPage.isCuratedContentVisible();
PageObjectLogging.log(PageElements.CURATED_CONTENT.name, MercuryMessages.VISIBLE_MSG, MercuryMessages.INVISIBLE_MSG, result);
result = curatedMainPage.isMobileInContentVisible();
PageObjectLogging.log(PageElements.IN_CONTENT.name, MercuryMessages.VISIBLE_MSG, MercuryMessages.INVISIBLE_MSG, result);
result = curatedMainPage.isTrendingArticlesVisible();
PageObjectLogging.log(PageElements.TRENDING_ARTICLES.name, MercuryMessages.VISIBLE_MSG, MercuryMessages.INVISIBLE_MSG, result);
result = curatedMainPage.isMobilePrefooterVisible();
PageObjectLogging.log(PageElements.PREFOOTER.name, MercuryMessages.VISIBLE_MSG, MercuryMessages.INVISIBLE_MSG, result);
result = curatedMainPage.isTrendingVideosVisible();
PageObjectLogging.log(PageElements.TRENDING_VIDEOS.name, MercuryMessages.VISIBLE_MSG, MercuryMessages.INVISIBLE_MSG, result);
int lastPosition = 0;
String lastElement = "top";
for (PageElements element : PageElements.values()) {
int newPosition = curatedMainPage.getElementOffsetTop(element.className);
result = lastPosition <= newPosition;
PageObjectLogging.log(element.name, "is after " + lastElement, "is not after " + lastElement, result);
lastPosition = newPosition;
lastElement = element.name;
}
}
use of com.wikia.webdriver.common.core.annotations.Execute in project selenium-tests by Wikia.
the class MessageWallFeaturesTests method userCanWriteMessageWithImage.
@Test(groups = { "MessageWallFeatures_004", "MessageWallFeatures", "MessageWallTests" })
@Execute(asUser = User.USER_MESSAGE_WALL)
public void userCanWriteMessageWithImage() {
MessageWall wall = new MessageWall(driver).open(User.USER_MESSAGE_WALL.getUserName());
String title = PageContent.MESSAGE_WALL_TITLE_PREFIX + wall.getTimeStamp();
wall.setTitle(title);
wall.triggerMessageArea();
PhotoAddComponentObject photoAddPhoto = wall.clickImageButton();
PhotoOptionsComponentObject photoOptions = photoAddPhoto.addPhotoFromWiki("image", 1);
photoOptions.setCaption(PageContent.CAPTION);
photoOptions.clickAddPhoto();
wall.submit();
wall.verifyImageAdded(title);
}
use of com.wikia.webdriver.common.core.annotations.Execute in project selenium-tests by Wikia.
the class MessageWallFeaturesTests method userCanWriteMessageInItallic.
@Test(groups = { "MessageWallFeatures_003", "MessageWallFeatures", "MessageWallTests" })
@Execute(asUser = User.USER_MESSAGE_WALL)
public void userCanWriteMessageInItallic() {
MessageWall wall = new MessageWall(driver).open(User.USER_MESSAGE_WALL.getUserName());
String message = PageContent.MESSAGE_WALL_MESSAGE_PREFIX + wall.getTimeStamp();
String title = PageContent.MESSAGE_WALL_TITLE_PREFIX + wall.getTimeStamp();
wall.setTitle(title);
MiniEditorComponentObject mini = wall.triggerMessageArea();
wall.clickItalicButton();
mini.switchAndWrite(message);
wall.submit();
wall.verifyMessageItalicText(title, message, User.USER_MESSAGE_WALL.getUserName());
}
use of com.wikia.webdriver.common.core.annotations.Execute in project selenium-tests by Wikia.
the class MessageWallFeaturesTests method userCanWriteMessageWithInternalLink.
@Test(groups = { "MessageWallFeatures_005", "MessageWallFeatures", "MessageWallTests" })
@Execute(asUser = User.USER_MESSAGE_WALL)
public void userCanWriteMessageWithInternalLink() {
MessageWall wall = new MessageWall(driver).open(User.USER_MESSAGE_WALL.getUserName());
String title = PageContent.MESSAGE_WALL_TITLE_PREFIX + wall.getTimeStamp();
wall.setTitle(title);
wall.triggerMessageArea();
MessageWallAddLinkComponentObject addLink = wall.clickLinkButton();
addLink.addInternalLink(PageContent.REDIRECT_LINK, PageContent.TEXT_LINK);
wall.submit();
wall.verifyInternalLink(title, PageContent.REDIRECT_LINK, PageContent.TEXT_LINK, wikiURL);
}
Aggregations