Search in sources :

Example 6 with SpecialCreatePage

use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage in project selenium-tests by Wikia.

the class BlogFeaturesTests method BlogFeatures_003_AddingSlider.

@Test(groups = { "BlogFeatures_003", "BlogFeaturesTests" })
@Execute(asUser = User.USER)
public void BlogFeatures_003_AddingSlider() {
    WikiBasePageObject base = new WikiBasePageObject();
    SpecialCreatePage createPage = base.openSpecialCreateBlogPage(wikiURL);
    String blogPostTitle = PageContent.BLOG_POST_NAME_PREFIX + createPage.getTimeStamp();
    VisualEditModePageObject blogEdit = createPage.populateTitleField(blogPostTitle);
    SliderBuilderComponentObject sliderBuilder = blogEdit.clickSliderButton();
    sliderBuilder.selectMenuPosition(MenuPositions.VERTICAL);
    AddPhotoComponentObject sliderAddPhoto = sliderBuilder.clickAddPhoto();
    sliderAddPhoto.search("image");
    sliderAddPhoto.choosePhotos(4);
    sliderAddPhoto.clickSelect();
    sliderBuilder.clickFinish();
    blogEdit.verifySlider();
    BlogPageObject blogPage = blogEdit.submitBlog();
    blogPage.verifySlider();
}
Also used : SliderBuilderComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject) BlogPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) AddPhotoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.addphoto.AddPhotoComponentObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) SpecialCreatePage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 7 with SpecialCreatePage

use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage in project selenium-tests by Wikia.

the class BlogTests method BlogTests_002_addByUrl.

@Test(dataProviderClass = ArticleDataProvider.class, dataProvider = "articleTitles", groups = { "BlogTests_002", "BlogTests" })
@Execute(asUser = User.USER)
public void BlogTests_002_addByUrl(String blogTitle) {
    WikiBasePageObject base = new WikiBasePageObject();
    String blogContent = PageContent.BLOG_CONTENT + base.getTimeStamp();
    String randomBlogTitle = blogTitle + base.getTimeStamp();
    SpecialCreatePage createBlogPage = base.openSpecialCreateBlogPage(wikiURL);
    VisualEditModePageObject visualEditMode = createBlogPage.populateTitleField(randomBlogTitle);
    visualEditMode.addContent(blogContent);
    BlogPageObject blogPage = visualEditMode.submitBlog();
    blogPage.verifyBlogTitle(randomBlogTitle);
    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) SpecialCreatePage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 8 with SpecialCreatePage

use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage 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 9 with SpecialCreatePage

use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage in project selenium-tests by Wikia.

the class BlogFeaturesTests method addingImage.

@Test(groups = { "BlogFeatures_005", "BlogFeaturesTests" })
@Execute(asUser = User.USER)
public void addingImage() {
    WikiBasePageObject base = new WikiBasePageObject();
    SpecialCreatePage createPage = base.openSpecialCreateBlogPage(wikiURL);
    String blogPostTitle = PageContent.BLOG_POST_NAME_PREFIX + createPage.getTimeStamp();
    VisualEditModePageObject blogEdit = createPage.populateTitleField(blogPostTitle);
    PhotoAddComponentObject photoAddPhoto = blogEdit.clickPhotoButton();
    PhotoOptionsComponentObject photoOptions = photoAddPhoto.addPhotoFromWiki("image", 1);
    photoOptions.setCaption(PageContent.CAPTION);
    photoOptions.clickAddPhoto();
    blogEdit.verifyPhoto();
    BlogPageObject blogPage = blogEdit.submitBlog();
    blogPage.verifyPhoto();
}
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) SpecialCreatePage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage) PhotoAddComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject) PhotoOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 10 with SpecialCreatePage

use of com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage in project selenium-tests by Wikia.

the class BlogFeaturesTests method BlogFeatures_004_AddingVideo.

@Test(groups = { "BlogFeatures_004", "BlogFeaturesTests", "Media" })
@Execute(asUser = User.USER, onWikia = "mobileregressiontesting")
public void BlogFeatures_004_AddingVideo() {
    WikiBasePageObject base = new WikiBasePageObject();
    SpecialCreatePage createPage = base.openSpecialCreateBlogPage(wikiURL);
    String blogPostTitle = PageContent.BLOG_POST_NAME_PREFIX + createPage.getTimeStamp();
    VisualEditModePageObject blogEdit = createPage.populateTitleField(blogPostTitle);
    VetAddVideoComponentObject vetAddVideo = blogEdit.clickVideoButton();
    VetOptionsComponentObject vetOptions = vetAddVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
    vetOptions.setCaption(PageContent.CAPTION);
    vetOptions.submit();
    blogEdit.verifyVideo();
    BlogPageObject blogPage = blogEdit.submitBlog();
    blogPage.verifyVideo();
}
Also used : VetOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject) 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) VetAddVideoComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject) SpecialCreatePage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Aggregations

VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)12 SpecialCreatePage (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage)12 Test (org.testng.annotations.Test)12 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)10 Execute (com.wikia.webdriver.common.core.annotations.Execute)9 BlogPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject)8 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)4 AddPhotoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.addphoto.AddPhotoComponentObject)3 UserProfilePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject)2 SpecialWikiActivityPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialWikiActivityPageObject)2 GalleryBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.gallery.GalleryBuilderComponentObject)1 PhotoAddComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject)1 PhotoOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject)1 SliderBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.slider.SliderBuilderComponentObject)1 SlideshowBuilderComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.slideshow.SlideshowBuilderComponentObject)1 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)1 VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)1 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)1