Search in sources :

Example 1 with TemplateComponentObject

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

Example 2 with TemplateComponentObject

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

the class MapFlowTests method MapFlowTests_002_CreateCustomMapWithExistingTemplate.

@DontRun(env = { "dev", "sandbox", "preview" })
@Test(groups = { "MapFlowTests_002", "MapFlowTests", "InteractiveMaps" })
@Execute(asUser = User.USER)
@RelatedIssue(issueID = "MAIN-5732", comment = "Not possible to test manually in preview environment")
public void MapFlowTests_002_CreateCustomMapWithExistingTemplate() {
    WikiBasePageObject base = new WikiBasePageObject();
    InteractiveMapsPageObject specialMap = base.openSpecialInteractiveMaps(wikiURL);
    CreateAMapComponentObject map = specialMap.clickCreateAMap();
    CreateACustomMapComponentObject customMap = map.clickCustomMap();
    String selectedImageName = customMap.getSelectedTemplateImageName(InteractiveMapsContent.SELECTED_TEMPLATE_INDEX);
    TemplateComponentObject template = customMap.selectTemplate(InteractiveMapsContent.SELECTED_TEMPLATE_INDEX);
    template.verifyTemplateImage(selectedImageName);
    template.typeMapName(InteractiveMapsContent.MAP_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) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue) DontRun(com.wikia.webdriver.common.core.annotations.DontRun)

Example 3 with TemplateComponentObject

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

the class MapFlowTests method MapFlowTests_004_VerifyBackButtonWorksCorrectly.

@Test(groups = { "MapFlowTests_004", "MapFlowTests", "InteractiveMaps" })
@Execute(asUser = User.USER)
public void MapFlowTests_004_VerifyBackButtonWorksCorrectly() {
    WikiBasePageObject base = new WikiBasePageObject();
    InteractiveMapsPageObject specialMap = base.openSpecialInteractiveMaps(wikiURL);
    CreateAMapComponentObject map = specialMap.clickCreateAMap();
    CreateACustomMapComponentObject customMap = map.clickCustomMap();
    TemplateComponentObject template = customMap.selectTemplate(InteractiveMapsContent.SELECTED_TEMPLATE_INDEX);
    template.verifyTemplateImagePreview();
    customMap = template.clickBack();
    customMap.verifyTemplateListElementVisible(InteractiveMapsContent.SELECTED_TEMPLATE_INDEX);
    map = customMap.clickBack();
    map.verifyRealMapAndCustomMapButtons();
    CreateRealMapComponentObject realMap = map.clickRealMap();
    realMap.verifyRealMapPreviewImage();
    map = realMap.clickBack();
    map.verifyRealMapAndCustomMapButtons();
}
Also used : CreateRealMapComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreateRealMapComponentObject) 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) InteractiveMapsPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapsPageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 4 with TemplateComponentObject

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

the class BlockedUserMapTests method BlockedUserMapTests_004_VerifyUserCannotCreateCustomMap.

@RelatedIssue(issueID = "", comment = "Functionality is being depracated No need to test manually")
@Test(groups = { "BlockedUserMapTests_004", "BlockedUserMapTests", "InteractiveMaps" })
public void BlockedUserMapTests_004_VerifyUserCannotCreateCustomMap() {
    WikiBasePageObject base = new WikiBasePageObject();
    base.loginAs(credentials.userNameBlockedAccount, credentials.passwordBlockedAccount, wikiURL);
    InteractiveMapsPageObject specialMaps = base.openSpecialInteractiveMaps(wikiURL);
    CreateAMapComponentObject createMap = specialMaps.clickCreateAMap();
    CreateACustomMapComponentObject customMap = createMap.clickCustomMap();
    String selectedImageName = customMap.getSelectedTemplateImageName(InteractiveMapsContent.SELECTED_TEMPLATE_INDEX);
    TemplateComponentObject template = customMap.selectTemplate(InteractiveMapsContent.SELECTED_TEMPLATE_INDEX);
    template.verifyTemplateImage(selectedImageName);
    template.typeMapName(InteractiveMapsContent.MAP_NAME);
    CreatePinTypesComponentObject pinDialog = template.clickNext();
    template.verifyErrorExists();
}
Also used : 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) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Example 5 with TemplateComponentObject

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

the class NonSpecificMapTests method NonSpecificMapTests_007_VerifyCreateCustomMapErrors.

@Test(enabled = false, groups = { "NonSpecificMapTests_007", "NonSpecificMapTests", "InteractiveMaps" })
@Execute(asUser = User.USER)
public void NonSpecificMapTests_007_VerifyCreateCustomMapErrors() {
    WikiBasePageObject base = new WikiBasePageObject();
    InteractiveMapsPageObject specialMap = base.openSpecialInteractiveMaps(wikiURL);
    CreateAMapComponentObject createMap = specialMap.clickCreateAMap();
    CreateACustomMapComponentObject customMap = createMap.clickCustomMap();
    TemplateComponentObject templateMap = customMap.selectTemplate(InteractiveMapsContent.SELECTED_TEMPLATE_INDEX);
    templateMap.clickNext();
    templateMap.verifyErrorExists();
}
Also used : 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) InteractiveMapsPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapsPageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Aggregations

CreateACustomMapComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreateACustomMapComponentObject)5 CreateAMapComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreateAMapComponentObject)5 TemplateComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.TemplateComponentObject)5 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)5 InteractiveMapsPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapsPageObject)5 Test (org.testng.annotations.Test)5 Execute (com.wikia.webdriver.common.core.annotations.Execute)4 CreatePinTypesComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreatePinTypesComponentObject)3 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)2 InteractiveMapPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.interactivemaps.InteractiveMapPageObject)2 DontRun (com.wikia.webdriver.common.core.annotations.DontRun)1 CreateRealMapComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.interactivemaps.CreateRealMapComponentObject)1