Search in sources :

Example 6 with PreviewEditModePageObject

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

the class ArticleTOCTests method ArticleTOCTests_006_verifyTOCisExpandedOnPreviewForLoggedInUser.

/**
   * 1. as logged in user open an article with TOC 2. user edits the article 3. user is able to see
   * expanded TOC on the preview
   */
@Test(groups = { "ArticleTOCTests", "ArticleTOCTests_006" })
@Execute(asUser = User.USER_12)
public void ArticleTOCTests_006_verifyTOCisExpandedOnPreviewForLoggedInUser() {
    new ArticleContent().push(PageContent.ARTICLE_WITH_TOC_LINES);
    VisualEditModePageObject visualEditMode = new VisualEditModePageObject().open();
    Assertion.assertTrue(visualEditMode.isContentLoaded(), "Content is not loaded");
    PreviewEditModePageObject preview = visualEditMode.previewArticle();
    preview.verifyTOCpresentOnPreview();
    preview.verifyTOCexpandedOnPreview();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) PreviewEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 7 with PreviewEditModePageObject

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

the class ArticleTOCTests method ArticleTOCTests_003_verifyTOCisCollapsedOnPreviewForAnon.

/**
   * 1. as anon open an article with TOC 2. user edits the article 3. user is able to see collapsed
   * TOC on the preview
   */
@Test(groups = { "ArticleTOCTests", "ArticleTOCTests_003" })
public void ArticleTOCTests_003_verifyTOCisCollapsedOnPreviewForAnon() {
    new ArticleContent().push(PageContent.ARTICLE_WITH_TOC_LINES);
    ArticlePageObject article = new ArticlePageObject().open();
    article.verifyTOCpresent();
    VisualEditModePageObject visualEditMode = article.navigateToArticleEditPage();
    Assertion.assertTrue(visualEditMode.isContentLoaded(), "Content is not loaded");
    PreviewEditModePageObject preview = visualEditMode.previewArticle();
    preview.verifyTOCpresentOnPreview();
    preview.verifyTOCcollapsedOnPreview();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) PreviewEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject) Test(org.testng.annotations.Test)

Example 8 with PreviewEditModePageObject

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

the class VetModalCaptionTests method VetModalCaption_001_modalCaption.

@Test(groups = { "VetModalCaption_001" })
@Execute(asUser = User.USER)
public void VetModalCaption_001_modalCaption() {
    WikiBasePageObject base = new WikiBasePageObject();
    articleTitleCaption = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    VisualEditModePageObject visualEditMode = base.navigateToArticleEditPage(wikiURL, articleTitleCaption);
    VetAddVideoComponentObject vetAddingVideo = visualEditMode.clickVideoButton();
    VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
    caption = PageContent.CAPTION + vetOptions.getTimeStamp();
    vetOptions.setCaption(caption);
    vetOptions.submit();
    Assertion.assertEquals(visualEditMode.getVideoCaption(), caption);
    SourceEditModePageObject sourceEditMode = visualEditMode.clickSourceButton();
    sourceEditMode.verifySourceModeEnabled();
    Assertion.assertTrue(sourceEditMode.getContent().contains(caption));
    PreviewEditModePageObject previewMode = sourceEditMode.previewArticle();
    Assertion.assertEquals(previewMode.getVideoCaption(), caption);
    previewMode.closePreviewModal();
    ArticlePageObject article = sourceEditMode.submitArticle();
    Assertion.assertEquals(article.getVideoCaption(), 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) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject) PreviewEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Aggregations

PreviewEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject)8 Test (org.testng.annotations.Test)8 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)7 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)7 Execute (com.wikia.webdriver.common.core.annotations.Execute)6 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)6 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)5 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)5 VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)5 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)3 CreationTicket (com.wikia.webdriver.common.core.annotations.CreationTicket)1 YoutubeVideo (com.wikia.webdriver.common.core.video.YoutubeVideo)1