Search in sources :

Example 6 with AddPinComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.AddPinComponentObject 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 7 with AddPinComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.AddPinComponentObject in project selenium-tests by Wikia.

the class InteractiveMapPageObject method placePinInMap.

public AddPinComponentObject placePinInMap() {
    wait.forElementVisible(mapFrame);
    jsActions.scrollElementIntoViewPort(mapFrame);
    driver.switchTo().frame(mapFrame);
    wait.forElementVisible(addPinButton);
    addPinButton.click();
    Actions actions = new Actions(driver);
    actions.moveToElement(mapImagesCollection.get(0));
    actions.click().perform();
    driver.switchTo().defaultContent();
    PageObjectLogging.log("placePinInMap", "Pin was placed in map", true);
    return new AddPinComponentObject(driver);
}
Also used : Actions(org.openqa.selenium.interactions.Actions) AddPinComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.AddPinComponentObject)

Example 8 with AddPinComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.AddPinComponentObject in project selenium-tests by Wikia.

the class PinMapTests method PinMapTests_002_VerifySuggestionsAndAssociatedImage.

@DontRun(env = { "dev", "sandbox", "preview" })
@Test(enabled = false, groups = { "PinMapTests_002", "PinMapTests", "InteractiveMaps" })
@Execute(asUser = User.USER)
public void PinMapTests_002_VerifySuggestionsAndAssociatedImage() {
    WikiBasePageObject base = new WikiBasePageObject();
    InteractiveMapsPageObject specialMap = base.openSpecialInteractiveMaps(wikiURL);
    InteractiveMapPageObject selectedMap = specialMap.clickMapWithIndex(InteractiveMapsContent.SELECTED_MAP_INDEX);
    selectedMap.verifyMapOpened();
    AddPinComponentObject pinDialog = selectedMap.placePinInMap();
    pinDialog.verifyPinTitleFieldIsDisplayed();
    pinDialog.typePinName(InteractiveMapsContent.PIN_NAME);
    String placeholderSrc = pinDialog.getAssociatedArticleImageSrc();
    pinDialog.typeAssociatedArticle(InteractiveMapsContent.ASSOCIATED_ARTICLE_NAME);
    pinDialog.clickSuggestion(0);
    pinDialog.verifyAssociatedImageIsVisible(placeholderSrc);
    pinDialog.selectPinType();
    selectedMap = pinDialog.clickSaveButton();
    selectedMap.verifyPinPopupImageIsVisible();
}
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 9 with AddPinComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.AddPinComponentObject in project selenium-tests by Wikia.

the class PinMapTests method PinMapTests_005_VerifyDeletePin.

@DontRun(env = { "dev", "sandbox", "preview" })
@Test(enabled = false, groups = { "PinMapTests_005", "PinMapTests", "InteractiveMaps" })
@Execute(asUser = User.USER)
public void PinMapTests_005_VerifyDeletePin() {
    WikiBasePageObject base = new WikiBasePageObject();
    InteractiveMapsPageObject specialMap = base.openSpecialInteractiveMaps(wikiURL);
    InteractiveMapPageObject selectedMap = specialMap.clickMapWithIndex(InteractiveMapsContent.SELECTED_MAP_INDEX);
    selectedMap.verifyMapOpened();
    selectedMap.clickOnFilterBoxTitle();
    selectedMap.clickOnPin(0);
    String pinName = selectedMap.getOpenPinName();
    selectedMap.verifyPopUpVisible();
    AddPinComponentObject editPinModal = selectedMap.clickOnEditPin();
    selectedMap = editPinModal.clickDeletePin();
    selectedMap.verifyPinNotExists(pinName);
}
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 10 with AddPinComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.AddPinComponentObject in project selenium-tests by Wikia.

the class PinMapTests method PinMapTests_007_VerifyValidExternalUrlCanBeAdded.

@DontRun(env = { "dev", "sandbox", "preview" })
@Test(enabled = false, groups = { "PinMapTests_007", "PinMapTests", "InteractiveMaps" })
@Execute(asUser = User.USER)
public void PinMapTests_007_VerifyValidExternalUrlCanBeAdded() {
    WikiBasePageObject base = new WikiBasePageObject();
    InteractiveMapsPageObject specialMaps = base.openSpecialInteractiveMaps(wikiURL);
    InteractiveMapPageObject selectedMap = specialMaps.clickMapWithIndex(InteractiveMapsContent.SELECTED_MAP_INDEX);
    selectedMap.verifyMapOpened();
    AddPinComponentObject addPinModal = selectedMap.placePinInMap();
    addPinModal.typePinName(InteractiveMapsContent.PIN_NAME);
    addPinModal.typeAssociatedArticle(InteractiveMapsContent.EXTERNAL_LINK);
    addPinModal.selectPinType();
    selectedMap = addPinModal.clickSaveButton();
    selectedMap.verifyPinTitleLink();
    selectedMap.clickOpenPinTitle();
    selectedMap.verifyUrlInNewWindow(InteractiveMapsContent.EXTERNAL_LINK);
}
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)

Aggregations

AddPinComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.AddPinComponentObject)12 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)11 Test (org.testng.annotations.Test)11 Execute (com.wikia.webdriver.common.core.annotations.Execute)9 InteractiveMapPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapPageObject)9 InteractiveMapsPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapsPageObject)9 DontRun (com.wikia.webdriver.common.core.annotations.DontRun)6 EmbedMapComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.EmbedMapComponentObject)2 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)2 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)1 CreatePinTypesComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreatePinTypesComponentObject)1 Actions (org.openqa.selenium.interactions.Actions)1