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);
}
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);
}
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();
}
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);
}
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);
}
Aggregations