Search in sources :

Example 36 with VisualEditorPageObject

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

the class ArticlePageObject method verifyURLVEActionEditEditor.

public void verifyURLVEActionEditEditor(Editor expectedEditor, String wikiURL) {
    switch(expectedEditor) {
        case VE:
            VisualEditorPageObject ve = openNewArticleEditModeVisual(wikiURL);
            ve.verifyVEToolBarPresent();
            ve.verifyEditorSurfacePresent();
            break;
        default:
            throw new NoSuchElementException("Invalid expected editor chosen: " + expectedEditor.name());
    }
}
Also used : VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) NoSuchElementException(org.openqa.selenium.NoSuchElementException)

Example 37 with VisualEditorPageObject

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

the class WikiBasePageObject method openVEModeWithSectionEditButton.

public VisualEditorPageObject openVEModeWithSectionEditButton(int section) {
    WebElement sectionEditButton = sectionEditButtons.get(section);
    wait.forElementClickable(sectionEditButton);
    sectionEditButton.click();
    PageObjectLogging.log("openVEModeWithSectionEditButton", "VE edit button clicked at section: " + section, true, driver);
    return new VisualEditorPageObject();
}
Also used : VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) WebElement(org.openqa.selenium.WebElement)

Example 38 with VisualEditorPageObject

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

the class ArticlePageObject method verifyRedLinkEditor.

public void verifyRedLinkEditor(Editor expectedEditor) {
    switch(expectedEditor) {
        case VE:
            VisualEditorPageObject ve = openVEModeWithRedLinks(0);
            ve.verifyVEToolBarPresent();
            ve.verifyEditorSurfacePresent();
            break;
        case CK:
            VisualEditModePageObject ck = openCKModeWithRedLinks(0);
            Assertion.assertTrue(ck.isContentLoaded(), "Content is not loaded");
            ck.clickPublishButton();
            break;
        case SRC:
            SourceEditModePageObject src = openSrcModeWithRedLinks(0);
            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 39 with VisualEditorPageObject

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

the class PortableInfoboxTests method insertEmptyInfoboxInVE.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_003" })
public void insertEmptyInfoboxInVE() {
    new ArticleContent().clear();
    ArticlePageObject article = new ArticlePageObject();
    article.open();
    new ArticlePurger().purgeArticleAsAnon();
    VisualEditorPageObject visualEditor = article.openVEModeWithMainEditButton().clickInsertToolButton().clickInsertInfoboxFromInsertToolMenu().selectInfoboxTemplate(2).applyChanges();
    Assertion.assertTrue(visualEditor.isInfoboxInsertedInEditorArea());
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) ArticlePurger(com.wikia.webdriver.common.core.helpers.ArticlePurger) Test(org.testng.annotations.Test)

Example 40 with VisualEditorPageObject

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

the class PortableInfoboxTests method insertInfoboxWithParametersInVE.

@Test(groups = { "PortableInfoboxTests", "PortableInfobox_003" })
public void insertInfoboxWithParametersInVE() {
    new ArticleContent().clear();
    ArticlePageObject article = new ArticlePageObject();
    article.open();
    new ArticlePurger().purgeArticleAsAnon();
    VisualEditorPageObject visualEditor = article.openVEModeWithMainEditButton().clickInsertToolButton().clickInsertInfoboxFromInsertToolMenu().selectInfoboxTemplate(2).typeInParameterField(0, new SourceEditModePageObject(driver).getRandomDigits(5)).applyChanges();
    Assertion.assertTrue(visualEditor.isInfoboxInsertedInEditorArea());
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) SourceEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) ArticlePurger(com.wikia.webdriver.common.core.helpers.ArticlePurger) 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