use of com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject 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.UserProfilePageObject 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.UserProfilePageObject in project selenium-tests by Wikia.
the class FollowBlogTests method FollowBlog_001_setup.
@Test(groups = "FollowBlog")
@Execute(asUser = User.USER)
public void FollowBlog_001_setup() {
WikiBasePageObject base = new WikiBasePageObject();
UserProfilePageObject userProfile = base.openProfilePage(credentials.userName, wikiURL);
userProfile.clickOnBlogTab();
BlogPageObject blogPage = userProfile.openFirstPost();
blogTitle = blogPage.getBlogName();
WatchPageObject watch = blogPage.unfollowBlogPage();
watch.confirmWatchUnwatch();
blogPage.verifyPageUnfollowed();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject in project selenium-tests by Wikia.
the class UserAvatar method staffUserCanUploadAvatar.
@Test(groups = "UserAvatar_staffUserCanUploadAvatar")
@Execute(asUser = User.STAFF)
public void staffUserCanUploadAvatar() {
UserProfilePageObject profile = new UserProfilePageObject(driver).openProfilePage(credentials.userNameStaff, wikiURL);
AvatarComponentObject avatar = profile.clickEditAvatar();
profile.verifyAvatar();
String avatarUrl = profile.getAvatarImageSrc();
avatar.uploadAvatar(PageContent.FILE);
avatar.saveProfile();
profile.verifyAvatarChanged(avatarUrl);
String changedAvatarUrl = profile.getAvatarImageSrc();
profile.verifyAvatarVisible();
Assertion.assertNotEquals(changedAvatarUrl, avatarUrl);
profile.verifyURLStatus(200, changedAvatarUrl);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject in project selenium-tests by Wikia.
the class UserAvatar method userCanEnterHisProfileFromUserMenu.
@Test(groups = "UserAvatar_userCanEnterHisProfileFromUserMenu")
@Execute(asUser = User.STAFF)
public void userCanEnterHisProfileFromUserMenu() {
new SpecialVersionPage().open();
GlobalNavigation userAvatar = new GlobalNavigation();
userAvatar.clickUserAvatar().clickViewProfile();
UserProfilePageObject profile = new UserProfilePageObject(driver);
profile.verifyProfilePage(credentials.userNameStaff);
}
Aggregations