Search in sources :

Example 1 with ForumThreadPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumThreadPageObject in project selenium-tests by Wikia.

the class ForumThreadTests method staffUserCanMoveThreadToOtherBoard.

@Execute(asUser = User.STAFF)
@RelatedIssue(issueID = "SUS-1770", comment = "Test wont pass until product is fixed, don't bother reruning")
@Test(groups = { "ForumThreadTests_003" })
public void staffUserCanMoveThreadToOtherBoard() {
    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.verifyParentBoard(forumThread.moveThread());
}
Also used : ForumThreadPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumThreadPageObject) ForumBoardPage(com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumBoardPage) ForumPage(com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Example 2 with ForumThreadPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumThreadPageObject in project selenium-tests by Wikia.

the class ForumThreadTests method staffUserCanCloseAndReopenThread.

@Execute(asUser = User.STAFF)
@Test(groups = { "ForumThreadTests_005" })
public void staffUserCanCloseAndReopenThread() {
    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.closeThread(PageContent.CLOSE_REASON);
    forumThread.verifyThreadClosed();
    forumThread.reopenThread();
    forumThread.verifyThreadReopened();
}
Also used : ForumThreadPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumThreadPageObject) ForumBoardPage(com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumBoardPage) ForumPage(com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 3 with ForumThreadPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumThreadPageObject in project selenium-tests by Wikia.

the class ForumBoardTests method staffUserCanStartDiscussionOnForum.

@Test(groups = { "ForumBoardTests_001", "Smoke3" })
@Execute(asUser = User.STAFF)
public void staffUserCanStartDiscussionOnForum() {
    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);
}
Also used : ForumThreadPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumThreadPageObject) ForumBoardPage(com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumBoardPage) ForumPage(com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 4 with ForumThreadPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumThreadPageObject in project selenium-tests by Wikia.

the class ForumBoardTests method anonymousUserCanStartDiscussionWithoutTitleOnForum.

@Test(groups = { "ForumBoardTests_002" })
@Execute(asUser = User.STAFF)
public void anonymousUserCanStartDiscussionWithoutTitleOnForum() {
    ForumPage forumMainPage = new ForumPage();
    String message = String.format(PageContent.FORUM_MESSAGE, forumMainPage.getTimeStamp());
    forumMainPage.openForumMainPage(wikiURL);
    ForumBoardPage forumBoard = forumMainPage.openForumBoard();
    ForumThreadPageObject forumThread = forumBoard.startDiscussionWithoutTitle(message);
    // "Message from" default title appears after posting message without title
    forumThread.verifyDiscussionTitleAndMessage("Message from", message);
}
Also used : ForumThreadPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumThreadPageObject) ForumBoardPage(com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumBoardPage) ForumPage(com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 5 with ForumThreadPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumThreadPageObject in project selenium-tests by Wikia.

the class ForumAnonTests method anonymousUserCanStartDiscussionOnForum.

@Test(groups = { "ForumAnonTest_001" })
public void anonymousUserCanStartDiscussionOnForum() {
    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);
}
Also used : ForumThreadPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumThreadPageObject) ForumBoardPage(com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumBoardPage) ForumPage(com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumPage) Test(org.testng.annotations.Test)

Aggregations

ForumBoardPage (com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumBoardPage)11 ForumThreadPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumThreadPageObject)11 ForumPage (com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumPage)10 Test (org.testng.annotations.Test)10 Execute (com.wikia.webdriver.common.core.annotations.Execute)8 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)1 ForumHistoryPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumHistoryPageObject)1