Search in sources :

Example 6 with ForumPage

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

the class ForumBoardTests method anonymousUserCanStartDiscussionWithLinkOnForum.

@Test(groups = { "ForumBoardTests_004" })
@Execute(asUser = User.STAFF)
public void anonymousUserCanStartDiscussionWithLinkOnForum() {
    String externalLink = PageContent.EXTERNAL_LINK;
    String internalLink = PageContent.REDIRECT_LINK;
    ForumPage forumMainPage = new ForumPage();
    String title = String.format(PageContent.FORUM_TITLE_PREFIX, forumMainPage.getTimeStamp());
    forumMainPage.openForumMainPage(wikiURL);
    ForumBoardPage forumBoard = forumMainPage.openForumBoard();
    forumBoard.startDiscussionWithLink(internalLink, externalLink, title);
    forumBoard.clickPostButton();
    forumBoard.verifyStartedDiscussionWithLinks(internalLink, externalLink);
}
Also used : 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 7 with ForumPage

use of com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumPage 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 8 with ForumPage

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

the class ForumEditModeTests method adminUserCanMoveBoard.

@Test(groups = { "Forum_005", "Forum" })
@Execute(asUser = User.USER_ADMIN_FORUM)
public void adminUserCanMoveBoard() {
    ForumPage forumMainPage = new ForumPage();
    forumMainPage.openForumMainPage(wikiURL);
    ForumManageBoardsPageObject manageForum = forumMainPage.clickManageBoardsButton();
    first = manageForum.getFirstForumName();
    manageForum.clickMoveDown(first);
    second = manageForum.getSecondForumName();
    manageForum.clickMoveUp(second);
}
Also used : ForumManageBoardsPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumManageBoardsPageObject) ForumPage(com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 9 with ForumPage

use of com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumPage 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)

Example 10 with ForumPage

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

the class ForumNotificationsTests method forumNotificationsTests_001_userAStartsDiscussion.

/**
   * Test case created to check possible regression of DAR-112 defect
   * <p/>
   * https://wikia-inc.atlassian.net/browse/DAR-112
   */
@Test(groups = { "ForumNotificationsTests_001", "ForumNotificationsTests", "NotificationsTests" })
@Execute(asUser = User.USER)
public void forumNotificationsTests_001_userAStartsDiscussion() {
    ForumPage forumMainPage = new ForumPage();
    title = String.format(PageContent.FORUM_TITLE_PREFIX, forumMainPage.getTimeStamp());
    message = String.format(PageContent.FORUM_MESSAGE, forumMainPage.getTimeStamp());
    forumMainPage.openForumMainPage(wikiURL);
    ForumBoardPage forumBoard = forumMainPage.openForumBoard();
    forumBoardTitle = forumBoard.getTitle();
    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)

Aggregations

ForumPage (com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumPage)20 Test (org.testng.annotations.Test)20 Execute (com.wikia.webdriver.common.core.annotations.Execute)18 ForumBoardPage (com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumBoardPage)14 ForumThreadPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumThreadPageObject)10 ForumManageBoardsPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumManageBoardsPageObject)4 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)1 NotificationsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.global_navitagtion.NotificationsComponentObject)1 ForumHistoryPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.forumpageobject.ForumHistoryPageObject)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1