Search in sources :

Example 11 with MiniEditorComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject in project selenium-tests by Wikia.

the class MessageWallTests method userCanCreateAndReplyToMessage.

@Test(groups = { "MessageWall_006", "MessageWall", "MessageWallTests" })
@Execute(asUser = User.USER)
public void userCanCreateAndReplyToMessage() {
    MessageWall wall = new MessageWall(driver).open(User.USER.getUserName());
    MiniEditorComponentObject mini = wall.triggerMessageArea();
    String message = PageContent.MESSAGE_WALL_MESSAGE_PREFIX + wall.getTimeStamp();
    String title = PageContent.MESSAGE_WALL_TITLE_PREFIX + wall.getTimeStamp();
    mini.switchAndWrite(message);
    wall.setTitle(title);
    wall.submit();
    wall.verifyMessageText(title, message, User.USER.getUserName());
    MiniEditorComponentObject miniReply = wall.triggerReplyMessageArea();
    String reply = PageContent.MESSAGE_WALL_QUOTE_PREFIX + wall.getTimeStamp();
    miniReply.switchAndQuoteMessageWall(reply);
    wall.submitQuote();
    wall.verifyQuote(reply);
}
Also used : MessageWall(com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall) MiniEditorComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 12 with MiniEditorComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject in project selenium-tests by Wikia.

the class MessageWallTests method userCanCreateAndQuoteMessage.

@Test(groups = { "MessageWall_004", "MessageWall", "MessageWallTests" })
@Execute(asUser = User.STAFF)
public void userCanCreateAndQuoteMessage() {
    MessageWall wall = new MessageWall(driver).open(User.STAFF.getUserName());
    MiniEditorComponentObject mini = wall.triggerMessageArea();
    String message = PageContent.MESSAGE_WALL_MESSAGE_PREFIX + wall.getTimeStamp();
    String title = PageContent.MESSAGE_WALL_TITLE_PREFIX + wall.getTimeStamp();
    mini.switchAndWrite(message);
    wall.setTitle(title);
    wall.submit();
    wall.verifyMessageText(title, message, User.STAFF.getUserName());
    MiniEditorComponentObject miniQuote = wall.clickQuoteButton();
    String quote = PageContent.MESSAGE_WALL_QUOTE_PREFIX + wall.getTimeStamp();
    miniQuote.switchAndQuoteMessageWall(quote);
    wall.submitQuote();
    wall.verifyQuote(quote);
}
Also used : MessageWall(com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall) MiniEditorComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 13 with MiniEditorComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject in project selenium-tests by Wikia.

the class MessageWallTests method newWallPostTitleIsShownInWikiActivity.

/**
   * SUS-1309: Regression test to ensure title, content, author info of new Thread shows properly in Wiki Activity
   */
@Test(groups = { "MessageWall_009", "MessageWall", "MessageWallTests" })
@Execute(asUser = User.USER)
public void newWallPostTitleIsShownInWikiActivity() {
    MessageWall wall = new MessageWall(driver).open(User.USER.getUserName());
    MiniEditorComponentObject mini = wall.triggerMessageArea();
    String message = PageContent.MESSAGE_WALL_MESSAGE_PREFIX + MessageWall.getTimeStamp();
    String title = PageContent.MESSAGE_WALL_TITLE_PREFIX + MessageWall.getTimeStamp();
    mini.switchAndWrite(message);
    wall.setTitle(title);
    wall.submit();
    wall.verifyMessageText(title, message, User.USER.getUserName());
    new SpecialWikiActivityPageObject(driver).open().verifyNewWallThreadEntry(title, message, User.USER.getUserName());
}
Also used : MessageWall(com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall) MiniEditorComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject) SpecialWikiActivityPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialWikiActivityPageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 14 with MiniEditorComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject in project selenium-tests by Wikia.

the class MessageWallTests method userCanPreviewMessageWallThreadWhenDiscussionsEnabled.

@Test(groups = "MessageWallTests")
@RelatedIssue(issueID = "IRIS-4352")
@Execute(onWikia = MercuryWikis.DISCUSSIONS_5, asUser = User.USER_3)
public void userCanPreviewMessageWallThreadWhenDiscussionsEnabled() {
    MessageWall wall = new MessageWall(driver).open(User.USER.getUserName());
    MiniEditorComponentObject mini = wall.triggerMessageArea();
    String message = PageContent.MESSAGE_WALL_MESSAGE_PREFIX + wall.getTimeStamp();
    String title = PageContent.MESSAGE_WALL_TITLE_PREFIX + wall.getTimeStamp();
    mini.switchAndWrite(message);
    wall.setTitle(title);
    wall.submit();
    wall.verifyMessageText(title, message, User.USER_3.getUserName());
    Assertion.assertStringContains(wall.openThread(title).getMessageContents(), message);
}
Also used : MessageWall(com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall) MiniEditorComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Example 15 with MiniEditorComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject in project selenium-tests by Wikia.

the class MessageWallTests method blockedUserCanCreatePostOnHerMessageWall.

/**
   * DAR-2133 bug prevention test case details jira: https://wikia-inc.atlassian.net/browse/DAR-2133
   * pre: test makes sure that QATestsBlockedUser is blocked on tested wikia. 1. user
   * QATestsBlockedUser is allowed to post on his own MessageWall 2. as QATestsBlockedUser go to his
   * messageWall 3. QATestsBlockedUser should be able to post on his MessageWall 4.
   * QATestsBlockedUser should be able to respond on his MessageWall
   */
@Test(groups = { "MessageWall_008", "MessageWall", "MessageWallTests" })
public void blockedUserCanCreatePostOnHerMessageWall() {
    SpecialBlockListPage blockListPage = new SpecialBlockListPage().open();
    boolean isUserBlocked = blockListPage.isUserBlocked(User.CONSTANTLY_BLOCKED_USER.getUserName());
    if (!isUserBlocked) {
        blockListPage.loginAs(User.STAFF.getUserName(), User.STAFF.getPassword(), wikiURL);
        SpecialBlockPage blockPage = new SpecialBlockPage(driver).open();
        blockPage.typeInUserName(User.CONSTANTLY_BLOCKED_USER.getUserName());
        blockPage.typeExpiration("10 year");
        blockPage.typeReason("block QATestsBlockedUser");
        blockPage.deselectAllSelections();
        blockPage.clickBlockButton();
    }
    blockListPage.loginAs(User.CONSTANTLY_BLOCKED_USER.getUserName(), User.CONSTANTLY_BLOCKED_USER.getPassword(), wikiURL);
    MessageWall wall = new MessageWall(driver).open(User.CONSTANTLY_BLOCKED_USER.getUserName());
    MiniEditorComponentObject mini = wall.triggerMessageArea();
    String message = PageContent.MESSAGE_WALL_MESSAGE_PREFIX + wall.getTimeStamp();
    String title = PageContent.MESSAGE_WALL_TITLE_PREFIX + wall.getTimeStamp();
    mini.switchAndWrite(message);
    wall.setTitle(title);
    wall.submit();
    wall.verifyMessageText(title, message, User.CONSTANTLY_BLOCKED_USER.getUserName());
    MiniEditorComponentObject miniReply = wall.triggerReplyMessageArea();
    String reply = PageContent.MESSAGE_WALL_QUOTE_PREFIX + wall.getTimeStamp();
    miniReply.switchAndQuoteMessageWall(reply);
    wall.submitQuote();
    wall.verifyQuote(reply);
}
Also used : MessageWall(com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall) MiniEditorComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject) SpecialBlockPage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.block.SpecialBlockPage) SpecialBlockListPage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.block.SpecialBlockListPage) Test(org.testng.annotations.Test)

Aggregations

MiniEditorComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorComponentObject)34 Test (org.testng.annotations.Test)32 MessageWall (com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall)22 Execute (com.wikia.webdriver.common.core.annotations.Execute)19 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)13 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)6 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)6 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)5 VetAddVideoComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject)4 UserProfilePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.UserProfilePageObject)4 BlogPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject)4 VetOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetOptionsComponentObject)3 Notification (com.wikia.webdriver.elements.oasis.components.notifications.Notification)2 DeletePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.actions.DeletePageObject)2 MessageWallCloseRemoveThreadPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWallCloseRemoveThreadPageObject)2 MessageWallThreadPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWallThreadPageObject)2 WebElement (org.openqa.selenium.WebElement)2 YoutubeVideo (com.wikia.webdriver.common.core.video.YoutubeVideo)1 MiniEditorPreviewComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.minieditor.MiniEditorPreviewComponentObject)1 SpecialWikiActivityPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialWikiActivityPageObject)1