Search in sources :

Example 1 with PhotoAddComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject in project selenium-tests by Wikia.

the class ArticleFeaturesCRUDTestsUser method addingImagePlaceholder.

@Test(groups = { "ArticleFeaturesCRUDUser_014" })
@Execute(asUser = User.USER)
public void addingImagePlaceholder() {
    new ArticleContent().clear();
    new ArticlePageObject().open();
    VisualEditModePageObject visualEditMode = new WikiBasePageObject().goToArticleDefaultContentEditPage(wikiURL, TestContext.getCurrentMethodName());
    ArticlePageObject article = visualEditMode.submitArticle();
    PhotoAddComponentObject photoAddPhoto = article.clickAddImagePlaceholder();
    PhotoOptionsComponentObject photoOptions = photoAddPhoto.addPhotoFromWiki("image", 2);
    photoOptions.setCaption(PageContent.CAPTION);
    photoOptions.clickAddPhoto();
    article.verifyPhoto();
}
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) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) PhotoAddComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject) PhotoOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 2 with PhotoAddComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject 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 3 with PhotoAddComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject in project selenium-tests by Wikia.

the class MessageWallFeaturesTests method userCanWriteMessageWithImage.

@Test(groups = { "MessageWallFeatures_004", "MessageWallFeatures", "MessageWallTests" })
@Execute(asUser = User.USER_MESSAGE_WALL)
public void userCanWriteMessageWithImage() {
    MessageWall wall = new MessageWall(driver).open(User.USER_MESSAGE_WALL.getUserName());
    String title = PageContent.MESSAGE_WALL_TITLE_PREFIX + wall.getTimeStamp();
    wall.setTitle(title);
    wall.triggerMessageArea();
    PhotoAddComponentObject photoAddPhoto = wall.clickImageButton();
    PhotoOptionsComponentObject photoOptions = photoAddPhoto.addPhotoFromWiki("image", 1);
    photoOptions.setCaption(PageContent.CAPTION);
    photoOptions.clickAddPhoto();
    wall.submit();
    wall.verifyImageAdded(title);
}
Also used : MessageWall(com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall) PhotoAddComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject) PhotoOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 4 with PhotoAddComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject in project selenium-tests by Wikia.

the class ForumBoardPage method startDiscussionWithImage.

public void startDiscussionWithImage(String title) {
    wait.forElementVisible(discussionTitleArea);
    jsActions.focus(discussionTitleArea);
    discussionTitleArea.sendKeys(title);
    wait.forElementVisible(wikiaEditorTextArea);
    jsActions.focus(wikiaEditorTextArea);
    PhotoAddComponentObject photoAdd = miniEditor.clickAddImage();
    PhotoOptionsComponentObject photoOptions = photoAdd.addPhotoFromWiki("image", 1);
    photoOptions.clickAddPhoto();
    PageObjectLogging.log("startDiscussionWithImage", "discussion with image started" + title, true, driver);
}
Also used : PhotoAddComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject) PhotoOptionsComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject)

Example 5 with PhotoAddComponentObject

use of com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject in project selenium-tests by Wikia.

the class ForcedLoginTests method anonCanLogInViaAuthModalWhenAddingPhoto.

@Test(groups = "ForcedLogin_anonCanLogInViaAuthModalWhenAddingPhoto")
public void anonCanLogInViaAuthModalWhenAddingPhoto() {
    WikiBasePageObject base = new WikiBasePageObject();
    String articleName = PageContent.ARTICLE_NAME_PREFIX + base.getTimeStamp();
    VisualEditModePageObject edit = base.navigateToArticleEditPage(wikiURL, articleName);
    edit.clickPhotoButton();
    DetachedSignInPage authModal = new DetachedRegisterPage().navigateToSignIn();
    authModal.login(credentials.userName10, credentials.password10);
    edit.verifyUserLoggedIn(credentials.userName10);
    assertTrue(edit.isStringInURL(articleName));
    assertTrue(edit.isStringInURL(URLsContent.ACTION_EDIT));
    PhotoAddComponentObject addPhoto = edit.clickPhotoButton();
    addPhoto.verifyAddPhotoModal();
}
Also used : DetachedRegisterPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.register.DetachedRegisterPage) VisualEditModePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject) WikiBasePageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject) DetachedSignInPage(com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.DetachedSignInPage) PhotoAddComponentObject(com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject) Test(org.testng.annotations.Test)

Aggregations

PhotoAddComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoAddComponentObject)8 PhotoOptionsComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.photo.PhotoOptionsComponentObject)7 Test (org.testng.annotations.Test)7 Execute (com.wikia.webdriver.common.core.annotations.Execute)6 VisualEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.VisualEditModePageObject)5 WikiBasePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.WikiBasePageObject)4 ArticleContent (com.wikia.webdriver.common.core.api.ArticleContent)3 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)3 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)2 LightboxComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.lightbox.LightboxComponentObject)1 SourceEditModePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.editmode.SourceEditModePageObject)1 DetachedRegisterPage (com.wikia.webdriver.pageobjectsfactory.pageobject.auth.register.DetachedRegisterPage)1 DetachedSignInPage (com.wikia.webdriver.pageobjectsfactory.pageobject.auth.signin.DetachedSignInPage)1 MessageWall (com.wikia.webdriver.pageobjectsfactory.pageobject.messagewall.MessageWall)1 SpecialCreatePage (com.wikia.webdriver.pageobjectsfactory.pageobject.special.SpecialCreatePage)1 BlogPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.wikipage.blog.BlogPageObject)1