Search in sources :

Example 6 with SourceEditModePageObject

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

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

the class ArticleSourceModeTests method RTE_010_Signature.

@Test(groups = { "RTE_extended_2", "RTE_extended_010" })
public void RTE_010_Signature() {
    WikiBasePageObject base = new WikiBasePageObject();
    String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    ArticlePageObject article = new ArticlePageObject().open(articleName);
    SourceEditModePageObject source = article.openCurrectArticleSourceMode();
    source.clickSignature();
    Assertion.assertEquals(source.getSourceContent(), "--~~~~");
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) SourceEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) Test(org.testng.annotations.Test)

Example 8 with SourceEditModePageObject

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

the class ArticleSourceModeTests method RTE_018_MoreWikiMarkupTools.

@Test(groups = { "RTE_extended_3", "RTE_extended_018" })
public void RTE_018_MoreWikiMarkupTools() {
    WikiBasePageObject base = new WikiBasePageObject();
    String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    ArticlePageObject article = new ArticlePageObject().open(articleName);
    SourceEditModePageObject source = article.openCurrectArticleSourceMode();
    source.checkWikiMarkupTools();
    source.submitArticle();
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) SourceEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) Test(org.testng.annotations.Test)

Example 9 with SourceEditModePageObject

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

the class ArticleSourceModeTests method RTE_021_YoutubeTag_Publish.

@CreationTicket(ticketID = "CONCF-626")
@Test(groups = { "RTE_extended_4", "RTE_extended_021" })
public void RTE_021_YoutubeTag_Publish() {
    WikiBasePageObject base = new WikiBasePageObject();
    String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    ArticlePageObject article = new ArticlePageObject().open(articleName);
    SourceEditModePageObject source = article.openCurrectArticleSourceMode();
    YoutubeVideo video = YoutubeVideoProvider.getLatestVideoForQuery("water");
    String videoID = video.getID();
    source.addContentInSourceMode("<youtube>\n" + videoID + "\n</youtube>");
    article = source.clickPublishButton();
    article.verifyArticleTitle(articleName);
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) SourceEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) YoutubeVideo(com.wikia.webdriver.common.core.video.YoutubeVideo) CreationTicket(com.wikia.webdriver.common.core.annotations.CreationTicket) Test(org.testng.annotations.Test)

Example 10 with SourceEditModePageObject

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

the class ArticleSourceModeTests method RTE_012_Photo.

@Test(groups = { "RTE_extended_2", "RTE_extended_012" })
@Execute(onWikia = "seleniumtests")
public void RTE_012_Photo() {
    WikiBasePageObject base = new WikiBasePageObject();
    base.loginAs(User.STAFF);
    String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    ArticlePageObject article = new ArticlePageObject().open(articleName);
    SourceEditModePageObject source = article.openCurrectArticleSourceMode();
    PhotoAddComponentObject photoAddPhoto = source.clickAddPhoto();
    PhotoOptionsComponentObject photoOptions = photoAddPhoto.addPhotoFromWiki(PageContent.FILE);
    photoOptions.setCaption(PageContent.CAPTION);
    photoOptions.clickAddPhoto();
    String photoName = photoAddPhoto.getPhotoName();
    Assertion.assertEquals(source.getSourceContent(), String.format(PageContent.WIKI_TEXT_PHOTO.replace("%photoName%", photoName), PageContent.CAPTION));
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) SourceEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) PhotoAddComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject) PhotoOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

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