use of com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumPage in project selenium-tests by Wikia.
the class ForumNotificationsTests method userIsNotifiedWhenRegularAndStaffUsersReplyToHerDiscussion.
@Test(groups = { "ForumNotificationsTests_004", "ForumNotificationsTests", "NotificationsTests" }, dependsOnMethods = { "forumNotificationsTests_003_userCLeavesReply", "forumNotificationsTests_002_userBLeavesReply", "forumNotificationsTests_001_userAStartsDiscussion" })
@Execute(asUser = User.USER)
public void userIsNotifiedWhenRegularAndStaffUsersReplyToHerDiscussion() {
ForumPage forumMainPage = new ForumPage();
NotificationsComponentObject notifications = new NotificationsComponentObject(driver);
forumMainPage.openForumMainPage(wikiURL);
notifications.showNotifications();
String anchoredLink = null;
try {
anchoredLink = notifications.getNotificationLink(User.STAFF.getUserName() + " and " + User.USER_2.getUserName() + " replied to your thread on the " + URLDecoder.decode(forumBoardTitle, "UTF-8").replace("_", " "));
} catch (UnsupportedEncodingException e) {
PageObjectLogging.logError("Could not decode forum board name", e);
}
String anchor = anchoredLink.substring(anchoredLink.indexOf("#"));
Assertion.assertEquals(anchor, "#2");
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumPage in project selenium-tests by Wikia.
the class ForumAnonTests method anonymousUserCanReplyToThreadOnForum.
@Test(groups = { "ForumAnonTests_002" })
public void anonymousUserCanReplyToThreadOnForum() {
ForumPage forumMainPage = new ForumPage();
String title = String.format(PageContent.FORUM_TITLE_PREFIX, forumMainPage.getTimeStamp());
String message = String.format(PageContent.FORUM_MESSAGE, forumMainPage.getTimeStamp());
forumMainPage.openForumMainPage(wikiURL);
ForumBoardPage forumBoard = forumMainPage.openForumBoard();
ForumThreadPageObject forumThread = forumBoard.startDiscussion(title, message, false);
forumThread.verifyDiscussionTitleAndMessage(title, message);
forumThread.reply(message);
forumThread.verifyReplyMessage(1, message);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumPage in project selenium-tests by Wikia.
the class ForumEditModeTests method adminUserCanCreateNewBoard.
@Test(dataProvider = "getForumName", groups = { "ForumEditModeTests_002" })
@Execute(asUser = User.USER_ADMIN_FORUM)
public void adminUserCanCreateNewBoard(String name) {
ForumPage forumMainPage = new ForumPage();
forumMainPage.openForumMainPage(wikiURL);
ForumManageBoardsPageObject manageForum = forumMainPage.clickManageBoardsButton();
title = name + manageForum.getTimeStamp();
description = PageContent.FORUM_DESCRIPTION_PREFIX + manageForum.getTimeStamp();
manageForum.createNewBoard(title, description);
manageForum.verifyBoardCreated(title, description);
manageForum.verifyForumExists(title, wikiURL);
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumPage in project selenium-tests by Wikia.
the class ForumThreadTests method threadHistoryPageContainsTableAndCells.
@Execute(asUser = User.STAFF)
@Test(groups = { "ForumThreadTests_004" })
public void threadHistoryPageContainsTableAndCells() {
ForumPage forumMainPage = new ForumPage();
String title = String.format(PageContent.FORUM_TITLE_PREFIX, forumMainPage.getTimeStamp());
String message = String.format(PageContent.FORUM_MESSAGE, forumMainPage.getTimeStamp());
forumMainPage.openForumMainPage(wikiURL);
ForumBoardPage forumBoard = forumMainPage.openForumBoard();
ForumThreadPageObject forumThread = forumBoard.startDiscussion(title, message, false);
forumThread.verifyDiscussionTitleAndMessage(title, message);
ForumHistoryPageObject forumHistory = forumThread.openHistory();
forumHistory.verifyImportandPageElements();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumPage in project selenium-tests by Wikia.
the class ForumThreadTests method staffUserCanRemoveThreadAndUndoRemoval.
@Execute(asUser = User.STAFF)
@Test(groups = { "ForumThreadTests_002", "Forum" })
public void staffUserCanRemoveThreadAndUndoRemoval() {
ForumPage forumMainPage = new ForumPage();
String title = String.format(PageContent.FORUM_TITLE_PREFIX, forumMainPage.getTimeStamp());
String message = String.format(PageContent.FORUM_MESSAGE, forumMainPage.getTimeStamp());
forumMainPage.openForumMainPage(wikiURL);
ForumBoardPage forumBoard = forumMainPage.openForumBoard();
ForumThreadPageObject forumThread = forumBoard.startDiscussion(title, message, false);
forumThread.verifyDiscussionTitleAndMessage(title, message);
forumThread.removeThread("QA reason");
forumThread.verifyThreadRemoved();
forumThread.undoRemove();
forumThread.verifyDiscussionTitleAndMessage(title, message);
}
Aggregations