Search in sources :

Example 21 with WikiBasePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject 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 22 with WikiBasePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject in project selenium-tests by Wikia.

the class EmbedMapTests method EmbedMapTests_004_VerifyEmbedMapOutsideWikia.

@Test(enabled = false, groups = { "EmbedMapTests_004", "EmbedMapTests", "InteractiveMaps" })
@Execute(asUser = User.USER)
public void EmbedMapTests_004_VerifyEmbedMapOutsideWikia() {
    WikiBasePageObject base = new WikiBasePageObject();
    InteractiveMapsPageObject specialMap = base.openSpecialInteractiveMaps(wikiURL);
    InteractiveMapPageObject selectedMap = specialMap.clickMapWithIndex(InteractiveMapsContent.SELECTED_MAP_INDEX);
    selectedMap.verifyMapOpened();
    selectedMap.clickEmbedMapCodeButton();
    selectedMap.verifyEmbedMapDialog();
    selectedMap.clickEmbedMapCodeButton(InteractiveMapPageObject.embedMapDialogButtons.SMALL);
    String mapCode = selectedMap.getEmbedMapCode();
    DabbletComPageObject outPage = new DabbletComPageObject(driver);
    outPage.openOutPage();
    outPage.typeHtmlCode(mapCode);
    outPage.verifyMapEmbed();
}
Also used : InteractiveMapPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapPageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) DabbletComPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.DabbletComPageObject) InteractiveMapsPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapsPageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 23 with WikiBasePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject in project selenium-tests by Wikia.

the class EmbedMapTests method EmbedMapTests_006_VerifyEmbeddedMapAddPinType.

@Test(enabled = false, groups = { "EmbedMapTests_006", "EmbedMapTests", "InteractiveMaps" })
@Execute(asUser = User.USER)
public void EmbedMapTests_006_VerifyEmbeddedMapAddPinType() {
    WikiBasePageObject base = new WikiBasePageObject();
    ArticlePageObject article = new ArticlePageObject();
    article.open(InteractiveMapsContent.EMBED_MAP_ARTICLE_NAME);
    EmbedMapComponentObject embedMapDialog = article.clickViewEmbedMap();
    CreatePinTypesComponentObject pinTypesDialog = embedMapDialog.clickEditPinTypesButton();
    pinTypesDialog.verifyPinTypesDialog();
    pinTypesDialog.deletePinTypes();
    pinTypesDialog.typeManyPinTypeTitle(InteractiveMapsContent.PIN_TYPE_NAME, 4);
    pinTypesDialog.clickSave();
    embedMapDialog.verifyPinTypeExists(InteractiveMapsContent.PIN_TYPE_NAME);
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) EmbedMapComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.EmbedMapComponentObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) CreatePinTypesComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreatePinTypesComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 24 with WikiBasePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject in project selenium-tests by Wikia.

the class EmbedMapTests method EmbedMapTests_003_VerifyEmbedMapCodeButton.

@Test(enabled = false, groups = { "EmbedMapTests_003", "EmbedMapTests", "InteractiveMaps" })
@Execute(asUser = User.USER)
public void EmbedMapTests_003_VerifyEmbedMapCodeButton() {
    WikiBasePageObject base = new WikiBasePageObject();
    InteractiveMapsPageObject specialMap = base.openSpecialInteractiveMaps(wikiURL);
    InteractiveMapPageObject selectedMap = specialMap.clickMapWithIndex(InteractiveMapsContent.SELECTED_MAP_INDEX);
    selectedMap.verifyMapOpened();
    selectedMap.clickEmbedMapCodeButton();
    selectedMap.verifyEmbedMapDialog();
    selectedMap.clickEmbedMapCodeButton(InteractiveMapPageObject.embedMapDialogButtons.SMALL);
    selectedMap.verifyEmbedMapCode(InteractiveMapPageObject.embedMapDialogButtons.SMALL);
    selectedMap.clickEmbedMapCodeButton(InteractiveMapPageObject.embedMapDialogButtons.MEDIUM);
    selectedMap.verifyEmbedMapCode(InteractiveMapPageObject.embedMapDialogButtons.MEDIUM);
    selectedMap.clickEmbedMapCodeButton(InteractiveMapPageObject.embedMapDialogButtons.LARGE);
    selectedMap.verifyEmbedMapCode(InteractiveMapPageObject.embedMapDialogButtons.LARGE);
}
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)

Example 25 with WikiBasePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject in project selenium-tests by Wikia.

the class MapFlowTests method MapFlowTests_001_CreateCustomMapNewImageUpload.

@Test(groups = { "MapFlowTests_001", "MapFlowTests", "InteractiveMaps" }, enabled = false)
@Execute(asUser = User.USER)
public void MapFlowTests_001_CreateCustomMapNewImageUpload() {
    WikiBasePageObject base = new WikiBasePageObject();
    InteractiveMapsPageObject specialMap = base.openSpecialInteractiveMaps(wikiURL);
    CreateAMapComponentObject map = specialMap.clickCreateAMap();
    CreateACustomMapComponentObject customMap = map.clickCustomMap();
    TemplateComponentObject template = customMap.selectFileToUpload(PageContent.FILE);
    template.verifyTemplateImagePreview();
    template.typeMapName(InteractiveMapsContent.MAP_NAME);
    InteractiveMapsContent.TEMPLATE_NAME = base.getTimeStamp();
    template.typeTemplateName(InteractiveMapsContent.TEMPLATE_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)

Aggregations

WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)174 Test (org.testng.annotations.Test)162 Execute (com.wikia.webdriver.common.core.annotations.Execute)72 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)39 InteractiveMapsPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapsPageObject)38 InteractiveMapPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapPageObject)30 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)24 DontRun (com.wikia.webdriver.common.core.annotations.DontRun)23 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)21 BlogPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject)17 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)14 MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)13 CreateAMapComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreateAMapComponentObject)12 MessageWall (com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall)12 NavigationBar (com.wikia.webdriver.pageobjectsfactory.componentobject.global_navitagtion.NavigationBar)11 AddPinComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.AddPinComponentObject)11 CreatePinTypesComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreatePinTypesComponentObject)10 UserProfilePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject)10 SpecialCreatePage (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage)10 DetachedSignInPage (com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.DetachedSignInPage)9