Search in sources :

Example 26 with InBrowser

use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.

the class ReportingPostTests method anonUserOnDesktopCanNotReportPostOnUserPostsPage.

@Test(groups = "discussions-anonUserDesktopReporting")
@Execute(asUser = User.ANONYMOUS)
@InBrowser(browser = Browser.FIREFOX, browserSize = DESKTOP_RESOLUTION)
public void anonUserOnDesktopCanNotReportPostOnUserPostsPage() {
    final UserPostsPage page = openDefaultUserPostPageWaiting();
    assertFalse(isReportPostOptionAvailableOn(page), NO_REPORT_POST_OPTION_MESSAGE);
}
Also used : UserPostsPage(com.wikia.webdriver.elements.mercury.pages.discussions.UserPostsPage) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 27 with InBrowser

use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.

the class ReportingPostTests method userOnMobileCanNotSeeDeletedPostOnPostsListPage.

@Test(groups = "discussions-loggedInUsersMobileReporting")
@Execute(asUser = User.USER)
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
public void userOnMobileCanNotSeeDeletedPostOnPostsListPage() {
    final PostEntity.Data data = createAndReportAndDeletePostRemotely();
    final PostEntity post = openPostListPageAndWaitUntilLoaded().getPost().findPostById(data.getId());
    assertNull(post, NOT_VISIBLE_DELETED_POST_MESSAGE);
}
Also used : PostEntity(com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 28 with InBrowser

use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.

the class LightboxTests method LightboxTest_007_specialVideo.

@Test(groups = "LightboxTest_007")
@InBrowser(browser = Browser.FIREFOX, browserSize = BROWSER_SIZE)
public void LightboxTest_007_specialVideo() {
    WikiBasePageObject base = new WikiBasePageObject();
    SpecialVideosPageObject specialVideos = base.openSpecialVideoPage(wikiURL);
    LightboxComponentObject lightbox = specialVideos.openLightboxForGridVideo(0);
    lightbox.verifyLightboxPopup();
    lightbox.verifyLightboxVideo();
}
Also used : WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) SpecialVideosPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVideosPageObject) LightboxComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.lightbox.LightboxComponentObject) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 29 with InBrowser

use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.

the class LightboxTests method LightboxTest_005_verifyExistenceAndURLsOfSocialButtons.

@Test(groups = "LightboxTest_005")
@Execute(asUser = User.STAFF)
@InBrowser(browser = Browser.FIREFOX, browserSize = BROWSER_SIZE)
public void LightboxTest_005_verifyExistenceAndURLsOfSocialButtons() {
    new ArticleContent().push(PageContent.ARTICLE_TEXT);
    ArticlePageObject article = new ArticlePageObject().open();
    VisualEditModePageObject visualEditMode = article.navigateToArticleEditPage();
    visualEditMode.clearContent();
    PhotoAddComponentObject photoAddPhoto = visualEditMode.clickPhotoButton();
    PhotoOptionsComponentObject photoOptions = photoAddPhoto.addPhotoFromWiki("image", 1);
    photoOptions.setCaption(PageContent.CAPTION);
    photoOptions.clickAddPhoto();
    visualEditMode.verifyPhoto();
    visualEditMode.submitArticle();
    article.verifyPhoto();
    LightboxComponentObject lightbox = article.clickThumbnailImage();
    lightbox.clickPinButton();
    // Assure header buttons are visible if not hovered over
    lightbox.makeHeaderVisible();
    lightbox.clickShareButton();
    lightbox.verifyShareButtons();
    lightbox.clickFacebookShareButton();
    lightbox.verifyUrlInNewWindow(URLsContent.FACEBOOK_DOMAIN);
    lightbox.clickTwitterShareButton();
    lightbox.verifyUrlInNewWindow(URLsContent.TWITTER_DOMAIN);
    lightbox.clickStumbleUponShareButton();
    lightbox.verifyUrlInNewWindow(URLsContent.STUMPLEUPON_DOMAIN);
    lightbox.clickRedditShareButton();
    lightbox.verifyUrlInNewWindow(URLsContent.REDDIT_DOMAIN);
    lightbox.clickPlusOneShareButton();
    lightbox.verifyUrlInNewWindow(URLsContent.GOOGLE_DOMAIN);
    lightbox.clickCloseShareScreenButton();
    lightbox.verifyShareScreenClosed();
    lightbox.clickCloseButton();
    lightbox.verifyLightboxClosed();
}
Also used : ArticleContent(com.wikia.webdriver.common.core.api.ArticleContent) ArticlePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) PhotoAddComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject) LightboxComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.lightbox.LightboxComponentObject) PhotoOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 30 with InBrowser

use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.

the class LightboxTests method LightboxTest_008_filepage_video.

/**
   * Open lightbox from Special:Videos, verify title url, verify More Info button and verify file
   * page (logged-in user)
   */
@Test(groups = "LightboxTest_008")
@Execute(asUser = User.USER, disableFlash = "false")
@InBrowser(browser = Browser.FIREFOX, browserSize = BROWSER_SIZE)
public void LightboxTest_008_filepage_video() {
    SpecialVideosPageObject specialVideos = new WikiBasePageObject().openSpecialVideoPage(wikiURL);
    LightboxComponentObject lightbox = specialVideos.openLightboxForGridVideo(0);
    lightbox.verifyLightboxPopup();
    lightbox.verifyLightboxVideo();
    FilePage filePage = lightbox.clickTitle();
    filePage.verifyTabsExistVideo();
    filePage.verifyEmbeddedVideoIsPresent();
}
Also used : WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) FilePage(com.wikia.webdriver.pageobjectsfactory.pageobject.special.filepage.FilePage) SpecialVideosPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialVideosPageObject) LightboxComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.lightbox.LightboxComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Aggregations

InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)184 Test (org.testng.annotations.Test)180 Execute (com.wikia.webdriver.common.core.annotations.Execute)146 PostEntity (com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)50 PostDetailsPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage)35 PostsListPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage)26 GuidelinesPage (com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage)17 AdsBaseObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject)15 NetworkTrafficDump (com.wikia.webdriver.common.core.annotations.NetworkTrafficDump)13 MoreOptionsPopOver (com.wikia.webdriver.elements.mercury.components.discussions.common.MoreOptionsPopOver)12 SearchResultsPage (com.wikia.webdriver.elements.mercury.pages.SearchResultsPage)12 LightboxComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.lightbox.LightboxComponentObject)12 VideoFanTakeover (com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover)11 CategoriesFieldset (com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoriesFieldset)10 UserPostsPage (com.wikia.webdriver.elements.mercury.pages.discussions.UserPostsPage)10 AdsFandomObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsFandomObject)9 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)7 CategoryPill (com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoryPill)7 PostActionsRow (com.wikia.webdriver.elements.mercury.components.discussions.common.PostActionsRow)6 ReplyCreator (com.wikia.webdriver.elements.mercury.components.discussions.common.ReplyCreator)5