Search in sources :

Example 31 with VisualEditModePageObject

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

the class BlogTests method BlogTests_001_addFromProfile.

@Test(groups = { "BlogTests_001", "BlogTests", "Smoke1" })
public void BlogTests_001_addFromProfile() {
    WikiBasePageObject base = new WikiBasePageObject();
    base.loginAs(credentials.userName4, credentials.password4, wikiURL);
    String blogTitle = PageContent.BLOG_POST_NAME_PREFIX + base.getTimeStamp();
    String blogContent = PageContent.BLOG_CONTENT + base.getTimeStamp();
    UserProfilePageObject userProfile = base.openProfilePage(credentials.userName4, wikiURL);
    userProfile.clickOnBlogTab();
    SpecialCreatePage createBlogPage = userProfile.clickOnCreateBlogPost();
    VisualEditModePageObject visualEditMode = createBlogPage.populateTitleField(blogTitle);
    visualEditMode.addContent(blogContent);
    BlogPageObject blogPage = visualEditMode.submitBlog();
    blogPage.verifyBlogTitle(blogTitle);
    blogPage.verifyContent(blogContent);
}
Also used : BlogPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) UserProfilePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject) SpecialCreatePage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage) Test(org.testng.annotations.Test)

Example 32 with VisualEditModePageObject

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

the class ForcedLoginTests method anonCanLogInViaAuthModalWhenAddingPhoto.

@Test(groups = "ForcedLogin_anonCanLogInViaAuthModalWhenAddingPhoto")
public void anonCanLogInViaAuthModalWhenAddingPhoto() {
    WikiBasePageObject base = new WikiBasePageObject();
    String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    VisualEditModePageObject edit = base.navigateToArticleEditPage(wikiURL, articleName);
    edit.clickPhotoButton();
    DetachedSignInPage authModal = new DetachedRegisterPage().navigateToSignIn();
    authModal.login(credentials.userName10, credentials.password10);
    edit.verifyUserLoggedIn(credentials.userName10);
    assertTrue(edit.isStringInURL(articleName));
    assertTrue(edit.isStringInURL(URLsContent.ACTION_EDIT));
    PhotoAddComponentObject addPhoto = edit.clickPhotoButton();
    addPhoto.verifyAddPhotoModal();
}
Also used : DetachedRegisterPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.register.DetachedRegisterPage) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) DetachedSignInPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.DetachedSignInPage) PhotoAddComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject) Test(org.testng.annotations.Test)

Example 33 with VisualEditModePageObject

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

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

Example 35 with VisualEditModePageObject

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

the class CategoriesTestsEditMode method CategoriesTestsArticleEdit_003_anonSuggestions.

@Test(groups = { "CategoriesTestsArticleEdit_003", "CategoriesTestsArticleEditMode" })
public void CategoriesTestsArticleEdit_003_anonSuggestions() {
    WikiBasePageObject base = new WikiBasePageObject();
    String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    VisualEditModePageObject visual = base.navigateToArticleEditPage(wikiURL, articleName);
    visual.typeCategoryName(PageContent.CATEGORY_NAME_PREFIX);
    visual.triggerCategorySuggestions();
    String categoryName = visual.selectCategorySuggestions(1);
    visual.verifyCategoryPresent(categoryName);
}
Also used : VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) 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