Search in sources :

Example 11 with SourceEditModePageObject

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

the class ArticleSourceModeTests method RTE_005_HeadLine.

@Test(groups = { "RTE_extended_1", "RTE_extended_005" })
public void RTE_005_HeadLine() {
    WikiBasePageObject base = new WikiBasePageObject();
    String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    ArticlePageObject article = new ArticlePageObject().open(articleName);
    SourceEditModePageObject source = article.openCurrectArticleSourceMode();
    source.clickLvl2Headline();
    Assertion.assertEquals(source.getSourceContent(), "\n== Headline text ==\n");
}
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 12 with SourceEditModePageObject

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

the class ArticleSourceModeTests method RTE_004_ExternalLink.

@Test(groups = { "RTE_extended_1", "RTE_extended_004" })
public void RTE_004_ExternalLink() {
    WikiBasePageObject base = new WikiBasePageObject();
    String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    ArticlePageObject article = new ArticlePageObject().open(articleName);
    SourceEditModePageObject source = article.openCurrectArticleSourceMode();
    source.clickExternalLink();
    Assertion.assertEquals(source.getSourceContent(), "[http://www.example.com link title]");
}
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 13 with SourceEditModePageObject

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

the class ArticleSourceModeTests method RTE_013_Slideshow.

@Test(groups = { "RTE_extended_2", "RTE_extended_013" })
public void RTE_013_Slideshow() {
    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();
    SlideshowBuilderComponentObject slideshowBuilder = (SlideshowBuilderComponentObject) source.addComponent("slideshow");
    AddPhotoComponentObject slideshowAddPhoto = slideshowBuilder.clickAddPhoto();
    slideshowAddPhoto.search("image");
    List<String> photoNames = slideshowAddPhoto.choosePhotos(4);
    slideshowAddPhoto.clickSelect();
    slideshowBuilder.adjustPosition(Positions.CENTER);
    slideshowBuilder.clickFinish();
    Assertion.assertEquals(source.getSourceContent(), "<gallery type=\"slideshow\" position=\"center\">\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) SlideshowBuilderComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.slideshow.SlideshowBuilderComponentObject) AddPhotoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.addphoto.AddPhotoComponentObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) Test(org.testng.annotations.Test)

Example 14 with SourceEditModePageObject

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

the class ArticleSourceModeTests method RTE_017_MoreMainTools.

@Test(groups = { "RTE_extended_3", "RTE_extended_017" })
public void RTE_017_MoreMainTools() {
    WikiBasePageObject base = new WikiBasePageObject();
    String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    ArticlePageObject article = new ArticlePageObject().open(articleName);
    SourceEditModePageObject source = article.openCurrectArticleSourceMode();
    source.checkMainTools();
    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 15 with SourceEditModePageObject

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

the class ArticleSourceModeTests method RTE_008_Math.

@Test(groups = { "RTE_extended_1", "RTE_extended_008" })
public void RTE_008_Math() {
    WikiBasePageObject base = new WikiBasePageObject();
    String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    ArticlePageObject article = new ArticlePageObject().open(articleName);
    SourceEditModePageObject source = article.openCurrectArticleSourceMode();
    source.clickMath();
    Assertion.assertEquals(source.getSourceContent(), "<math>Insert formula here</math>");
}
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