Search in sources :

Example 21 with ArticleContent

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

the class VisualEditorEditingTests method VisualEditorEditing_002_delete.

@Test(groups = { "VisualEditorEditing", "VisualEditorEditing_002" })
public void VisualEditorEditing_002_delete() {
    new ArticleContent().push(startingWikiText);
    String removeText = "Lorem ";
    List<String> deletedWikiTexts;
    deletedWikiTexts = new ArrayList<>();
    deletedWikiTexts.add(removeText);
    VisualEditorPageObject ve = new VisualEditorPageObject().open();
    ve.verifyVEToolBarPresent();
    ve.verifyEditorSurfacePresent();
    ve.removeText(removeText);
    VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
    VisualEditorReviewChangesDialog reviewDialog = saveDialog.clickReviewYourChanges();
    reviewDialog.verifyDeletedDiffs(deletedWikiTexts);
    saveDialog = reviewDialog.clickReturnToSaveFormButton();
    ArticlePageObject article = saveDialog.savePage();
    article.verifyVEPublishComplete();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditorPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject) VisualEditorReviewChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorReviewChangesDialog) VisualEditorSaveChangesDialog(com.wikia.webdriver.pageobjectsfactory.componentobject.visualeditordialogs.VisualEditorSaveChangesDialog) Test(org.testng.annotations.Test)

Example 22 with ArticleContent

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

the class CategoriesArticleTests method CategoriesTestsArticle_005_anonEdit.

@Test(groups = { "CategoriesTestsArticle_005", "CategoriesTestsArticle" })
public void CategoriesTestsArticle_005_anonEdit() {
    new ArticleContent().push(PageContent.ARTICLE_TEXT);
    ArticlePageObject article = new ArticlePageObject().open();
    String categoryName = PageContent.CATEGORY_NAME_PREFIX + DateTime.now().getMillis();
    article.addCategory(categoryName);
    EditCategoryComponentObject editCategory = article.editCategory(categoryName);
    categoryName = PageContent.CATEGORY_NAME_PREFIX + DateTime.now().getMillis();
    editCategory.editCategoryName(categoryName);
    article.submitCategory();
    article.verifyCategoryPresent(categoryName);
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) EditCategoryComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.editcategory.EditCategoryComponentObject) Test(org.testng.annotations.Test)

Example 23 with ArticleContent

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

the class CategoriesArticleTests method CategoriesTestsArticle_006_anonDelete.

@Test(groups = { "CategoriesTestsArticle_006", "CategoriesTestsArticle" })
public void CategoriesTestsArticle_006_anonDelete() {
    new ArticleContent().push(PageContent.ARTICLE_TEXT);
    ArticlePageObject article = new ArticlePageObject().open();
    article.addCategory("DeleteMe");
    article.verifySubmitCategoryEnabled();
    article.removeCategory("DeleteMe");
    article.verifySubmitCategoryDisabled();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) Test(org.testng.annotations.Test)

Example 24 with ArticleContent

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

the class ArticleFeaturesCRUDTestsUser method modifyVideo.

@Test(groups = { "ArticleFeaturesCRUDUser_007", "Media" })
@Execute(asUser = User.USER)
public void modifyVideo() {
    new ArticleContent().push("[[File:Wikia University - How to Contact Wikia|thumb|right|335 px|QAWebdriverCaption]]");
    VisualEditModePageObject visualEditMode = new VisualEditModePageObject().open();
    VetOptionsComponentObject vetOptions = (VetOptionsComponentObject) visualEditMode.modifyComponent(Components.VIDEO);
    vetOptions.setCaption(PageContent.CAPTION2);
    vetOptions.update();
    visualEditMode.verifyVideo();
    visualEditMode.submitArticle().verifyVideo();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) VetOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 25 with ArticleContent

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

the class ArticleFeaturesCRUDTestsUser method deleteSlider.

@Test(groups = { "ArticleFeaturesCRUDUser_006" })
@Execute(asUser = User.USER)
public void deleteSlider() {
    new ArticleContent().push("<gallery type=\"slider\" orientation=\"right\">\nImage010.jpg\n" + "Image009.jpg\nImage008.jpg\nImage007.jpg\n</gallery>");
    VisualEditModePageObject visualEditor = new VisualEditModePageObject().open();
    visualEditor.removeComponent(Components.SLIDER);
    visualEditor.verifyComponentRemoved(Components.SLIDER);
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) 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