Search in sources :

Example 16 with ForumPage

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

the class ForumThreadTests method staffUserCanReplyToForumThread.

@Execute(asUser = User.STAFF)
@Test(groups = { "ForumThreadTests_001", "Smoke3" })
public void staffUserCanReplyToForumThread() {
    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);
}
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 17 with ForumPage

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

the class ForumBoardTests method anonymousUserCanStartDiscussionWithImageOnForum.

@Test(groups = { "ForumBoardTests_003" })
@Execute(asUser = User.STAFF)
public void anonymousUserCanStartDiscussionWithImageOnForum() {
    ForumPage forumMainPage = new ForumPage();
    String title = String.format(PageContent.FORUM_TITLE_PREFIX, forumMainPage.getTimeStamp());
    forumMainPage.openForumMainPage(wikiURL);
    ForumBoardPage forumBoard = forumMainPage.openForumBoard();
    forumBoard.startDiscussionWithImage(title);
    forumBoard.clickPostButton();
    forumBoard.verifyDiscussionWithImage();
}
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 18 with ForumPage

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

the class ForumBoardTests method anonymousUserCanStartDiscussionWithVideoOnForum.

@Test(groups = { "ForumBoardTests_005" })
@Execute(asUser = User.STAFF)
public void anonymousUserCanStartDiscussionWithVideoOnForum() {
    ForumPage forumMainPage = new ForumPage();
    String title = String.format(PageContent.FORUM_TITLE_PREFIX, forumMainPage.getTimeStamp());
    forumMainPage.openForumMainPage(wikiURL);
    ForumBoardPage forumBoard = forumMainPage.openForumBoard();
    forumBoard.startDiscussionWithVideo(VideoContent.YOUTUBE_VIDEO_URL3, title);
    forumBoard.clickPostButton();
}
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 19 with ForumPage

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

the class ForumEditModeTests method adminUserCanDeleteBoard.

@Test(groups = { "ForumEditModeTests_003" })
@Execute(asUser = User.USER_ADMIN_FORUM)
public void adminUserCanDeleteBoard() {
    ForumPage forumMainPage = new ForumPage();
    forumMainPage.openForumMainPage(wikiURL);
    ForumManageBoardsPageObject manageForum = forumMainPage.clickManageBoardsButton();
    first = manageForum.getFirstForumName();
    second = manageForum.getSecondForumName();
    manageForum.verifyForumExists(first, wikiURL);
    manageForum.deleteForum(first, second);
    manageForum.verifyForumNotExists(first, wikiURL);
}
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 20 with ForumPage

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

the class ForumEditModeTests method adminUserCanEditForum.

@Test(groups = { "ForumEditModeTests_004" })
@Execute(asUser = User.USER_ADMIN_FORUM)
public void adminUserCanEditForum() {
    ForumPage forumMainPage = new ForumPage();
    forumMainPage.openForumMainPage(wikiURL);
    ForumManageBoardsPageObject manageForum = forumMainPage.clickManageBoardsButton();
    first = manageForum.getFirstForumName();
    title = PageContent.FORUM_TITLE_EDIT_PREFIX + manageForum.getTimeStamp();
    description = PageContent.FORUM_DESCRIPTION_EDIT_PREFIX + manageForum.getTimeStamp();
    manageForum.editForum(first, title, description);
    manageForum.verifyBoardCreated(title, description);
    manageForum.verifyForumExists(title, wikiURL);
}
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)

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