Search in sources :

Example 1 with ReplyCreator

use of com.wikia.webdriver.elements.mercury.components.discussions.common.ReplyCreator in project selenium-tests by Wikia.

the class CreatingReplyTests method userOnDesktopShouldFollowPostWhenAddedReplyOnPostDetailsPage.

@Test(groups = DESKTOP)
@Execute(asUser = User.USER_2)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void userOnDesktopShouldFollowPostWhenAddedReplyOnPostDetailsPage() {
    final PostDetailsPage page = new PostDetailsPage().open(createPostAsUserRemotely().getId());
    final ReplyCreator replyCreator = page.getReplyCreatorDesktop();
    assertThatPostIsFollowedWhenReplyAdded(page, replyCreator);
    assertThatPostCanBeUnfollowed(page);
}
Also used : ReplyCreator(com.wikia.webdriver.elements.mercury.components.discussions.common.ReplyCreator) PostDetailsPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 2 with ReplyCreator

use of com.wikia.webdriver.elements.mercury.components.discussions.common.ReplyCreator in project selenium-tests by Wikia.

the class CreatingReplyTests method userOnMobileShouldFollowPostWhenAddedReplyOnPostDetailsPage.

@Test(groups = MOBILE)
@Execute(asUser = User.USER_2, onWikia = MercuryWikis.DISCUSSIONS_2)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void userOnMobileShouldFollowPostWhenAddedReplyOnPostDetailsPage() {
    final PostDetailsPage page = new PostDetailsPage().open(createPostAsUserRemotely().getId());
    final ReplyCreator replyCreator = page.getReplyCreatorMobile();
    assertThatPostIsFollowedWhenReplyAdded(page, replyCreator);
    assertThatPostCanBeUnfollowed(page);
}
Also used : ReplyCreator(com.wikia.webdriver.elements.mercury.components.discussions.common.ReplyCreator) PostDetailsPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 3 with ReplyCreator

use of com.wikia.webdriver.elements.mercury.components.discussions.common.ReplyCreator in project selenium-tests by Wikia.

the class CreatingReplyTests method userOnDesktopCanCreateReplyOnPostDetailsPage.

@Test(groups = DESKTOP)
@Execute(asUser = User.USER_2)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void userOnDesktopCanCreateReplyOnPostDetailsPage() {
    final PostDetailsPage page = new PostDetailsPage().open(createPostAsUserRemotely().getId());
    final ReplyCreator replyCreator = page.getReplyCreatorDesktop();
    assertThatUserCanCreateReply(page, replyCreator);
}
Also used : ReplyCreator(com.wikia.webdriver.elements.mercury.components.discussions.common.ReplyCreator) PostDetailsPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 4 with ReplyCreator

use of com.wikia.webdriver.elements.mercury.components.discussions.common.ReplyCreator in project selenium-tests by Wikia.

the class CreatingReplyTests method replyEditorExpandsForUserOnDesktopOnPostDetailsPage.

// User on desktop
@Test(groups = DESKTOP)
@Execute(asUser = User.USER_2)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void replyEditorExpandsForUserOnDesktopOnPostDetailsPage() {
    final PostDetailsPage page = new PostDetailsPage().open(createPostAsUserRemotely().getId());
    final ReplyCreator replyCreator = page.getReplyCreatorDesktop();
    final int originalEditorHeight = replyCreator.getEditorHeight();
    replyCreator.click().clickGuidelinesReadButton();
    int expandedEditorHeight = replyCreator.getEditorHeight();
    Assertion.assertTrue(expandedEditorHeight > originalEditorHeight, "Reply editor should expand.");
    Assertion.assertFalse(replyCreator.isSubmitButtonActive(), SUBMIT_BUTTON_INACTIVE_MESSAGE);
}
Also used : ReplyCreator(com.wikia.webdriver.elements.mercury.components.discussions.common.ReplyCreator) PostDetailsPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 5 with ReplyCreator

use of com.wikia.webdriver.elements.mercury.components.discussions.common.ReplyCreator in project selenium-tests by Wikia.

the class CreatingReplyTests method userOnMobileCanCreateReplyOnPostDetailsPage.

// User on mobile
@Test(groups = MOBILE)
@Execute(asUser = User.USER_2, onWikia = MercuryWikis.DISCUSSIONS_2)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void userOnMobileCanCreateReplyOnPostDetailsPage() {
    final PostDetailsPage page = new PostDetailsPage().open(createPostAsUserRemotely().getId());
    final ReplyCreator replyCreator = page.getReplyCreatorMobile();
    assertThatUserCanCreateReply(page, replyCreator);
}
Also used : ReplyCreator(com.wikia.webdriver.elements.mercury.components.discussions.common.ReplyCreator) PostDetailsPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Aggregations

Execute (com.wikia.webdriver.common.core.annotations.Execute)5 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)5 ReplyCreator (com.wikia.webdriver.elements.mercury.components.discussions.common.ReplyCreator)5 PostDetailsPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage)5 Test (org.testng.annotations.Test)5