@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); }
@Test( enabled = false, groups = {"PinMapTests_009", "PinMapTests", "InteractiveMaps"}) @Execute(asUser = User.USER) public void PinMapTests_009_VerifyArticlePlaceholder() { WikiBasePageObject base = new WikiBasePageObject(); InteractiveMapsPageObject specialMaps = base.openSpecialInteractiveMaps(wikiURL); InteractiveMapPageObject selectedMap = specialMaps.clickMapWithIndex(InteractiveMapsContent.SELECTED_MAP_INDEX); selectedMap.verifyMapOpened(); AddPinComponentObject addPinModal = selectedMap.placePinInMap(); addPinModal.verifyAssociatedArticlePlaceholder(); }
@Test( enabled = false, groups = {"PinMapTests_001", "PinMapTests", "InteractiveMaps"}) @Execute(asUser = User.USER) public void PinMapTests_001_VerifyPinModalContent() { 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.verifyAssociatedArticleFieldIsDisplayed(); pinDialog.verifyAssociatedArticleImagePlaceholderIsDisplayed(); pinDialog.verifyPinCategorySelectorIsDisplayed(); pinDialog.verifyDescriptionFieldIsDisplayed(); selectedMap = pinDialog.clickCancelButton(); }
@Test( enabled = false, groups = {"PinMapTests_003", "PinMapTests", "InteractiveMaps"}) @Execute(asUser = User.USER) public void PinMapTests_003_VerifyPinCreationErrors() { WikiBasePageObject base = new WikiBasePageObject(); InteractiveMapsPageObject specialMap = base.openSpecialInteractiveMaps(wikiURL); InteractiveMapPageObject selectedMap = specialMap.clickMapWithIndex(InteractiveMapsContent.SELECTED_MAP_INDEX); selectedMap.verifyMapOpened(); AddPinComponentObject addPinModal = selectedMap.placePinInMap(); addPinModal.clickSaveButton(); addPinModal.verifyErrorExists(); addPinModal.typePinName(InteractiveMapsContent.PIN_DESCRIPTION); addPinModal.clickSaveButton(); addPinModal.verifyErrorExists(); addPinModal.selectPinType(); addPinModal.clickSaveButton(); addPinModal.verifyErrorExists(); }
@Test( enabled = false, groups = {"PinMapTests_008", "PinMapTests", "InteractiveMaps"}) @DontRun(env = {"dev", "sandbox", "preview"}) @Execute(asUser = User.USER) public void PinMapTests_008_VerifyErrorMessageWhenAssociatedArticleNotExist() { 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.ARTICLE_WHICH_DOES_NOT_EXIST); addPinModal.selectPinType(); addPinModal.clickSaveButton(); addPinModal.verifyErrorContent( InteractiveMapsContent.ARTICLE_NOT_EXIST_ERROR.replace( "%articlename%", InteractiveMapsContent.ARTICLE_WHICH_DOES_NOT_EXIST)); }
@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); }
@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(); }