Search in sources :

Example 21 with SourceEditModePageObject

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

the class ArticleSourceModeTests method RTE_016_Video.

@Test(groups = { "RTE_extended_3", "RTE_extended_016", "Media" })
public void RTE_016_Video() {
    WikiBasePageObject base = new WikiBasePageObject();
    String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    ArticlePageObject article = new ArticlePageObject().open(articleName);
    SourceEditModePageObject source = article.openCurrectArticleSourceMode();
    VetAddVideoComponentObject vetAddingVideo = source.clickAddVideo();
    VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
    vetOptions.setCaption(PageContent.CAPTION);
    vetOptions.submit();
    source.checkSourceVideoContent("[[" + VideoContent.YOUTUBE_VIDEO_WIKITEXT + PageContent.CAPTION + "]]");
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VetOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject) SourceEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject) Test(org.testng.annotations.Test)

Example 22 with SourceEditModePageObject

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

the class ArticleSourceModeTests method RTE_014_Gallery.

@Test(groups = { "RTE_extended_2", "RTE_extended_014" })
public void RTE_014_Gallery() {
    WikiBasePageObject base = new WikiBasePageObject();
    String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    ArticlePageObject article = new ArticlePageObject().open(articleName);
    SourceEditModePageObject source = article.openCurrectArticleSourceMode();
    source.clickAddGallery();
    source.verifyComponentSelector();
    GalleryBuilderComponentObject galleryBuiler = (GalleryBuilderComponentObject) source.addComponent("gallery");
    AddPhotoComponentObject galleryAddPhoto = galleryBuiler.clickAddPhoto();
    galleryAddPhoto.search("image");
    List<String> photoNames = galleryAddPhoto.choosePhotos(4);
    galleryAddPhoto.clickSelect();
    galleryBuiler.adjustPosition(PositionsGallery.CENTER);
    galleryBuiler.adjustColumns("2");
    galleryBuiler.adjustSpacing(SpacingGallery.SMALL);
    galleryBuiler.adjustOrientation(Orientation.LANDSCAPE);
    galleryBuiler.clickFinish();
    Assertion.assertEquals(source.getSourceContent(), "<gallery position=\"center\" columns=\"2\" spacing=\"small\">\n" + photoNames.get(0) + "\n" + photoNames.get(1) + "\n" + photoNames.get(2) + "\n" + photoNames.get(3) + "\n</gallery>");
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) SourceEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject) GalleryBuilderComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.gallery.GalleryBuilderComponentObject) AddPhotoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.addphoto.AddPhotoComponentObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) Test(org.testng.annotations.Test)

Example 23 with SourceEditModePageObject

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

the class ArticleSourceModeTests method RTE_009_Nowiki.

@Test(groups = { "RTE_extended_2", "RTE_extended_009" })
public void RTE_009_Nowiki() {
    WikiBasePageObject base = new WikiBasePageObject();
    String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    ArticlePageObject article = new ArticlePageObject().open(articleName);
    SourceEditModePageObject source = article.openCurrectArticleSourceMode();
    source.clickNowiki();
    Assertion.assertEquals(source.getSourceContent(), "<nowiki>Insert non-formatted text here</nowiki>");
}
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 24 with SourceEditModePageObject

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

the class ArticleSourceModeTests method RTE_007_EmbedMedia.

@Test(groups = { "RTE_extended_1", "RTE_extended_007" })
public void RTE_007_EmbedMedia() {
    WikiBasePageObject base = new WikiBasePageObject();
    String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    ArticlePageObject article = new ArticlePageObject().open(articleName);
    SourceEditModePageObject source = article.openCurrectArticleSourceMode();
    source.clickEmbedMedia();
    Assertion.assertEquals(source.getSourceContent(), "[[Media:Example.ogg]]");
}
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 25 with SourceEditModePageObject

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

the class ArticleSourceModeTests method RTE_006_EmbedFile.

@Test(groups = { "RTE_extended_1", "RTE_extended_006" })
public void RTE_006_EmbedFile() {
    WikiBasePageObject base = new WikiBasePageObject();
    String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    ArticlePageObject article = new ArticlePageObject().open(articleName);
    SourceEditModePageObject source = article.openCurrectArticleSourceMode();
    source.clickEmbedFile();
    Assertion.assertEquals(source.getSourceContent(), "[[File:Example.jpg]]");
}
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)

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