Search in sources :

Example 1 with EditorHomePageObject

use of com.wikia.webdriver.elements.mercury.old.curatedcontent.EditorHomePageObject in project selenium-tests by Wikia.

the class CropImageTests method init.

private void init() {
    this.curatedMainPage = new CuratedMainPagePageObject();
    this.editor = new EditorHomePageObject();
    this.itemForm = new ItemFormPageObject();
    this.imageModal = new UploadImageModalComponentObject(driver);
    this.search = new SearchForImagePageObject(driver);
    this.croppingTool = new CroppingToolPageObject(driver);
    this.navigate = new Navigate();
}
Also used : SearchForImagePageObject(com.wikia.webdriver.elements.mercury.old.curatedcontent.imageupload.SearchForImagePageObject) CuratedMainPagePageObject(com.wikia.webdriver.elements.mercury.old.curatedcontent.CuratedMainPagePageObject) ItemFormPageObject(com.wikia.webdriver.elements.mercury.old.curatedcontent.curatededitorform.ItemFormPageObject) EditorHomePageObject(com.wikia.webdriver.elements.mercury.old.curatedcontent.EditorHomePageObject) Navigate(com.wikia.webdriver.elements.common.Navigate) UploadImageModalComponentObject(com.wikia.webdriver.elements.mercury.old.curatedcontent.imageupload.UploadImageModalComponentObject) CroppingToolPageObject(com.wikia.webdriver.elements.mercury.old.curatedcontent.imageupload.CroppingToolPageObject)

Example 2 with EditorHomePageObject

use of com.wikia.webdriver.elements.mercury.old.curatedcontent.EditorHomePageObject in project selenium-tests by Wikia.

the class EditorTests method MercuryCuratedEditorTest_002_addAndSaveSection.

@Test(groups = "MercuryCuratedEditorTest_002")
public void MercuryCuratedEditorTest_002_addAndSaveSection() {
    Boolean result = new ArticlePage().open(MercurySubpages.ECC_MAIN_PAGE).getCuratedMainPage().isFeaturedContentVisible();
    PageObjectLogging.logInfo(String.format("Curated content is visible: %s", result));
    new EditorHomePageObject().open().clickAddSection().typeDisplayName(SECTION_DISPLAY_NAME).clickOnImage().clickSearchForImageButton().type(SEARCH_IMAGE_QUERY).clickOnImage(0).clickDoneButton().clickDone().getSectionItemList().clickAddCategory().typeDisplayName(ITEM_DISPLAY_NAME).typePageName(ITEM_PAGE_NAME).clickOnImage().clickSearchForImageButton().type(SEARCH_IMAGE_QUERY).clickOnImage(0).clickDoneButton().clickDone().getSectionItemList().verifyItem(ITEM_DISPLAY_NAME).waitForAddCategoryButtonToBeVisible().clickDone().waitForAddCategoryButtonToBeVisible().publish();
    PageObjectLogging.log("Curated Content", MercuryMessages.VISIBLE_MSG, MercuryMessages.INVISIBLE_MSG, new CuratedMainPagePageObject().isCuratedContentVisible());
    new CuratedContentPageObject().clickOnCuratedContentElementByIndex(0);
    Assertion.assertNumber(new CuratedContentPageObject().getCuratedContentItemsNumber(), 1, "If error says that 3 elements were found - it means getList API returned cached response - ticket created: XW-1281");
}
Also used : CuratedContentPageObject(com.wikia.webdriver.elements.mercury.old.curatedcontent.CuratedContentPageObject) CuratedMainPagePageObject(com.wikia.webdriver.elements.mercury.old.curatedcontent.CuratedMainPagePageObject) ArticlePage(com.wikia.webdriver.elements.mercury.pages.ArticlePage) EditorHomePageObject(com.wikia.webdriver.elements.mercury.old.curatedcontent.EditorHomePageObject) Test(org.testng.annotations.Test)

Example 3 with EditorHomePageObject

use of com.wikia.webdriver.elements.mercury.old.curatedcontent.EditorHomePageObject in project selenium-tests by Wikia.

the class EditorTests method MercuryCuratedEditorTest_003_addAndSaveItemToOptionalSection.

@Test(groups = "MercuryCuratedEditorTest_003")
public void MercuryCuratedEditorTest_003_addAndSaveItemToOptionalSection() {
    Boolean result = new ArticlePage().open(MercurySubpages.ECC_MAIN_PAGE).getCuratedMainPage().isFeaturedContentVisible();
    PageObjectLogging.logInfo(String.format("Curated content is visible: %s", result));
    new EditorHomePageObject().open().clickAddCategory().typeDisplayName(ITEM_DISPLAY_NAME).typePageName(ITEM_PAGE_NAME).clickOnImage().clickSearchForImageButton().type(SEARCH_IMAGE_QUERY).clickOnImage(0).clickDoneButton().clickDone().waitForAddCategoryButtonToBeVisible().publish();
    PageObjectLogging.log("Curated Content", MercuryMessages.VISIBLE_MSG, MercuryMessages.INVISIBLE_MSG, new CuratedMainPagePageObject().isCuratedContentVisible());
}
Also used : CuratedMainPagePageObject(com.wikia.webdriver.elements.mercury.old.curatedcontent.CuratedMainPagePageObject) ArticlePage(com.wikia.webdriver.elements.mercury.pages.ArticlePage) EditorHomePageObject(com.wikia.webdriver.elements.mercury.old.curatedcontent.EditorHomePageObject) Test(org.testng.annotations.Test)

Example 4 with EditorHomePageObject

use of com.wikia.webdriver.elements.mercury.old.curatedcontent.EditorHomePageObject in project selenium-tests by Wikia.

the class EditorTests method MercuryCuratedEditorTest_001_addAndSaveItemToFeaturedContent.

@Test(groups = "MercuryCuratedEditorTest_001")
public void MercuryCuratedEditorTest_001_addAndSaveItemToFeaturedContent() {
    Boolean result = new ArticlePage().open(MercurySubpages.ECC_MAIN_PAGE).getCuratedMainPage().isFeaturedContentVisible();
    PageObjectLogging.logInfo(String.format("Curated content is visible: %s", result));
    new EditorHomePageObject().open().clickAddFeaturedContent().typeDisplayName(ITEM_DISPLAY_NAME).typePageName(ITEM_PAGE_NAME).clickOnImage().clickSearchForImageButton().type(SEARCH_IMAGE_QUERY).clickOnImage(0).clickDoneButton().clickDone().waitForAddCategoryButtonToBeVisible().publish();
    result = new ArticlePage().getCuratedMainPage().isFeaturedContentVisible();
    PageObjectLogging.log("Featured Content", MercuryMessages.VISIBLE_MSG, MercuryMessages.INVISIBLE_MSG, result);
}
Also used : ArticlePage(com.wikia.webdriver.elements.mercury.pages.ArticlePage) EditorHomePageObject(com.wikia.webdriver.elements.mercury.old.curatedcontent.EditorHomePageObject) Test(org.testng.annotations.Test)

Example 5 with EditorHomePageObject

use of com.wikia.webdriver.elements.mercury.old.curatedcontent.EditorHomePageObject in project selenium-tests by Wikia.

the class ImageUploadTests method init.

private void init() {
    this.curatedMainPage = new CuratedMainPagePageObject();
    this.crop = new CroppingToolPageObject(driver);
    this.editor = new EditorHomePageObject();
    this.generator = new ImageGenerator();
    this.itemForm = new ItemFormPageObject();
    this.upload = new UploadImageModalComponentObject(driver);
    this.navigate = new Navigate();
}
Also used : CuratedMainPagePageObject(com.wikia.webdriver.elements.mercury.old.curatedcontent.CuratedMainPagePageObject) ItemFormPageObject(com.wikia.webdriver.elements.mercury.old.curatedcontent.curatededitorform.ItemFormPageObject) EditorHomePageObject(com.wikia.webdriver.elements.mercury.old.curatedcontent.EditorHomePageObject) ImageGenerator(com.wikia.webdriver.common.core.imageutilities.ImageGenerator) Navigate(com.wikia.webdriver.elements.common.Navigate) UploadImageModalComponentObject(com.wikia.webdriver.elements.mercury.old.curatedcontent.imageupload.UploadImageModalComponentObject) CroppingToolPageObject(com.wikia.webdriver.elements.mercury.old.curatedcontent.imageupload.CroppingToolPageObject)

Aggregations

EditorHomePageObject (com.wikia.webdriver.elements.mercury.old.curatedcontent.EditorHomePageObject)5 CuratedMainPagePageObject (com.wikia.webdriver.elements.mercury.old.curatedcontent.CuratedMainPagePageObject)4 ArticlePage (com.wikia.webdriver.elements.mercury.pages.ArticlePage)3 Test (org.testng.annotations.Test)3 Navigate (com.wikia.webdriver.elements.common.Navigate)2 ItemFormPageObject (com.wikia.webdriver.elements.mercury.old.curatedcontent.curatededitorform.ItemFormPageObject)2 CroppingToolPageObject (com.wikia.webdriver.elements.mercury.old.curatedcontent.imageupload.CroppingToolPageObject)2 UploadImageModalComponentObject (com.wikia.webdriver.elements.mercury.old.curatedcontent.imageupload.UploadImageModalComponentObject)2 ImageGenerator (com.wikia.webdriver.common.core.imageutilities.ImageGenerator)1 CuratedContentPageObject (com.wikia.webdriver.elements.mercury.old.curatedcontent.CuratedContentPageObject)1 SearchForImagePageObject (com.wikia.webdriver.elements.mercury.old.curatedcontent.imageupload.SearchForImagePageObject)1