Search in sources :

Example 41 with SourceEditModePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject in project selenium-tests by Wikia.

the class ArticlePageObject method openSrcModeWithRedLinks.

public SourceEditModePageObject openSrcModeWithRedLinks(int linkNumber) {
    WebElement redLinkToClick = redLinks.get(linkNumber);
    CreateArticleModalComponentObject articleModal = clickRedLink(redLinkToClick);
    articleModal.createPageWithBlankLayout("");
    return new SourceEditModePageObject(driver);
}
Also used : SourceEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject) CreateArticleModalComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.modalwindows.CreateArticleModalComponentObject) VECreateArticleModalComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.modalwindows.VECreateArticleModalComponentObject) WebElement(org.openqa.selenium.WebElement)

Example 42 with SourceEditModePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject in project selenium-tests by Wikia.

the class ArticlePageObject method verifySectionEditEditor.

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

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject in project selenium-tests by Wikia.

the class ArticlePageObject method verifyURLActionEditEditor.

public void verifyURLActionEditEditor(Editor expectedEditor, String articleName, String wikiURL) {
    switch(expectedEditor) {
        case CK:
            VisualEditModePageObject ck = navigateToArticleEditPage(wikiURL, articleName);
            Assertion.assertTrue(ck.isContentLoaded(), "Content is not loaded");
            ck.clickPublishButton();
            break;
        case SRC:
            SourceEditModePageObject src = navigateToArticleEditPageSrc(wikiURL, articleName);
            src.verifySourceOnlyMode();
            src.clickPublishButton();
            break;
        default:
            throw new NoSuchElementException("Invalid expected editor chosen: " + expectedEditor.name());
    }
}
Also used : SourceEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) NoSuchElementException(org.openqa.selenium.NoSuchElementException)

Example 44 with SourceEditModePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject in project selenium-tests by Wikia.

the class WikiBasePageObject method openSrcModeWithSectionEditButton.

public SourceEditModePageObject openSrcModeWithSectionEditButton(int section) {
    WebElement sectionEditButton = sectionEditButtons.get(section);
    wait.forElementVisible(sectionEditButton);
    sectionEditButton.click();
    PageObjectLogging.log("openSrcModeWithSectionEditButton", "Src edit button clicked at section: " + section, true, driver);
    return new SourceEditModePageObject(driver);
}
Also used : SourceEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject) WebElement(org.openqa.selenium.WebElement)

Example 45 with SourceEditModePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject 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)

Aggregations

SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)45 Test (org.testng.annotations.Test)37 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)35 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)24 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)11 Execute (com.wikia.webdriver.common.core.annotations.Execute)8 VisualEditorPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject)7 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)6 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)6 VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)6 PreviewEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject)6 ArticlePurger (com.wikia.webdriver.common.core.helpers.ArticlePurger)3 AddPhotoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.addphoto.AddPhotoComponentObject)3 CreationTicket (com.wikia.webdriver.common.core.annotations.CreationTicket)2 YoutubeVideo (com.wikia.webdriver.common.core.video.YoutubeVideo)2 CreateArticleModalComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.modalwindows.CreateArticleModalComponentObject)2 VECreateArticleModalComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.modalwindows.VECreateArticleModalComponentObject)2 WebElement (org.openqa.selenium.WebElement)2 Notification (com.wikia.webdriver.elements.oasis.components.notifications.Notification)1 GalleryBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.gallery.GalleryBuilderComponentObject)1