Search in sources :

Example 76 with Execute

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);
}
Also used : InteractiveMapPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapPageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) InteractiveMapsPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapsPageObject) AddPinComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.AddPinComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) DontRun(com.wikia.webdriver.common.core.annotations.DontRun)

Example 77 with Execute

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;
    }
}
Also used : ArticlePageObject(com.wikia.webdriver.elements.mercury.old.ArticlePageObject) SkinHelper(com.wikia.webdriver.common.skin.SkinHelper) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Example 78 with Execute

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);
}
Also used : MessageWall(com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall) PhotoAddComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject) PhotoOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 79 with Execute

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());
}
Also used : MessageWall(com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall) MiniEditorComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 80 with Execute

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);
}
Also used : MessageWall(com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall) MessageWallAddLinkComponentObject(com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWallAddLinkComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Aggregations

Execute (com.wikia.webdriver.common.core.annotations.Execute)413 Test (org.testng.annotations.Test)402 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)146 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)72 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)68 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)58 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)55 PostEntity (com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)50 PostDetailsPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage)35 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)30 InteractiveMapsPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapsPageObject)30 PostsListPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage)26 InfoboxBuilderPage (com.wikia.webdriver.elements.mercury.pages.InfoboxBuilderPage)24 InteractiveMapPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapPageObject)23 VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)22 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)21 MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)19 ForumPage (com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumPage)18 GuidelinesPage (com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage)17 MessageWall (com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall)17