use of com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject in project selenium-tests by Wikia.
the class WikiActivityTests method WikiActivityTests_003_newBlogCreationIsRecordedOnActivityModule.
/**
* https://wikia-inc.atlassian.net/browse/DAR-1617
*/
@Test(groups = "WikiActivity_003")
@Execute(asUser = User.USER)
public void WikiActivityTests_003_newBlogCreationIsRecordedOnActivityModule() {
String blogTitle = PageContent.BLOG_POST_NAME_PREFIX + DateTime.now().getMillis();
String blogContent = PageContent.BLOG_CONTENT + DateTime.now().getMillis();
UserProfilePageObject userProfile = new WikiBasePageObject().openProfilePage(credentials.userName, 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);
new SpecialWikiActivityPageObject(driver).open().verifyRecentNewBlogPage(blogContent, blogTitle, credentials.userName);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject in project selenium-tests by Wikia.
the class BlogCommentsTests method BlogComments_003_User_editComment.
@Test(groups = "BlogComments_003")
@Execute(asUser = User.USER)
public void BlogComments_003_User_editComment() {
WikiBasePageObject base = new WikiBasePageObject();
UserProfilePageObject userProfile = base.openProfilePage(credentials.userName, wikiURL);
userProfile.clickOnBlogTab();
BlogPageObject blogPage = userProfile.openFirstPost();
MiniEditorComponentObject editor = blogPage.triggerCommentArea();
String comment = PageContent.COMMENT_TEXT + blogPage.getTimeStamp();
editor.switchAndWrite(comment);
blogPage.submitComment();
blogPage.verifyCommentText(comment);
blogPage.verifyCommentCreator(credentials.userName);
blogPage.triggerEditCommentArea();
String commentEdited = PageContent.COMMENT_TEXT + blogPage.getTimeStamp();
editor.switchAndEditComment(commentEdited);
blogPage.submitEditComment();
blogPage.verifyCommentText(commentEdited);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject in project selenium-tests by Wikia.
the class BlogTests method BlogTests_005_move.
@Test(groups = { "BlogTests_005", "BlogTests" })
public void BlogTests_005_move() {
WikiBasePageObject base = new WikiBasePageObject();
base.loginAs(credentials.userNameStaff, credentials.passwordStaff, wikiURL);
String blogTitleMove = PageContent.BLOG_POST_NAME_PREFIX + base.getTimeStamp();
UserProfilePageObject userProfile = base.openProfilePage(credentials.userName, wikiURL);
userProfile.clickOnBlogTab();
BlogPageObject blogPage = userProfile.openFirstPost();
RenamePageObject renamePage = blogPage.renameUsingDropdown();
renamePage.rename(credentials.userNameStaff + "/" + blogTitleMove, true);
blogPage.verifyBlogTitle(blogTitleMove);
List<Notification> confirmNotifications = blogPage.getNotifications(NotificationType.CONFIRM);
Assertion.assertEquals(confirmNotifications.size(), 1, RenamePageObject.AssertionMessages.INVALID_NUMBER_OF_CONFIRMING_NOTIFICATIONS);
Assertion.assertTrue(confirmNotifications.stream().findFirst().get().isVisible(), RenamePageObject.AssertionMessages.BANNER_NOTIFICATION_NOT_VISIBLE);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject 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);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject in project selenium-tests by Wikia.
the class UserAvatar method staffUserCanRemoveAvatar.
@Test(groups = "UserAvatar_staffUserCanRemoveAvatar", dependsOnMethods = "staffUserCanUploadAvatar")
@Execute(asUser = User.STAFF)
public void staffUserCanRemoveAvatar() {
UserProfilePageObject profile = new UserProfilePageObject(driver).openProfilePage(credentials.userNameStaff, wikiURL);
String avatarUrl = profile.getAvatarImageSrc();
profile.clickRemoveAvatar();
profile.verifyAvatar();
//user needs to visit other page to get avatar refreshed
profile.openWikiPage();
UserProfilePageObject changedProfile = new UserProfilePageObject(driver).openProfilePage(credentials.userNameStaff, wikiURL);
changedProfile.verifyAvatarChanged(avatarUrl);
String changedAvatarUrl = changedProfile.getAvatarImageSrc();
changedProfile.verifyAvatarVisible();
Assertion.assertNotEquals(changedAvatarUrl, avatarUrl);
changedProfile.verifyURLStatus(200, changedAvatarUrl);
}
Aggregations