Search in sources :

Example 1 with DeleteAMapComponentObject

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

the class DeleteAndRestoreMapTests method DeleteAndRestoreMapTests_002_DeleteMapByNotOwner.

@Test(groups = { "DeleteAndRestoreMapTests_002", "DeleteAndRestoreMapTests", "InteractiveMaps" })
@Execute(asUser = User.USER_2)
public void DeleteAndRestoreMapTests_002_DeleteMapByNotOwner() {
    WikiBasePageObject base = new WikiBasePageObject();
    InteractiveMapPageObject selectedMap = base.openInteractiveMapById(wikiURL, InteractiveMapsContent.MAP_TO_DELETE_AND_RESTORE[1]);
    DeleteAMapComponentObject deleteMapModal = selectedMap.deleteMap();
    deleteMapModal.clickDeleteMap();
    Assertion.assertEquals(deleteMapModal.getDeleteMapError(), InteractiveMapsContent.MAP_DELETE_ERROR);
}
Also used : DeleteAMapComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.DeleteAMapComponentObject) InteractiveMapPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapPageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 2 with DeleteAMapComponentObject

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

the class VEAddMapTests method VEAddMapTests_003_InsertMapFromZeroState.

@RelatedIssue(issueID = "WW-108")
@Test(enabled = false, groups = { "VEAddMapTests_003", "VEAddMapFromZeroState" })
@Execute(asUser = User.USER_12, onWikia = URLsContent.VE_DISABLED_WIKI)
public void VEAddMapTests_003_InsertMapFromZeroState() {
    articleName = PageContent.ARTICLE_NAME_PREFIX + DateTime.now().getMillis();
    VisualEditorPageObject ve = new VisualEditorPageObject().openVEOnArticle(wikiURL, articleName);
    ve.verifyVEToolBarPresent();
    ve.verifyEditorSurfacePresent();
    VisualEditorAddMapDialog mapDialog = (VisualEditorAddMapDialog) ve.openDialogFromMenu(InsertDialog.MAP);
    CreateAMapComponentObject map = mapDialog.clickCreateAMapButton();
    CreateRealMapComponentObject realMap = map.clickRealMap();
    realMap.verifyRealMapPreviewImage();
    realMap.typeMapName(InteractiveMapsContent.MAP_NAME);
    CreatePinTypesComponentObject pinDialog = realMap.clickNext();
    pinDialog.typePinTypeTitle(InteractiveMapsContent.PIN_TYPE_NAME, InteractiveMapsContent.PIN_TYPE_INDEX);
    createdMap = pinDialog.clickSave();
    createdMap.verifyMapOpened();
    mapID = createdMap.getEmbedMapID();
    createdMap.verifyControlButtonsAreVisible();
    ve.openInteractiveMapById(wikiURL, Integer.parseInt(mapID));
    DeleteAMapComponentObject deleteMapModal = createdMap.deleteMap();
    InteractiveMapsPageObject specialMaps = deleteMapModal.deleteMap();
    specialMaps.verifyEmptyState();
}
Also used : DeleteAMapComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.DeleteAMapComponentObject) CreateRealMapComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreateRealMapComponentObject) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) VisualEditorAddMapDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorAddMapDialog) CreateAMapComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreateAMapComponentObject) 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)

Aggregations

Execute (com.wikia.webdriver.common.core.annotations.Execute)2 DeleteAMapComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.DeleteAMapComponentObject)2 Test (org.testng.annotations.Test)2 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)1 CreateAMapComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreateAMapComponentObject)1 CreatePinTypesComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreatePinTypesComponentObject)1 CreateRealMapComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreateRealMapComponentObject)1 VisualEditorAddMapDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorAddMapDialog)1 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)1 InteractiveMapPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapPageObject)1 InteractiveMapsPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapsPageObject)1 VisualEditorPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject)1