Search in sources :

Example 76 with ArticleContent

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

the class VideosModuleTests method VideosModuleTest_003.

/**
   * Checks if the Videos Module is showing the correct number of videos. Currently that amount is
   * between 3 and 5.
   */
@Test(groups = { "VideosModule", "VideosModuleTest_003", "Media" })
public void VideosModuleTest_003() {
    new ArticleContent().push(PageContent.ARTICLE_TEXT);
    new ArticlePageObject().open();
    new VideosModuleComponentObject(driver).verifyDisplayCount();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VideosModuleComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.videosmodule.VideosModuleComponentObject) Test(org.testng.annotations.Test)

Example 77 with ArticleContent

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

the class CategoryPageTest method mercury_category_navigateToCategoryPageWithArticleAndWithoutMembersFromUrl.

@Test(groups = "mercury_category_navigateToCategoryPageWithArticleAndWithoutMembersFromUrl")
public void mercury_category_navigateToCategoryPageWithArticleAndWithoutMembersFromUrl() {
    final String categoryName = String.format("Category:%s", TestContext.getCurrentMethodName());
    new ArticleContent().push("some irrelevant content of category article", categoryName);
    CategoryPage category = new CategoryPage().open(categoryName);
    Assert.assertEquals(404, category.getURLStatus(category.getCurrentUrl()));
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) CategoryPage(com.wikia.webdriver.elements.mercury.pages.CategoryPage) Test(org.testng.annotations.Test)

Example 78 with ArticleContent

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

the class VisualEditorEditingTests method VisualEditorEditing_003_insertToExistingArticle.

@Test(groups = { "VisualEditorEditing", "VisualEditorEditing_003" })
public void VisualEditorEditing_003_insertToExistingArticle() {
    new ArticleContent().push(startingWikiText);
    VisualEditorPageObject ve = new VisualEditorPageObject().open();
    ve.verifyVEToolBarPresent();
    ve.verifyEditorSurfacePresent();
    ve.putCursorAtTheEnd();
    ve.typeReturn();
    ve.typeReturn();
    ve.typeTextInAllFormat(text);
    ve.typeTextInAllStyle(text);
    ve.typeTextInAllList(text);
    VisualEditorSaveChangesDialog saveDialog = ve.clickPublishButton();
    VisualEditorReviewChangesDialog reviewDialog = saveDialog.clickReviewYourChanges();
    reviewDialog.verifyAddedDiffs(wikiTexts);
    saveDialog = reviewDialog.clickReturnToSaveFormButton();
    ArticlePageObject article = saveDialog.savePage();
    article.verifyVEPublishComplete();
    article.verifyContent(text);
}
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 79 with ArticleContent

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

the class ArticleFeaturesCRUDTestsUser method deleteTable.

@Test(dataProviderClass = ArticleFeaturesCRUDDataProvider.class, dataProvider = "getTableProperties", groups = { "ArticleFeaturesCRUDUser_013" })
@Execute(asUser = User.USER)
public void deleteTable(int border, int width, int height, int cellspacing, int cellpadding, Alignment alignment) {
    new ArticleContent().push(String.format("{| border=\"%d\" cellpadding=\"%d\" cellspacing=\"%d\" " + "class=\"article-table article-table-selected\" " + "style=\"float: %s; height: %dpx; width: %dpx;\"\n" + "! scope=\"row\"|\n|\n|-\n! scope=\"row\"|\n|\n" + "|-\n! scope=\"row\"|\n|\n" + "|}", border, cellpadding, cellspacing, alignment.getAlignment(), height, width));
    VisualEditModePageObject visualEditMode = new VisualEditModePageObject().open();
    visualEditMode.clickDeleteTableButton();
    visualEditMode.submitArticle().verifyTableRemoved();
}
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)

Example 80 with ArticleContent

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

the class ArticleFeaturesCRUDTestsUser method modifyTable.

@Test(dataProviderClass = ArticleFeaturesCRUDDataProvider.class, dataProvider = "getTableProperties", groups = { "ArticleFeaturesCRUDUser_012" }, enabled = false)
@Execute(asUser = User.USER)
public void modifyTable(int border, int width, int height, int cellspacing, int cellpadding, Alignment alignment) {
    new ArticleContent().push(String.format("{| border=\"%d\" cellpadding=\"%d\" cellspacing=\"%d\" " + "class=\"article-table article-table-selected\" " + "style=\"float: %s; height: %dpx; width: %dpx;\"\n" + "! scope=\"row\"|\n|\n|-\n! scope=\"row\"|\n|\n" + "|-\n! scope=\"row\"|\n|\n" + "|}", border, cellpadding, cellspacing, alignment.getAlignment(), height, width));
    VisualEditModePageObject visualEditMode = new VisualEditModePageObject().open();
    visualEditMode.clickPropertiesTableButton();
    TableBuilderComponentObject addTable = new TableBuilderComponentObject(driver);
    addTable.typeBorderSize(border + additionalPropertyValue);
    addTable.typeCellSpacing(cellspacing + additionalPropertyValue);
    addTable.typeCellPadding(cellpadding + additionalPropertyValue);
    addTable.submitTable();
    ArticlePageObject article = visualEditMode.submitArticle();
    article.verifyTableBorder(border + additionalPropertyValue);
    article.verifyTableCellspacing(cellspacing + additionalPropertyValue);
    article.verifyTableCellpadding(cellpadding + additionalPropertyValue);
}
Also used : TableBuilderComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.addtable.TableBuilderComponentObject) 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) 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