Search in sources :

Example 6 with RelatedIssue

use of com.wikia.webdriver.common.core.annotations.RelatedIssue in project selenium-tests by Wikia.

the class BlockedUserMapTests method BlockedUserMapTests_002_VerifyUserCannotAddPin.

@RelatedIssue(issueID = "", comment = "Functionality is being depracated NO need to test manually")
@DontRun(env = { "dev", "sandbox", "preview" })
@Test(groups = { "BlockedUserMapTests_002", "BlockedUserMapTests", "InteractiveMaps" })
public void BlockedUserMapTests_002_VerifyUserCannotAddPin() {
    WikiBasePageObject base = new WikiBasePageObject();
    base.loginAs(credentials.userNameBlockedAccount, credentials.passwordBlockedAccount, wikiURL);
    InteractiveMapsPageObject specialMaps = base.openSpecialInteractiveMaps(wikiURL);
    InteractiveMapPageObject selectedMap = specialMaps.clickMapWithIndex(InteractiveMapsContent.SELECTED_MAP_INDEX);
    AddPinComponentObject addPinModal = selectedMap.placePinInMap();
    addPinModal.typePinName(InteractiveMapsContent.PIN_NAME);
    addPinModal.typePinDescription(InteractiveMapsContent.PIN_DESCRIPTION);
    addPinModal.selectPinType();
    addPinModal.clickSaveButton();
    addPinModal.verifyErrorExists();
}
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) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue) DontRun(com.wikia.webdriver.common.core.annotations.DontRun)

Example 7 with RelatedIssue

use of com.wikia.webdriver.common.core.annotations.RelatedIssue in project selenium-tests by Wikia.

the class FilterBoxMapTests method FilterBoxMapTests_004_VerifyClickAllCategoriesCheckAllPinTypes.

@Test(groups = { "FilterBoxMapTests_004", "FilterBoxMapTests", "InteractiveMaps" })
@DontRun(env = { "dev", "sandbox", "preview" })
@Execute(asUser = User.USER)
@RelatedIssue(issueID = "SUS-140", comment = "test is unstable, check locally or test manually")
public void FilterBoxMapTests_004_VerifyClickAllCategoriesCheckAllPinTypes() {
    WikiBasePageObject base = new WikiBasePageObject();
    InteractiveMapsPageObject specialMap = base.openSpecialInteractiveMaps(wikiURL);
    InteractiveMapPageObject selectedMap = specialMap.clickMapWithIndex(InteractiveMapsContent.SELECTED_MAP_INDEX);
    selectedMap.verifyMapOpened();
    selectedMap.clickOnSingleEnabledCategory();
    selectedMap.verifyAllPinTypesIsUncheck();
    selectedMap.clickOnAllPinTypes();
    selectedMap.verifyAllPinTypesIsCheck();
    selectedMap.verifyPinTypesAreCheck();
}
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) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue) DontRun(com.wikia.webdriver.common.core.annotations.DontRun)

Example 8 with RelatedIssue

use of com.wikia.webdriver.common.core.annotations.RelatedIssue in project selenium-tests by Wikia.

the class MapFlowTests method MapFlowTests_002_CreateCustomMapWithExistingTemplate.

@DontRun(env = { "dev", "sandbox", "preview" })
@Test(groups = { "MapFlowTests_002", "MapFlowTests", "InteractiveMaps" })
@Execute(asUser = User.USER)
@RelatedIssue(issueID = "MAIN-5732", comment = "Not possible to test manually in preview environment")
public void MapFlowTests_002_CreateCustomMapWithExistingTemplate() {
    WikiBasePageObject base = new WikiBasePageObject();
    InteractiveMapsPageObject specialMap = base.openSpecialInteractiveMaps(wikiURL);
    CreateAMapComponentObject map = specialMap.clickCreateAMap();
    CreateACustomMapComponentObject customMap = map.clickCustomMap();
    String selectedImageName = customMap.getSelectedTemplateImageName(InteractiveMapsContent.SELECTED_TEMPLATE_INDEX);
    TemplateComponentObject template = customMap.selectTemplate(InteractiveMapsContent.SELECTED_TEMPLATE_INDEX);
    template.verifyTemplateImage(selectedImageName);
    template.typeMapName(InteractiveMapsContent.MAP_NAME);
    CreatePinTypesComponentObject pinDialog = template.clickNext();
    pinDialog.typePinTypeTitle(InteractiveMapsContent.PIN_TYPE_NAME, InteractiveMapsContent.PIN_TYPE_INDEX);
    InteractiveMapPageObject createdMap = pinDialog.clickSave();
    createdMap.verifyCreatedMapTitle(InteractiveMapsContent.MAP_NAME);
    createdMap.verifyMapOpened();
    createdMap.verifyCreatedPinTypesForNewMap();
    createdMap.verifyControlButtonsAreVisible();
}
Also used : InteractiveMapPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapPageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) CreateACustomMapComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreateACustomMapComponentObject) CreateAMapComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreateAMapComponentObject) TemplateComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.TemplateComponentObject) CreatePinTypesComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreatePinTypesComponentObject) InteractiveMapsPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapsPageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue) DontRun(com.wikia.webdriver.common.core.annotations.DontRun)

Example 9 with RelatedIssue

use of com.wikia.webdriver.common.core.annotations.RelatedIssue 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 10 with RelatedIssue

use of com.wikia.webdriver.common.core.annotations.RelatedIssue in project selenium-tests by Wikia.

the class CommentsTests method mercury_comments_containsCounterNextButtonAndPreviousButton.

@Test(groups = "mercury_comments_containsCounterNextButtonAndPreviousButton", enabled = false)
@RelatedIssue(issueID = "DAT-4316")
public void mercury_comments_containsCounterNextButtonAndPreviousButton() {
    init();
    comments.clickCommentsHeader();
    comments.waitForCommentsToLoad();
    int numberOfComments = comments.getNumberOfCommentsFromHeader();
    Assertion.assertTrue((numberOfComments - comments.getNumberOfRepliesOnThatPage()) > 25, "There is less than 25 on that page");
    Assertion.assertTrue(comments.isNextCommentPageButtonDisplayed(), "Next page button isn't displayed");
    PageObjectLogging.log("Next page button", "is displayed", true);
    while (comments.isNextCommentPageButtonDisplayed()) {
        numberOfComments -= comments.getNumberOfAllCommentsOnPage();
        comments.clickNextCommentPageButton();
        new Wait(driver).forXMilliseconds(2500);
    }
    numberOfComments -= comments.getNumberOfAllCommentsOnPage();
    boolean result = numberOfComments == 0;
    PageObjectLogging.log("Comments counter", "is correct", "There are " + numberOfComments + " untracked comments", result);
    Assertion.assertTrue(comments.isPreviousCommentPageButtonDisplayed(), "Previous page button isn't displayed");
    PageObjectLogging.log("Previous page button", "is displayed", true);
    comments.clickPreviousCommentPageButton();
    new Wait(driver).forXMilliseconds(2500);
    result = !comments.isPreviousCommentPageButtonDisplayed();
    PageObjectLogging.log("Previous page button", "is not displayed", "is displayed", result);
}
Also used : Wait(com.wikia.webdriver.common.core.elemnt.Wait) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Aggregations

RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)56 Test (org.testng.annotations.Test)56 Execute (com.wikia.webdriver.common.core.annotations.Execute)30 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)14 InteractiveMapsPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapsPageObject)12 VisualEditorPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject)12 DontRun (com.wikia.webdriver.common.core.annotations.DontRun)11 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)11 InteractiveMapPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapPageObject)11 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)7 Notification (com.wikia.webdriver.elements.oasis.components.notifications.Notification)7 IntraWikiSearchPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.search.intrawikisearch.IntraWikiSearchPageObject)7 CreatePinTypesComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreatePinTypesComponentObject)6 VisualEditorSaveChangesDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog)6 YoutubeVideo (com.wikia.webdriver.common.core.video.YoutubeVideo)5 MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)5 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)5 DeletePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.actions.DeletePageObject)5 SpecialVideosPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVideosPageObject)5 FilePage (com.wikia.webdriver.pageobjectsfactory.pageobject.special.filepage.FilePage)5