Search in sources :

Example 76 with VisualEditorPageObject

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

the class ArticlePageObject method openVEModeWithRedLinks.

public VisualEditorPageObject openVEModeWithRedLinks(int linkNumber) {
    WebElement redLinkToClick = redLinks.get(linkNumber);
    VECreateArticleModalComponentObject veArticleModal = clickVERedLink(redLinkToClick);
    veArticleModal.createPage();
    return new VisualEditorPageObject();
}
Also used : VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) VECreateArticleModalComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.modalwindows.VECreateArticleModalComponentObject) WebElement(org.openqa.selenium.WebElement)

Example 77 with VisualEditorPageObject

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

the class ArticlePageObject method verifyMainEditEditor.

public void verifyMainEditEditor(Editor expectedEditor) {
    switch(expectedEditor) {
        case VE:
            VisualEditorPageObject ve = openVEModeWithMainEditButton();
            ve.verifyVEToolBarPresent();
            ve.verifyEditorSurfacePresent();
            break;
        case CK:
            VisualEditModePageObject ck = openCKModeWithMainEditButton();
            Assertion.assertTrue(ck.isContentLoaded(), "Content is not loaded");
            ck.clickPublishButton();
            break;
        case SRC:
            SourceEditModePageObject src = openSrcModeWithMainEditButton();
            src.verifySourceOnlyMode();
            src.clickPublishButton();
            break;
    }
}
Also used : SourceEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)

Example 78 with VisualEditorPageObject

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

the class VisualEditorInsertGalleryDialog method addExistingMedia.

public VisualEditorPageObject addExistingMedia(int number) {
    waitForDialogVisible();
    WebElement mediaResultsWidget = dialogBody.findElement(MEDIA_RESULTS_WIDGET_BY);
    wait.forElementVisible(mediaResultsWidget);
    List<WebElement> mediaResults = mediaResultsWidget.findElements(MEDIA_RESULTS_BY);
    //only selects available number of media
    for (int i = 0; i < Math.min(number, mediaResults.size()); i++) {
        WebElement mediaAddIcon = mediaResults.get(i).findElement(MEDIA_ADD_ICON_BY);
        mediaAddIcon.click();
    }
    clickAddGalleryButton();
    return new VisualEditorPageObject();
}
Also used : VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) WebElement(org.openqa.selenium.WebElement)

Example 79 with VisualEditorPageObject

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

the class VisualEditorInsertGalleryDialog method clickTitleToPreview.

public VisualEditorPageObject clickTitleToPreview(int index) {
    waitForDialogVisible();
    WebElement mediaResultsWidget = dialogBody.findElement(MEDIA_RESULTS_WIDGET_BY);
    wait.forElementVisible(mediaResultsWidget);
    WebElement targetMedia = mediaResultsWidget.findElements(MEDIA_TITLES_BY).get(index);
    scrollAndClick(targetMedia);
    return new VisualEditorPageObject();
}
Also used : VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) WebElement(org.openqa.selenium.WebElement)

Example 80 with VisualEditorPageObject

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

the class VisualEditorAddMediaDialog method previewExistingVideoByTitle.

public VisualEditorPageObject previewExistingVideoByTitle(String title) {
    waitForDialogVisible();
    WebElement media = findMediaByTitle(title);
    media.findElement(previewVideoButtonBy).click();
    PageObjectLogging.log("previewExistingMediaByTitle", "Media clicked", true);
    return new VisualEditorPageObject();
}
Also used : VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) WebElement(org.openqa.selenium.WebElement)

Aggregations

VisualEditorPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject)85 Test (org.testng.annotations.Test)69 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)44 VisualEditorSaveChangesDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog)17 Execute (com.wikia.webdriver.common.core.annotations.Execute)15 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)12 WebElement (org.openqa.selenium.WebElement)11 VisualEditorReviewChangesDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorReviewChangesDialog)9 VisualEditorAddMediaDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorAddMediaDialog)7 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)7 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)6 VisualEditorOptionsDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorOptionsDialog)5 ArticlePurger (com.wikia.webdriver.common.core.helpers.ArticlePurger)4 VisualEditorInsertGalleryDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorInsertGalleryDialog)4 VisualEditorInsertTemplateDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorInsertTemplateDialog)4 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)4 ArrayList (java.util.ArrayList)4 VisualEditorAddMapDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorAddMapDialog)3 VisualEditorEditTemplateDialog (com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorEditTemplateDialog)3 WikiHistoryPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.WikiHistoryPageObject)2