Search in sources :

Example 66 with ArticleContent

use of com.wikia.webdriver.common.core.api.ArticleContent 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 67 with ArticleContent

use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.

the class ArticleTOCTests method ArticleTOCTests_005_verifyTOChideShowButtonsWorkForLoggedInUser.

/**
   * 1. as logged in user open an article with TOC 2. verify TOC is expanded 3. verify that
   * show/hide buttons work
   */
@Test(groups = { "ArticleTOCTests", "ArticleTOCTests_005" })
@Execute(asUser = User.USER)
public void ArticleTOCTests_005_verifyTOChideShowButtonsWorkForLoggedInUser() {
    new ArticleContent().push(PageContent.ARTICLE_WITH_TOC_LINES);
    ArticlePageObject article = new ArticlePageObject().open();
    article.verifyTOCpresent();
    article.verifyTOCexpanded();
    article.clickTOCshowHideButton();
    article.verifyTOCcollapsed();
    article.clickTOCshowHideButton();
    article.verifyTOCexpanded();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 68 with ArticleContent

use of com.wikia.webdriver.common.core.api.ArticleContent 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 69 with ArticleContent

use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.

the class CategoriesArticleTests method CategoriesTestsArticle_004_userSuggestions.

@Test(groups = { "CategoriesTestsArticle_004", "CategoriesTestsArticle" })
@Execute(asUser = User.USER)
public void CategoriesTestsArticle_004_userSuggestions() {
    new ArticleContent().push(PageContent.ARTICLE_TEXT);
    ArticlePageObject article = new ArticlePageObject().open();
    String desiredCategory = article.addCategorySuggestions(PageContent.CATEGORY_NAME_PREFIX, 2);
    article.submitCategory();
    article.verifyCategoryPresent(desiredCategory);
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 70 with ArticleContent

use of com.wikia.webdriver.common.core.api.ArticleContent in project selenium-tests by Wikia.

the class CategoriesArticleTests method CategoriesTestsArticle_001_anon.

@Test(groups = { "CategoriesTestsArticle_001", "CategoriesTestsArticle", "Smoke2" })
public void CategoriesTestsArticle_001_anon() {
    new ArticleContent().push(PageContent.ARTICLE_TEXT);
    ArticlePageObject article = new ArticlePageObject().open();
    String categoryName = PageContent.CATEGORY_NAME_PREFIX + article.getTimeStamp();
    article.addCategory(categoryName);
    article.submitCategory();
    article.verifyCategoryPresent(categoryName);
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) Test(org.testng.annotations.Test)

Aggregations

ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)99 Test (org.testng.annotations.Test)94 Execute (com.wikia.webdriver.common.core.annotations.Execute)55 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)51 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)38 PortableInfobox (com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox)16 TemplateContent (com.wikia.webdriver.common.core.api.TemplateContent)15 VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)15 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)11 ArticlePurger (com.wikia.webdriver.common.core.helpers.ArticlePurger)8 CategoryPage (com.wikia.webdriver.elements.mercury.pages.CategoryPage)6 AddPhotoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.addphoto.AddPhotoComponentObject)6 MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)6 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)6 VisualEditorPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject)6 PreviewEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject)5 PhotoOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject)4 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)3 Notification (com.wikia.webdriver.elements.oasis.components.notifications.Notification)3 PhotoAddComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject)3