Search in sources :

Example 1 with VisualEditorPageObject

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

the class VisualEditorInsertGalleryDialog method clickMetaDataToPreview.

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

Example 2 with VisualEditorPageObject

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

the class VisualEditorAddMapDialog method addExistingMap.

public VisualEditorPageObject addExistingMap(int number) {
    waitForDialogVisible();
    WebElement mediaResultsWidget = mediaDialogBody.findElement(mediaResultsWidgetBy);
    if (isElementOnPage(mediaResultsWidget)) {
        wait.forElementVisible(mediaResultsWidget);
        List<WebElement> maps = mediaResultsWidget.findElements(mediaResultsBy);
        WebElement map = maps.get(number);
        map.click();
    } else {
        throw new NoSuchElementException("The dialog is in empty state, the wiki needs to contain map.");
    }
    waitForDialogNotVisible();
    return new VisualEditorPageObject();
}
Also used : VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) WebElement(org.openqa.selenium.WebElement) NoSuchElementException(org.openqa.selenium.NoSuchElementException)

Example 3 with VisualEditorPageObject

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

the class VisualEditorAddMediaDialog method previewExistingPhotoByTitle.

public VisualEditorPageObject previewExistingPhotoByTitle(String title) {
    waitForDialogVisible();
    WebElement media = findMediaByTitle(title);
    media.findElement(previewPhotoButtonBy).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)

Example 4 with VisualEditorPageObject

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

the class VisualEditorHyperLinkDialog method clickDoneButton.

public VisualEditorPageObject clickDoneButton() {
    waitForDialogVisible();
    WebElement doneButton = dialog.findElement(doneButtonBy);
    doneButton.click();
    waitForDialogNotVisible();
    return new VisualEditorPageObject();
}
Also used : VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) WebElement(org.openqa.selenium.WebElement)

Example 5 with VisualEditorPageObject

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

the class ArticleCRUDAnonTests method articleCRUDAnon_addDropdown.

@Test(groups = { "ArticleCRUDAnon_003" })
public void articleCRUDAnon_addDropdown() {
    String articleContent = PageContent.ARTICLE_TEXT;
    String articleTitle = PageContent.ARTICLE_NAME_PREFIX + DateTime.now().getMillis();
    ArticlePageObject article = new ArticlePageObject().open("AnonAddDropdown");
    VisualEditorPageObject ve = article.createArticleInVEUsingDropdown(articleTitle);
    ve.verifyVEToolBarPresent();
    ve.verifyEditorSurfacePresent();
    article = ve.clickVEEditAndPublish(articleContent);
    article.verifyContent(articleContent);
    article.verifyArticleTitle(articleTitle);
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) Test(org.testng.annotations.Test)

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