use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject 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();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject in project selenium-tests by Wikia.
the class BlogFeaturesTests method BlogFeatures_001_AddingGallery.
@Test(groups = { "BlogFeatures_001", "BlogFeaturesTests" })
@Execute(asUser = User.USER)
public void BlogFeatures_001_AddingGallery() {
WikiBasePageObject base = new WikiBasePageObject();
SpecialCreatePage createPage = base.openSpecialCreateBlogPage(wikiURL);
String blogPostTitle = PageContent.BLOG_POST_NAME_PREFIX + createPage.getTimeStamp();
VisualEditModePageObject blogEdit = createPage.populateTitleField(blogPostTitle);
GalleryBuilderComponentObject galleryBuiler = blogEdit.clickGalleryButton();
AddPhotoComponentObject galleryAddPhoto = galleryBuiler.clickAddPhoto();
galleryAddPhoto.search("image");
galleryAddPhoto.choosePhotos(4);
galleryAddPhoto.clickSelect();
galleryBuiler.adjustPosition(PositionsGallery.CENTER);
galleryBuiler.adjustColumns("2");
galleryBuiler.adjustSpacing(SpacingGallery.SMALL);
galleryBuiler.adjustOrientation(Orientation.LANDSCAPE);
galleryBuiler.clickFinish();
blogEdit.verifyGallery();
BlogPageObject blogPage = blogEdit.submitBlog();
blogPage.verifyGallery();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject in project selenium-tests by Wikia.
the class BlogTests method BlogTests_003_editFromProfile.
@Test(groups = { "BlogTests_003", "BlogTests" })
@Execute(asUser = User.USER)
public void BlogTests_003_editFromProfile() {
WikiBasePageObject base = new WikiBasePageObject();
String blogContent = PageContent.BLOG_CONTENT + base.getTimeStamp();
UserProfilePageObject userProfile = base.openProfilePage(credentials.userName, wikiURL);
userProfile.clickOnBlogTab();
BlogPageObject blogPage = userProfile.openFirstPost();
String blogTitle = blogPage.getBlogName();
VisualEditModePageObject visualEditMode = blogPage.openCKModeWithMainEditButton();
visualEditMode.addContent(blogContent);
visualEditMode.submitArticle();
blogPage.verifyBlogTitle(blogTitle);
blogPage.verifyContent(blogContent);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject in project selenium-tests by Wikia.
the class BlogTests method BlogTests_004_deleteUndelete.
@Test(groups = { "BlogTests_004", "BlogTests" })
public void BlogTests_004_deleteUndelete() {
WikiBasePageObject base = new WikiBasePageObject();
base.loginAs(credentials.userNameStaff, credentials.passwordStaff, wikiURL);
UserProfilePageObject userProfile = base.openProfilePage(credentials.userName4, wikiURL);
userProfile.clickOnBlogTab();
BlogPageObject blogPage = userProfile.openFirstPost();
String blogTitle = blogPage.getBlogName();
DeletePageObject deletePage = blogPage.deleteUsingDropdown();
deletePage.submitDeletion();
List<Notification> confirmNotifications = base.getNotifications(NotificationType.CONFIRM);
Assertion.assertEquals(confirmNotifications.size(), 1, DeletePageObject.AssertionMessages.INVALID_NUMBER_OF_CONFIRMING_NOTIFICATIONS);
SpecialRestorePageObject restore = base.getNotifications(NotificationType.CONFIRM).stream().findFirst().get().undelete();
restore.giveReason(blogPage.getTimeStamp());
restore.restorePage();
confirmNotifications = blogPage.getNotifications(NotificationType.CONFIRM);
Assertion.assertEquals(confirmNotifications.size(), 1, SpecialRestorePageObject.AssertionMessages.INVALID_NUMBER_OF_CONFIRMING_NOTIFICATIONS);
Assertion.assertTrue(confirmNotifications.stream().findFirst().get().isVisible(), SpecialRestorePageObject.AssertionMessages.BANNER_NOTIFICATION_NOT_VISIBLE);
blogPage.verifyBlogTitle(blogTitle);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject in project selenium-tests by Wikia.
the class ArticleSourceModeTests method RTE_016_Video.
@Test(groups = { "RTE_extended_3", "RTE_extended_016", "Media" })
public void RTE_016_Video() {
WikiBasePageObject base = new WikiBasePageObject();
String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
ArticlePageObject article = new ArticlePageObject().open(articleName);
SourceEditModePageObject source = article.openCurrectArticleSourceMode();
VetAddVideoComponentObject vetAddingVideo = source.clickAddVideo();
VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
vetOptions.setCaption(PageContent.CAPTION);
vetOptions.submit();
source.checkSourceVideoContent("[[" + VideoContent.YOUTUBE_VIDEO_WIKITEXT + PageContent.CAPTION + "]]");
}
Aggregations