Search in sources :

Example 1 with PostsCreatorDesktop

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

the class CreatingPostTests method anonUserOnDesktopWhenScrollsDownThenSeesStickyEditor.

@Test(groups = DESKTOP)
@Execute(asUser = User.ANONYMOUS, onWikia = MercuryWikis.DISCUSSIONS_1)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void anonUserOnDesktopWhenScrollsDownThenSeesStickyEditor() {
    PostsListPage postsListPage = new PostsListPage().open();
    postsListPage.getPost().scrollToLoadMoreButton();
    PostsCreatorDesktop postsCreator = postsListPage.getPostsCreatorDesktop();
    Assertion.assertFalse(postsCreator.isExpanded());
    Assertion.assertTrue(postsCreator.isSticky());
}
Also used : PostsListPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage) PostsCreatorDesktop(com.wikia.webdriver.elements.mercury.components.discussions.desktop.PostsCreatorDesktop) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 2 with PostsCreatorDesktop

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

the class CreatingPostTests method userOnDesktopMustBeLoggedInToUsePostCreator.

private void userOnDesktopMustBeLoggedInToUsePostCreator() {
    PostsCreatorDesktop postsCreator = new PostsListPage().open().getPostsCreatorDesktop();
    Assertion.assertTrue(postsCreator.click().isSignInDialogVisible());
    postsCreator.clickOkButtonInSignInDialog();
    Assertion.assertTrue(postsCreator.click().isSignInDialogVisible());
    postsCreator.clickSignInButtonInSignInDialog();
    Assertion.assertTrue(driver.getCurrentUrl().contains(MercurySubpages.REGISTER_PAGE));
}
Also used : PostsListPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage) PostsCreatorDesktop(com.wikia.webdriver.elements.mercury.components.discussions.desktop.PostsCreatorDesktop)

Example 3 with PostsCreatorDesktop

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

the class CreatingPostTests method userOnDesktopCanExpandPostEditor.

/*
   * LOGGED-IN USERS ON DESKTOP SECTION
   */
@Test(groups = DESKTOP)
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void userOnDesktopCanExpandPostEditor() {
    PostsCreatorDesktop postsCreator = new PostsListPage().open().getPostsCreatorDesktop();
    postsCreator.click();
    Assertion.assertTrue(postsCreator.isExpanded());
    Assertion.assertFalse(postsCreator.isPostButtonActive());
}
Also used : PostsListPage(com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage) PostsCreatorDesktop(com.wikia.webdriver.elements.mercury.components.discussions.desktop.PostsCreatorDesktop) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Aggregations

PostsCreatorDesktop (com.wikia.webdriver.elements.mercury.components.discussions.desktop.PostsCreatorDesktop)3 PostsListPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage)3 Execute (com.wikia.webdriver.common.core.annotations.Execute)2 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)2 Test (org.testng.annotations.Test)2