Search in sources :

Example 66 with VisualEditModePageObject

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

the class ArticleFeaturesCRUDTestsAnon method ArticleCRUDAnonymous_005_AddingVideo.

@Test(groups = { "ArticleFeatureCRUDAnonymous_005", "ArticleFeaturesCRUDAnon" })
public void ArticleCRUDAnonymous_005_AddingVideo() {
    ArticlePageObject article = new ArticlePageObject().open(articleName);
    VisualEditModePageObject visualEditMode = article.navigateToArticleEditPage();
    visualEditMode.clickVideoButton();
    DetachedRegisterPage auth = new DetachedRegisterPage();
    assertTrue(auth.isDisplayed());
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) DetachedRegisterPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.register.DetachedRegisterPage) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) Test(org.testng.annotations.Test)

Example 67 with VisualEditModePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject 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 68 with VisualEditModePageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject 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)

Example 69 with VisualEditModePageObject

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

the class ArticleFeaturesCRUDTestsUser method deleteGallery.

@Test(groups = { "ArticleFeaturesCRUDUser_002" })
@Execute(asUser = User.USER)
public void deleteGallery() {
    new ArticleContent().push("<gallery position=\"right\" columns=\"2\" spacing=\"medium\">\n" + "Image010.jpg\n" + "Image009.jpg\n" + "Image008.jpg\n" + "Image007.jpg\n" + "</gallery>");
    VisualEditModePageObject visualEditMode = new VisualEditModePageObject().open();
    visualEditMode.removeComponent(Components.GALLERY);
    visualEditMode.verifyComponentRemoved(Components.GALLERY);
}
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 70 with VisualEditModePageObject

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

the class ArticleCRUDAnonTests method articleCRUDAnon_editByURL.

@Test(groups = { "ArticleCRUDAnon_005" })
public void articleCRUDAnon_editByURL() {
    String articleContent = PageContent.ARTICLE_TEXT;
    ArticlePageObject article = new ArticlePageObject().open("AnonEditByURL");
    VisualEditModePageObject visualEditMode = article.navigateToArticleEditPage();
    visualEditMode.addContent(articleContent);
    visualEditMode.submitExpectingNotification().submitArticle();
    article.verifyContent(articleContent);
}
Also used : ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) Test(org.testng.annotations.Test)

Aggregations

VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)89 Test (org.testng.annotations.Test)81 Execute (com.wikia.webdriver.common.core.annotations.Execute)58 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)41 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)38 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)21 VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)17 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)12 SpecialCreatePage (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage)12 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)11 AddPhotoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.addphoto.AddPhotoComponentObject)9 BlogPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject)9 PreviewEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.PreviewEditModePageObject)7 DetachedRegisterPage (com.wikia.webdriver.pageobjectsfactory.pageobject.auth.register.DetachedRegisterPage)6 PhotoAddComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject)5 PhotoOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject)5 GalleryBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.gallery.GalleryBuilderComponentObject)4 VisualEditorPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.visualeditor.VisualEditorPageObject)4 SliderBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject)3 SlideshowBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.slideshow.SlideshowBuilderComponentObject)3